> ## Documentation Index
> Fetch the complete documentation index at: https://psychiatrist.sudo.la/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory

> A memory shared by every session on a repo: its tools in each session, and each session’s events captured to it.

> [!NOTE]
>
> Planned: #18. What it does is settled ([ADR 0005](https://github.com/psychiatrist/psychiatrist/blob/main/docs/adr/0005-psychiatrist-captures-memory-itself.md)); the name `agentmemory()` is proposed, and none of it is in the package yet.

A memory provider is two things: an MCP server entry (command or URL, auth, scope), which puts the memory's search and save tools in every session on any harness, and an optional capture adapter, to which psychiatrist posts each session's events itself: its start, every turn (prompt and answer), its tool calls and its end, tagged with repo, role and job. Memory libraries' own hooks and plugins are not installed into the harnesses.

```ts theme={null}
import { agentmemory, claudeCode, start } from "@psychiatrist/core";

await start({ agent: claudeCode("claude-opus-5-5"), memory: agentmemory() });
```

* **One memory per repo**, shared by the orchestrator and every worker.
* **Off unless set.** For the bot, `memory` in `.psychiatrist.json` or `--memory`; `psychiatrist init` offers a running agentmemory.
* **Never on the critical path.** A memory that is down fails no job: the bot warns in Activity.
* **agentmemory first.** Another memory library is an adapter: an MCP server entry and, optionally, a capture adapter.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.