Skip to main content

ShellBrain logo

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 configures the runtime automatically. 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.


Recall in one command

ShellBrain recall uses vector search and BM25 to search your memories. An inner recall agent summarizes the search results.


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 and automatic learning use the same evidence selector. It combines BM25, vector similarity, and graph links. Learning agents receive the selected records. The recall agent can summarize them.

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. Provider failures return a brief directly from that same pack.

Recall provider

For faster recall, get an Inception API key, replace PASTE_YOUR_KEY_HERE, and run once:

mkdir -p ~/.shellbrain
printf '\nINCEPTION_API_KEY=%s\n' 'PASTE_YOUR_KEY_HERE' >> ~/.shellbrain/.env
chmod 600 ~/.shellbrain/.env
shellbrain admin recall provider inception

Shellbrain loads the saved key automatically. Switch back with shellbrain admin recall provider codex (the default), or choose claude.


Repair

Run shellbrain upgrade to repair an existing installation. Setup and schema migrations run automatically.


Docs

Metadata

Release files for shellbrain 0.1.61

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

Source distribution (sdist)

Source distribution for shellbrain 0.1.61
File Size Uploaded Provenance
shellbrain-0.1.61.tar.gz 359.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for shellbrain 0.1.61
File Interpreter ABI Platform
shellbrain-0.1.61-py3-none-any.whl Python 3 none any Details

Total release size: 882.0 kB

Release files / shellbrain-0.1.61.tar.gz

Download URL shellbrain-0.1.61.tar.gz
Size 359.9 kB
Tags Source
SHA-256 checksum
How to use checksums
af538a3de9a991ee9ade1971380eb41712304e19b205e7b555c6c0708fd12c48
BLAKE2b-256 checksum
How to use checksums
646a6ad6a38f1d411b92d39137f7f253324312b78eb934a4e937ba6ada9d5807
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 23, 2026.

Transparency log

Release files / shellbrain-0.1.61-py3-none-any.whl

Download URL shellbrain-0.1.61-py3-none-any.whl
Size 522.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9dc86c637d5091483768e552d521fbbc6a50495f93641c57f5087adcb0584ab
BLAKE2b-256 checksum
How to use checksums
04bd307a848260d9929d1d18464651c19a7c0729f2f3b8552510cafc6630f39c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 23, 2026.

Transparency log

Security for shellbrain 0.1.61

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for shellbrain-0.1.61.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 Sep 23, 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.

Release history Release notifications | RSS feed

This release

0.1.61 This release

2 release files Full provenance

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