Brain — agent memory

A Brain is a named set of private Markdown files that your AI agent reads and writes over MCP — its long-term memory. Skills say how to work; the Brain says what is true in your context: the stack, the conventions, the customers, the decisions already made.

You can keep everything in one brain or split by concern — Personal, Team, Client X. Your first brain is created automatically; more take one click on /brain. A brain can be shared with other people, so one curated memory serves a whole team’s agents.

Files & versions

A brain holds .md files (up to 2 MB each) organised into folders. Write them in the web editor, upload them, or let the agent write its own. Two things hold for every file:

  1. Every save keeps a version. Human or agent, replace or append — the previous body is preserved, so an overwrite never loses anything.
  2. Context stays lean. Small files load whole; large ones are searched on demand. With a hosted agent, an In context toggle picks which files ride along on every run.

The agent’s view (MCP)

Four tools, available after a one-time sign-in (browser OAuth, or an MCP token for headless clients — see Connect to Claude). They work across every brain you can access; the optional brain argument narrows to one:

brain_list(brain?, folder?)            → every file you can read, with its brain and your role
brain_search(query, brain?)            → files + matching lines, so the agent picks before reading
brain_get(name, brain?)                → one Markdown body
brain_write(name, body, mode?, brain?) → create / replace / append — versioned; needs editor on shared brains

# a brain shared with you is addressed by its owner:
brain_get(name: "onboarding.md", brain: "jan/Team")

In practice you just talk: “remember that staging deploys from the release branch” becomes a brain_write; “what do we know about the payment provider?” becomes a brain_search. Writes without a named brain land in your default brain.

Sharing a brain

Invite a person by e-mail from the brain’s Sharing card and pick their role: viewer reads, editor reads and writes. They open the link, sign in with Google or GitHub — an account is created on the spot if needed — and the brain appears next to their own, on the web and in MCP as your-handle/brain-name. The link is valid for 14 days; whoever opens it gets the membership, so send it to the right inbox.

  1. Per-file control. Sharing defaults to the whole brain, but every file has a Shared / Only you switch — members never see a file you keep to yourself.
  2. Roles are enforced everywhere. A viewer’s brain_write is refused on the web and over MCP alike; deleting files, managing members and the per-file switch stay with the owner.
  3. Reversible. Members can leave, the owner can remove members and revoke open invitations at any time.

Privacy & security

Brain files never appear in the public catalog or in search engines. Bodies — and all their versions — are encrypted at rest. And because the Brain is memory, not a vault, every save is scanned: content that looks like a credential (API keys, tokens, private keys) is refused with a pointer to the agent configuration, where secrets actually belong.

Frequently asked

What is a Brain on emdly?

A named set of private Markdown files your AI agent reads and writes over MCP — its long-term memory. Skills say how to work; the Brain says what is true in your context. You can have several brains and share one with other people.

Is my Brain content private?

Yes. Brain files never appear in the public catalog or in search engines, bodies are encrypted at rest, and every save is scanned so credentials are refused. Only you see a brain unless you explicitly invite someone.

How does sharing a brain work?

Invite a person by e-mail with a role: viewer reads, editor reads and writes. They open the link, sign in with Google or GitHub (an account is created if needed) and the brain appears next to their own — on the web and over MCP. Per file you can switch sharing off.

How does my agent use the Brain?

Over MCP with brain_list, brain_search, brain_get and brain_write. Small files are read whole, large ones searched on demand. Every write keeps the previous version. Shared brains are addressed as owner-handle/name; writing to one needs the editor role.

Can I roll back a change?

Every edit — human or agent — keeps the previous body as a version, so nothing is ever lost by an overwrite.