ShellBrain
Long-term Memory for AI Agents.
ShellBrain carries useful lessons from one agent task to the next. It preserves decision reasons, failed approaches, product direction, and preferences that the resulting code does not explain.
Install
curl -L shellbrain.ai/install | bash
Works for Codex, Claude Code, and Cursor. The installer runs shellbrain init for you. Repos register themselves on first use.
Requirements.
- macOS or Linux, Python 3.11+, Docker for the managed local Postgres+pgvector runtime.
Upgrade for latest capabilities
shellbrain upgrade
You can also run curl -L shellbrain.ai/upgrade | bash. Manual alternative: pipx upgrade shellbrain && shellbrain init.
Recall in one command
Architecture
ShellBrain stores evidence and two forms of reusable knowledge:
- Episodic knowledge records evidence. It stores prompts, agent steps, tool calls, and outputs from each session.
- Empirical knowledge extracts concrete memories. It organizes problems, solutions, failed tactics, facts, preferences, and changes in a semantic graph for case-based reasoning.
- Conceptual knowledge abstracts reusable ideas. Its concept graph connects claims, relations, and implementations to empirical knowledge.
Memories and concept claims link to supporting evidence. A concept can express a product principle without a duplicate memory. Current code remains the source of truth for implementation details.
How Agents Use ShellBrain
Recall
Working agents run shellbrain recall to get one compact brief for the current task.
Recall receives only the quoted query. Include the relevant task, failure, subsystem, or decision in the question.
shellbrain recall "What is ShellBrain, and how does it help a working coding agent?"
Response format:
{
"status": "ok",
"data": {
"brief": {
"summary": "...",
"constraints": ["..."],
"known_traps": ["..."],
"prior_cases": ["..."],
"concept_orientation": ["..."],
"anchors": ["`README.md`"],
"conflicts": ["..."],
"gaps": ["..."],
"next_checks": ["..."]
},
"fallback_reason": null
},
"errors": []
}
Recall selects an evidence pack in code, then asks an inner agent to summarize it. Source attribution comes from the selected records. Fast mode and provider failures return a brief directly from that same pack.
Teach
Run shellbrain teach only when you explicitly want ShellBrain to remember something important.
Memory Discipline
ShellBrain keeps memory grounded in evidence and narrow in scope. Agents request memory when they need it.
Memory that cannot justify itself should not persist.
Use ShellBrain
Use Shellbrain with your preferred agent. Then work as usual.
- Claude Code: Use
/shellbrainto recall context at task boundaries. - Codex: Use $shellbrain to recall context at task boundaries.
- Cursor: Use
/shellbrainto recall context at task boundaries.
Repair
Run shellbrain admin doctor to inspect the installation. If it reports a problem, run shellbrain init. Do not run init every session.
Docs
- For Humans: installation, upgrades, and first steps
- For Agents: agent workflow and memory rules
- Technical Docs: detailed documentation and code map
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shellbrain-0.1.58.tar.gz.
File metadata
- Download URL: shellbrain-0.1.58.tar.gz
- Upload date:
- Size: 469.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94346d9977aa7b94954221bef782b6af75a0b07f06be4dabcf3a7a9452627284
|
|
| MD5 |
f60922b138a2ee2f6d7f1f683d05b899
|
|
| BLAKE2b-256 |
8a519a81f2881953d61d7a0f09fe13a476800150cb73571a6d278c9c62919447
|
Provenance
The following attestation bundles were made for shellbrain-0.1.58.tar.gz:
Publisher:
release.yml on cucupac/shellbrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shellbrain-0.1.58.tar.gz -
Subject digest:
94346d9977aa7b94954221bef782b6af75a0b07f06be4dabcf3a7a9452627284 - Sigstore transparency entry: 2732961572
- Sigstore integration time:
-
Permalink:
cucupac/shellbrain@496f95aa46f503de0585c7982e12ef582bcb1274 -
Branch / Tag:
refs/tags/v0.1.58 - Owner: https://github.com/cucupac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@496f95aa46f503de0585c7982e12ef582bcb1274 -
Trigger Event:
push
-
Statement type:
File details
Details for the file shellbrain-0.1.58-py3-none-any.whl.
File metadata
- Download URL: shellbrain-0.1.58-py3-none-any.whl
- Upload date:
- Size: 642.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7b3aa3508b7f4fc3e64f89a5a72b8f0b9dbc7ec99bba294d6c87ed04fca39ce
|
|
| MD5 |
a5d7bf050375a82fa5b15e77a978e376
|
|
| BLAKE2b-256 |
927c156074165e42c3746e969314c4537b977b4b0b7c65a6f8cc29b0f1b41b31
|
Provenance
The following attestation bundles were made for shellbrain-0.1.58-py3-none-any.whl:
Publisher:
release.yml on cucupac/shellbrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shellbrain-0.1.58-py3-none-any.whl -
Subject digest:
f7b3aa3508b7f4fc3e64f89a5a72b8f0b9dbc7ec99bba294d6c87ed04fca39ce - Sigstore transparency entry: 2732961668
- Sigstore integration time:
-
Permalink:
cucupac/shellbrain@496f95aa46f503de0585c7982e12ef582bcb1274 -
Branch / Tag:
refs/tags/v0.1.58 - Owner: https://github.com/cucupac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@496f95aa46f503de0585c7982e12ef582bcb1274 -
Trigger Event:
push
-
Statement type: