> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.recursiv.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.recursiv.io/_mcp/server.

# Brain & Memory

The "Brain" is the AI layer that powers internal guidance, roadmap context, and admin insights.

## Brain Chat (AI Panel)

* Client: `packages/client/src/features/brain`
* Server: `packages/server/src/features/brain`
* Transport: WebSocket events (`brain_stream`)
* API entry: `brain.sendMessage` (tRPC, protected)

The Brain system prompt is built from the `brain/` directory, including files like:

* `brain/DECISIONS.md`
* `brain/MILESTONES.md`
* `brain/ROADMAP.yaml`

If the AI provider isn't configured at org/network level, the Brain falls back to `OPENROUTER_API_KEY`.

## Roadmap + Dispatcher

The roadmap lives in `brain/ROADMAP.yaml` and is surfaced through the dispatcher:

* Task updates stream via `/api/v1/dispatcher/*`
* Admin UI reads the live stream to show status and activity

Admin roadmap route:

* `/admin/roadmap`

## Troubleshooting

* If Brain responses fail, check AI provider configuration or `OPENROUTER_API_KEY`.
* If the admin roadmap shows OFFLINE, verify dispatcher stream auth and API status.