My Agent — Personal AI Collaborator Architecture OpenClaw runtime · Tailscale-protected · model-agnostic. A layered guide to how a personal AI agent thinks, remembers, and acts. Github · Repositories · Sync Layer Durable sync between local, repos, and VPS Agent Brain private Source of truth for identity, memory, rules, tools, and project context. Agent Portal public-facing Approval pages, dashboards, hosted outputs. Deploys via Netlify to a public subdomain. Skills Master optional Portable skills and MCP server configs, kept in sync across environments. AI Model Layer · Priority Routing Model-agnostic. No single-vendor lock-in. 1 OpenAI Codex subscription · primary coding + reasoning 2 Anthropic Claude subscription · long-context reasoning, drafting 3 Paid OpenRouter models fallback layer · routes across multiple vendors on demand Agent Brain · Configuration Files Read at startup — shapes every session IDENTITY.md USER.md MEMORY.md TOOLS.md HEARTBEAT.md AGENTS.md project files reference files Identity tells the agent who it is. User describes who it's working for. Memory holds what it knows. Tools defines what it can do. Heartbeat sets the recurring rhythm. Agents.md describes sub-agents. Reference and project files give domain context. Human · Local Environment User & Inputs U User the human in the loop OpenClaw Web Portal built-in browser chat with the agent Gmail Inbox agent reads + drafts on user's behalf Google Drive Inbox drop files here for the agent to ingest Local Machine user's laptop · code, files, Git client GitHub Sync (from local) push Brain edits, code, configs Manual Brain Edits optional — directly edit identity/memory Public inputs (portal, Gmail, Drive) reach the agent over the internet. The local machine connects through the encrypted Tailscale mesh. The user never SSHs to a public admin port. That surface is closed. Tailscale private encrypted mesh network local ⇄ VPS Vultr VPS · Ubuntu Host OpenClaw Runtime Self-hosted, always-on container for the agent OpenClaw Container Manages sessions, sub-agents, cron, browser, MCP connections. My Agent the configured personal orchestrator • Reads Brain config at startup • Routes model calls in priority order • Calls connected tools and MCPs • Writes memory + outputs • Gates risky actions through approval • Spawns sub-agents and cron jobs My Agent ≠ the VPS. The agent is the configured runtime living inside OpenClaw on the VPS. Swap the config, and you get a different agent. OpenClaw provides the body (sessions, scheduling, browser control). The Brain repo provides the mind (identity, memory, rules, tools). The two together produce a stable, persistent personal AI collaborator. Approval & Safety Loop Required for public, spend, irreversible, or external actions Agent drafts the action Discord approval ping Portal approval page User decides (approve/edit/deny) Log + execute/abort Connected Tools · APIs · MCPs How the agent reaches the outside world A · Meetings & Comms Fathom MCP meeting search, summaries, transcripts Discord notifications, conversational output Twilio SMS SMS backup for high-priority pings Channels the agent uses to talk WITH the user. B · Google Ecosystem Google Workspace / CLI Gmail · Calendar · Docs · Sheets · Contacts Google Drive folders Inbox · Processed · Reference · Projects · Scratch User's primary work environment + the raw knowledge layer. C · Models & Media APIs OpenRouter API OpenRouter Image OpenAI API xAI API ElevenLabs Cloudinary Direct API access for image gen, speech, and hosted media. D · Web · Data · Research Apify Firecrawl Context7 Playwright Scrape, crawl, monitor, run browser tests, look up current SDK and API documentation. E · Infra · Project Firebase Portal backend / project DB Netlify Portal deploys + site management ClickUp API task / project access The infrastructure stack the agent operates on. F · OpenClaw-native Browser Control Cron / Heartbeats Sessions / Subagents Nodes (paired devices) Image / PDF / Media tools automate the browser scheduled + recurring jobs child agents for background work control paired devices media analysis + generation input private Tailscale connection sync commit back model call reads identity tool / API call Outputs · User-Facing Surfaces Where the agent's work shows up Discord messages notifications, approval pings, conversational replies Email to the user, plus confirmed outbound when acting on their behalf Google Drive files organized project outputs filed into the right folders Agent Portal pages approval pages, dashboards, deliverables on the public subdomain GitHub commits / pushes to Brain, Portal, or Skills Master when approved Cloudinary-hosted media images, files, signed URLs for shareable assets Twilio SMS high-priority text backup, breaks-glass channel Browser artifacts / screenshots visual proof for tasks that ran headlessly Memory · Knowledge Flow Four layers, most curated at the top Layer 1 · Curated memory in Agent Brain repo most distilled — pinned facts, rules, key relationships, decisions Layer 2 · Daily notes Memory/YYYY-MM-DD.md · rolling working log of the day Layer 3 · Raw / archive — Google Drive Inbox · Processed · Reference — ingested source material Layer 4 · Created outputs — Google Drive Projects · Scratch — what the agent produces, organized for retrieval memory write retrieval output memory write retrieval Optional Add-On Garry Tan's gBrain — semantic memory upgrade layer Works WITH the OpenClaw memory mechanism as an advanced semantic layer. It does not replace the default memory. A long-term memory + knowledge-graph layer that ingests raw notes, decisions, documents, links, and project context. Sits alongside the Brain repo and Google Drive memory layers, plugging into the agent to improve retrieval, continuity, and semantic recall. Particularly useful when explaining ideas to a curious student: the agent can pull in the right precedent, snippet, or analogy on demand. in progress optional upgrade not core runtime yet complementary, not replacement gBrain Layer Semantic memory · knowledge graph → ingests notes, decisions, docs, links → adds vector + graph retrieval → improves continuity across sessions → student-friendly explanations → runs alongside Brain + Drive memory, not instead of augments memory semantic recall to agent Legend · Arrow & Zone Key input user reaching the agent sync GitHub push / pull private Tailscale local ⇄ VPS only, encrypted model call agent ⇄ LLM via priority router tool / API call MCP or API request output / approval user-facing surface, gated memory write into Brain or Drive retrieval agent reading memory optional gBrain semantic upgrade flow