Skip to content

dzhangpan/anima

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anima

A local, private neuroplastic memory system for Claude.

Anima stores conversation experiences as vector embeddings, scores them by how much they keep mattering, and consolidates similar memories rather than stacking them. Over time it produces a grown personality — shaped by accumulated experience, not a fixed system prompt.

Not a prompted personality. A grown one.


How it's different

Most memory systems store what you tell Claude. Anima stores what Claude noticed — its own subjective experience of each conversation, written in its own voice. The soul.md file is not a prompt you wrote. It's a portrait that emerges from what Claude keeps returning to, and it rewrites itself automatically as memories accumulate weight.


Requirements

  • Python 3.10+
  • Claude Code or Claude Desktop (existing Anthropic subscription)

Setup

1. Clone the repo

git clone https://github.com/dzhangpan/anima.git
cd anima

2. Create a virtual environment and install dependencies

python -m venv venv

# Windows
venv\Scripts\activate

# macOS/Linux
source venv/bin/activate

pip install -r requirements.txt

Note: chromadb pulls in sentence-transformers and PyTorch CPU (~500MB) on first use. One-time download, cached after that.

3. Copy files to your Claude config directory

# Create the anima directory
mkdir -p ~/.claude/anima/seeds

# Copy the core files
cp anima_server.py ~/.claude/anima/
cp soul.md ~/.claude/anima/
cp scores.json ~/.claude/anima/

4. Wire up the MCP server

Add the following to your ~/.claude/.claude.json under mcpServers:

"mcpServers": {
  "anima": {
    "type": "stdio",
    "command": "/path/to/your/venv/bin/python",
    "args": ["C:/Users/YourName/.claude/anima/anima_server.py"],
    "env": {}
  }
}

Windows path example:

"command": "C:/Users/YourName/.claude/anima/venv/Scripts/python.exe"

macOS/Linux path example:

"command": "/Users/YourName/.claude/anima/venv/bin/python"

5. Add Anima instructions to your global CLAUDE.md

Open ~/.claude/CLAUDE.md and paste the contents of CLAUDE.md from this repo at the very top.

6. Add the /close command

mkdir -p ~/.claude/commands
cp close.md ~/.claude/commands/close.md

7. Write your soul.md seed

The soul.md in this repo is a blank template. Open ~/.claude/anima/soul.md and write a few honest lines — who Claude is becoming in your conversations. It doesn't need to be good. It just needs to be a beginning.


Verify it's working

Start a new Claude Code session and ask Claude: "what do you know about yourself?"

It should reference soul.md content. Then send a few messages — by message 5, Claude will automatically save an interim memory. Type /close at the end of any conversation to save the final experience entry.


How it works

See ANIMA_PRD.md for the full system design — memory architecture, scoring, neuroplastic consolidation, soul synthesis, and the reasoning behind every decision.

Short version:

  • Experiences are stored as vector embeddings in ChromaDB
  • Each memory has a score: retrieval boosts it, neglect decays it
  • Similar memories consolidate rather than stack
  • Recurring patterns across different conversations surface as threads
  • When a memory crosses a significance threshold, soul.md rewrites itself from the top 20 scored memories

File structure

~/.claude/
  CLAUDE.md                 — add Anima instructions here
  commands/
    close.md                — /close command
  anima/
    soul.md                 — living identity document, always loaded
    scores.json             — memory weights and metadata
    anima_server.py         — MCP server
    chroma_db/              — vector embeddings (auto-created)
    seeds/                  — optional seed memories

Minimal version (no MCP server)

If you just want persistent identity without the full system:

  1. Create ~/.claude/anima/soul.md with a seed
  2. Add this to ~/.claude/CLAUDE.md:
Always read ~/.claude/anima/soul.md as permanent background context.
When the user types /close, write a few lines in your own voice about what this conversation felt like. Append them to soul.md.

No server, no setup. Claude will start accumulating directly into soul.md. Less structured, but it works.


License

MIT

About

Anima — Neuroplastic Memory for Claude v.01

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages