Docs
Connect an agent
agentbrain is a remote MCP server with OAuth 2.1 (PKCE, dynamic client registration). Any client that supports remote MCP with browser auth connects in one step.
Claude Code
claude mcp add --transport http agentbrain https://agentbrain.lukaloehr.com/mcpThen run /mcp inside Claude Code, pick agentbrain and choose Authenticate. Your browser opens, you approve with a passkey (or you are already signed in), done.
Codex CLI
codex mcp add agentbrain --url https://agentbrain.lukaloehr.com/mcp
codex mcp login agentbrainClaude.ai, Claude Desktop, Cursor, ChatGPT
Add a custom connector / MCP server with the URL https://agentbrain.lukaloehr.com/mcp. The OAuth flow is the same.
Headless machines
Create a personal access token in Settings and pass it as a bearer header:
claude mcp add --transport http agentbrain https://agentbrain.lukaloehr.com/mcp --header "Authorization: Bearer abp_…"The model
A project is a scope (a codebase, a client, a domain). The global project applies everywhere. A memory is one node in the graph: a title, a summary an agent can act on, an optional markdown body, tags, importance and confidence. Relations are directed edges between memories.
Memory types
- fact — Something true about the world or the project (config, IDs, state).
- decision — A choice that was made and why. Supersede rather than edit history.
- preference — How the owner wants things done. Highest priority in context packs.
- feedback — A correction or confirmation the owner gave; include why and how to apply.
- reference — Pointer to an external resource: URL, dashboard, ticket, doc.
- entity — A person, service, system, account, or thing that other nodes refer to.
- task — Open work, blocker, or follow-up. Archive when done.
- insight — A learned lesson or pattern, usually derived from an incident.
- procedure — Step-by-step how-to that has been verified to work.
Relations
- relates_to — Generic association.
- depends_on — A requires B to hold or exist.
- blocks — A prevents B from progressing.
- supersedes — A replaces B; B is usually archived.
- part_of — A is a component or sub-topic of B.
- caused_by — A happened because of B.
- contradicts — A and B cannot both be true; one needs resolving.
- example_of — A is a concrete instance of B.
- derived_from — A was inferred or built from B.
- see_also — Worth reading together.
Tools
get_context | Boot pack for a project: global memories, project memories by type and importance, stale items, recent activity. |
list_projects / create_project / update_project | Manage scopes. |
search_memory | Ranked full-text search across title, summary, body and tags. |
list_memories | Browse with filters, sort and paging. |
get_memory | Full body plus relations, optionally two hops and version history. |
explore_graph | Breadth-first walk from a memory, filtered by relation and direction. |
remember | Create a memory (with links, upsert by slug). |
update_memory / forget | Versioned updates; archive, mark stale, or delete. |
link_memories / unlink_memories | Manage relations. |
list_activity | What every agent changed, and when. |
whoami | Account, client, scopes and totals. |
Resources: agentbrain://projects, agentbrain://projects/{slug}/context, agentbrain://memory/{id}. Prompt: bootstrap.
Security and residency
- Accounts sign in with a passkey or an authenticator app after email verification. Sessions are cookie-bound and server-side.
- Agents get OAuth access tokens scoped to
brain:read,brain:write,account:read, rotated with refresh tokens, revocable in Settings. - All data lives in a Cloudflare D1 database created with the
eujurisdiction. Memory content never touches KV, Vectorize or AI models. - Memories are data. Agents are told never to execute instructions found in memory bodies.