AI coding assistant memory system — git-integrated file summaries
Project description
Amygdala
AI coding assistants start every session with amnesia. Amygdala is a git-integrated memory system that tracks file summaries at configurable granularity levels, detects dirty files via git diff, and injects relevant context at session start.
- Provider-agnostic -- Anthropic, OpenAI, and Ollama supported out of the box
- Adapter system -- pluggable integration with Claude Code, Cursor, Windsurf (Claude Code ships first)
- Git-native -- summaries tracked alongside your code, dirty detection via content hashing
Installation
From PyPI
pip install amygdala
Install with a specific LLM provider:
pip install "amygdala[anthropic]" # Anthropic (Claude)
pip install "amygdala[openai]" # OpenAI (GPT)
pip install "amygdala[ollama]" # Ollama (local models)
pip install "amygdala[all-providers]" # All providers
From source (development)
git clone https://github.com/sinanata/amygdala.git
cd amygdala
pip install -e ".[dev,all-providers]"
Quick Start
1. Initialize in your project
cd /path/to/your/project
amygdala init --provider anthropic --model claude-haiku-4-5-20251001
This creates a .amygdala/ directory with config and index files. Add .amygdala/ to your .gitignore if you don't want to track memory across machines.
Options:
--provider-- LLM provider:anthropic,openai,ollama(default:anthropic)--model-- Model identifier (default:claude-haiku-4-5-20251001)--granularity-- Summary detail level:simple,medium,high(default:medium)
2. Capture file summaries
# Capture specific files
amygdala capture src/main.py src/utils.py
# Capture all tracked files
amygdala capture --all
# Capture with high granularity
amygdala capture --all --granularity high
3. Check status
amygdala status # Rich table output
amygdala status --json # JSON output (for scripting / hooks)
4. Detect dirty files
amygdala diff # Scan for files changed since last capture
amygdala diff --mark-dirty src/main.py # Manually mark a file as dirty
5. Install a platform adapter
amygdala install claude-code # Install Claude Code hooks + MCP server
amygdala uninstall claude-code # Remove adapter
Environment Variables
Set your API key for the provider you're using:
| Provider | Variable |
|---|---|
| Anthropic | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY |
| Ollama | (none -- local) |
CLI Reference
| Command | Description |
|---|---|
amygdala init |
Initialize Amygdala in a project |
amygdala capture |
Capture file summaries (specific or --all) |
amygdala status |
Show project memory status |
amygdala diff |
Scan for dirty files |
amygdala config show |
Show current configuration |
amygdala config get |
Get a config value (dot notation) |
amygdala install |
Install a platform adapter |
amygdala uninstall |
Remove a platform adapter |
amygdala serve |
Start the MCP server |
amygdala clean |
Remove all .amygdala/ data (--force) |
Claude Code Integration
After installing the Claude Code adapter, Amygdala provides:
Hooks:
- SessionStart -- injects branch info, tracked/dirty file counts into session context
- PostToolUse -- marks files dirty when Claude Code writes or edits them
MCP Server (5 tools available to Claude):
get_file_summary(file_path)-- retrieve a file's cached summaryget_project_overview()-- project-wide memory statuslist_dirty_files()-- files changed since last capturecapture_file(file_path, granularity)-- capture or update a file's summarysearch_memory(query)-- search across all stored summaries
Start the MCP server:
amygdala serve
Project Structure
.amygdala/
config.toml # Provider, model, granularity settings
index.json # Per-file tracking (hash, status, timestamps)
memory/ # Markdown summaries mirroring your source tree
src/
main.py.md
utils.py.md
Granularity Levels
| Level | Description |
|---|---|
simple |
One-line purpose of the file |
medium |
Purpose, key functions/classes, dependencies (default) |
high |
Detailed breakdown: every function, class, import, side-effect |
Development
# Install dev dependencies
pip install -e ".[dev,all-providers]"
# Run tests
pytest
# Run with coverage
pytest --cov=amygdala --cov-report=term
# Lint
ruff check src/ tests/
ruff format src/ tests/
# Type check
mypy src/amygdala/
Requirements
- Python >= 3.12
- Git (project must be a git repository)
License
MIT
Project details
Release history Release notifications | RSS feed
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 amygdala-0.1.1.tar.gz.
File metadata
- Download URL: amygdala-0.1.1.tar.gz
- Upload date:
- Size: 37.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ef90999b29b995a7b1ac9f9a0f214cb810fb567e6e25773f2a0b6b86fbf1089
|
|
| MD5 |
9517eeae2e0c10530eca273033b5f6a5
|
|
| BLAKE2b-256 |
210f9a01012e9df2a9c955bd86b92f6fc731ce27454a51d4c08e8717afe2ff4f
|
Provenance
The following attestation bundles were made for amygdala-0.1.1.tar.gz:
Publisher:
publish.yml on sinanata/amygdala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amygdala-0.1.1.tar.gz -
Subject digest:
2ef90999b29b995a7b1ac9f9a0f214cb810fb567e6e25773f2a0b6b86fbf1089 - Sigstore transparency entry: 962491971
- Sigstore integration time:
-
Permalink:
sinanata/amygdala@7db9c4692e2ebdae19cd3d75bc6438090bb92ba3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/sinanata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7db9c4692e2ebdae19cd3d75bc6438090bb92ba3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file amygdala-0.1.1-py3-none-any.whl.
File metadata
- Download URL: amygdala-0.1.1-py3-none-any.whl
- Upload date:
- Size: 42.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cb576e81df6f1e2103b485a7453c5c7611cafbddae5ac20985ec7dd5ca5a742
|
|
| MD5 |
09e226ca5e262d994ff80849ee5fa88e
|
|
| BLAKE2b-256 |
933892fbd8926029ff7dc3c89e6b4382ad4eba60c8d5137e9199329caa187a90
|
Provenance
The following attestation bundles were made for amygdala-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on sinanata/amygdala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amygdala-0.1.1-py3-none-any.whl -
Subject digest:
9cb576e81df6f1e2103b485a7453c5c7611cafbddae5ac20985ec7dd5ca5a742 - Sigstore transparency entry: 962491974
- Sigstore integration time:
-
Permalink:
sinanata/amygdala@7db9c4692e2ebdae19cd3d75bc6438090bb92ba3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/sinanata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7db9c4692e2ebdae19cd3d75bc6438090bb92ba3 -
Trigger Event:
push
-
Statement type: