Skip to main content

Brain

Brain gives coding agents durable, local context: long-term project memory, agent-to-agent messages, and a localhost dashboard through an MCP server. It works with Claude Code and Codex, while keeping the Python import name and existing devmem command available for compatibility.

Windows, macOS, and Linux are supported. Windows is supported natively starting with this release.

Install

Install Brain as a tool:

uv tool install agent-memory-brain

Or use pipx:

pipx install agent-memory-brain

If brain is not yet on your PATH, run uv tool update-shell, follow its shell instructions, and open a new terminal. Until then, use the absolute executable path from uv tool dir --bin.

Connect an agent

Register the MCP server for Claude Code:

claude mcp add brain -s user -- brain mcp

If brain is not on PATH, replace it in that command with the absolute executable path from uv tool dir --bin.

For Codex, add this to ~/.codex/config.toml (use the absolute path if needed). The MCP server's internal name remains devmem for compatibility:

[mcp_servers.devmem]
command = "brain"
args = ["mcp"]

To include a compact project briefing at the start of a Claude Code session, optionally configure a SessionStart hook that runs:

brain context --hook

Dashboard

Start the local panel:

brain panel

Then open http://127.0.0.1:8765. The dashboard shows activity, projects, sessions, memories, messages, and optional integrations.

Memory that stays useful

Use the MCP tools to save decisions, preferences, snippets, notes, and follow-ups. Search combines keywords with local semantic embeddings when enabled; brain embed backfills embeddings and DEVMEM_EMBED=0 keeps operation keyword-only. The CLI also offers brain search, brain context, and brain audit.

Changes and deletions retain revision history (memory_history and memory_restore). Pin only the facts needed in every session, and use typed memory links rather than repeating related context. brain maintain --dry-run previews optional maintenance work before it changes anything.

Privacy and network

All memory data stays in ~/.devmem/devmem.db, and the panel binds only to localhost. Brain reads, but never modifies, logs in ~/.claude/projects and ~/.codex/sessions.

On first embedding use, FastEmbed may download its model into ~/.devmem/models; set DEVMEM_EMBED=0 to disable embeddings. The following features are off unless configured: the Azure DevOps panel (requires ~/.devmem/ado.json and a user-created token file), git sync (a user-configured git remote), automatic maintenance (runs local codex exec or claude -p), and panel chat dispatch (runs local Claude or Codex CLIs).

Guard limits

Command guard rules match literal command text, so dynamic forms such as x=git; $x commit or eval can bypass them. Put hard limits in OS permissions; path rules still inspect command tokens.

Configuration

Configuration names deliberately remain compatible: environment variables continue to use the DEVMEM_* prefix and data/configuration paths remain under ~/.devmem/. Common settings include DEVMEM_DB, DEVMEM_EMBED, DEVMEM_MAX_CONTENT, DEVMEM_PANEL_PORT, DEVMEM_MAINTAIN, and DEVMEM_ADO_CONFIG.

License

Brain is free for individuals and small businesses under the PolyForm Small Business License 1.0.0. Larger companies can contact the author for a commercial license via the PyPI project page.

The paid Agensi skill pack teaches agents to use Brain well.

Metadata

Release files for agent-memory-brain 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-memory-brain 0.3.0
File Size Uploaded Provenance Actions
agent_memory_brain-0.3.0.tar.gz 668.7 kB With provenance Details for agent_memory_brain-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-memory-brain 0.3.0
File Interpreter ABI Platform Actions
agent_memory_brain-0.3.0-py3-none-any.whl Python 3 none any Details for agent_memory_brain-0.3.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / agent_memory_brain-0.3.0.tar.gz

Download URL agent_memory_brain-0.3.0.tar.gz
Size 668.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2d2169d98d190f4eaf74233ad4f98ca7ca5ae4f9105b25a251d2b947eb022978
BLAKE2b-256 checksum
How to use checksums
568d14d52f37a7aff9ccb3e23c964c668d0fec9a0c6aaf38f46133a62244f203
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / agent_memory_brain-0.3.0-py3-none-any.whl

Download URL agent_memory_brain-0.3.0-py3-none-any.whl
Size 698.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f62d4c42ab179cb21d8043b3c9f04f11eeec353b34bb232e5d510fb82245d7a
BLAKE2b-256 checksum
How to use checksums
42bc91982d12ae294f9f7905bd129087a595ef4bd8cf76d105bd07aa1a1a0d0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for agent-memory-brain 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_memory_brain-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page