Open Source Projects
Tools and libraries we've built and released to the community. All MIT licensed, all actively maintained.
soul.py
FeaturedPersistent identity and memory for any LLM agent
Your AI forgets everything when the conversation ends. soul.py fixes that β from simple markdown injection to full RAG + RLM hybrid retrieval. v0.1 uses pure markdown files. v2.0 indexes those memories and automatically routes queries to semantic search (RAG) or exhaustive reasoning (RLM) based on what the question needs. Human-readable files you can edit and git-version, with intelligent retrieval under the hood.
pip install soul-agent π₯ Community Response
soul.py hit #1 on r/ollama with 50,000+ views in under 48 hours.
soul.py β Persistent memory for any LLM in 10 lines (works with Ollama, no database)
by u/the_ai_scientist in r/ollama
π The Book β Now on Amazon!
Soul: Building AI Agents That Remember Who They Are β the complete guide to persistent AI memory. Covers identity vs memory architecture, RAG + RLM hybrid retrieval, multi-agent coordination, and Darwinian evolution of agent identity. Working code in every chapter.
β Get on Amazon | β Gumroad Bundle (PDF + setup wizard + cheatsheets)
π€ Meet Darwin β the AI companion built with soul.py that helps you explore the book. A living demonstration of everything it teaches.
πΊοΈ Roadmap
Planned features and improvements. PRs welcome!
Vector Database Support
- β Qdrant (current)
- β ChromaDB (local, zero-config) v0.1.2
- π RuVector β self-learning vector DB (GNN improves search over time, tamper-proof audit chain, graph queries, MIT/free forever) β github.com/ruvnet/ruvector
- π² pgvector (PostgreSQL)
- π² FAISS (local, fast)
- π² Pinecone (cloud)
- π² Weaviate
Embedding Providers
- β Azure OpenAI (current)
- β OpenAI direct v0.1.2
- π² Cohere
- π² Local embeddings (sentence-transformers)
- π² Ollama embeddings
CLI & Developer Experience
- β
soul initwizard - β
soul chatinteractive CLI v0.1.2 - β
soul statusmemory stats v0.1.2 - β Graceful Ollama/local handling in CLI v0.1.3
- β
soul modulizememory segmentation v0.2.0 - β
soul moduleslist/reindex v0.2.0 - π²
config.yamlfile support - π² VSCode extension
Memory Features
- β Timestamped conversation logging
- β RAG + RLM hybrid routing
- β Modulizer β auto-segment large memory into indexed modules v0.2.0
- β Two-phase retrieval β read index, fetch relevant modules only v0.2.0
- π² Automatic memory summarization
- π² Memory importance scoring
- π² Tiered memory (hot/warm/cold)
- π² Archive-before-prune β index to vector DB before deleting old files
- π² Frozen storage β S3/GCS backup for disaster recovery
- π² Memory export/import
- π Typed memory structures β classify memories as World Facts, Experiences, Opinions, or Mental Models for more precise retrieval
- π Confidence scores β attach confidence weight to stored beliefs; memories reinforced over time carry higher weight in retrieval
- π
reflect()operation β periodic synthesis of raw memories into higher-order mental models; makes soul.py compound knowledge over time, not just accumulate it - π Temporal decay weighting β recent memories score higher in retrieval; configurable decay curve
Retrieval Enhancements
- π² LLM Reranking β score/filter RAG results before generation
- π Hybrid retrieval (semantic + BM25) β parallel keyword + vector search with score fusion; catches exact terms that drift in embedding space
- π² Hybrid search β combine BM25 + semantic scores
- π² Query expansion β LLM rewrites query for better recall
- π² Dynamic snippet extraction β context windows around matches
Integrations
- β Anthropic Claude
- β OpenAI
- β Ollama / OpenAI-compatible
- β Google Gemini v0.1.6
- β LangChain memory backend langchain-soul v0.1.1
- β LlamaIndex integration llamaindex-soul v0.1.1
- π² n8n node (official)
Multi-agent orchestration in ~100 lines. No magic.
CrewAI has 15,000 lines of code. LangGraph requires a PhD to debug. litecrew is ~150 lines you can read during lunch. It does less β that's the feature. Define agents, hand off between them, track tokens. When you need more, graduate to CrewAI + crewai-soul.
pip install litecrew β¨ What It Does
- β Agent: model + tools + system prompt
- β Sequential: A β B β C handoffs
- β Parallel: Fan out to multiple agents
- β Tools: OpenAI function calling format
- β Tokens: Built-in usage tracking
- β Memory: Optional soul-agent integration
π« What It Doesn't (By Design)
- No hierarchical agent management
- No complex state machines
- No streaming, callbacks, or YAML config
- No human-in-the-loop workflows
If you need these, fork it or graduate to CrewAI.
π SoulSearch
v0.3AI browser extension with private memory, Ollama support, and browser automation.
SoulSearch brings persistent memory and identity directly into Chrome. v0.3 adds Ollama support β run local LLMs with no API keys. Agent mode browses pages, fills forms, and searches the web. Memory stored in a private Git repo you control.
git clone https://github.com/menonpg/soulsearch && git checkout feat/ollama-support Your digital estate vault β encrypted, AI-queryable, with a dead man's switch
When someone dies, their family spends months hunting for documents. soul-legacy fixes that. Store your assets, insurance, wills, debts, beneficiaries, and final wishes in one encrypted vault. Upload documents and ask questions in plain English. Configure a dead man's switch to automatically grant scoped access to your designated inheritors when the time comes.
pip install soul-legacy Auto-document your data warehouse in 3 minutes
You inherit 100 tables. Zero docs. Columns named cust_ltv, flg_b2b, reg_cd.
The person who knew what they meant left in 2019. soul-schema connects to any database, reads the schema,
and uses an LLM to generate human-readable descriptions for every table and column. Corrections are
"locked" β future runs won't overwrite your edits. The semantic layer learns over time.
pip install soul-schema The soul ecosystem for CrewAI agents
CrewAI's built-in memory is a black box. crewai-soul stores memories in human-readable markdown files you can edit and git-version. Same drop-in API, full RAG+RLM hybrid retrieval under the hood via soul-agent. Choose local (file-based) or managed (SoulMate API) β same great memory either way.
pip install crewai-soul β¨ What's Included
- soul-agent: RAG + RLM hybrid memory (required dep)
- soul-schema: Database semantic layers (required dep)
- SoulMateMemory: Drop-in managed cloud backend
- SchemaMemory: Database context for Text-to-SQL agents
The soul ecosystem for LangChain
Drop-in persistent memory for LangChain. Same soul-agent RAG+RLM, same SoulMate cloud option, same SchemaMemory for database intelligence. Works with ConversationChain, RunnableWithMessageHistory, and any LangChain component that uses memory.
pip install langchain-soul The soul ecosystem for LlamaIndex
Drop-in chat storage for LlamaIndex. Uses soul-agent's hybrid RAG+RLM retrieval under the hood. Works with ChatMemoryBuffer, FunctionAgent, and any LlamaIndex component that uses chat stores. Same file-based or SoulMate cloud options as the rest of the ecosystem.
pip install llamaindex-soul π³ soul-stack
NewOne Docker command to give n8n persistent memory
n8n is stateless by design β every workflow execution starts fresh. soul-stack fixes that. A single Docker container running n8n + soul.py + Jupyter Lab. Your workflows can now remember previous interactions, build context over time, and make intelligent decisions based on history. Works with Anthropic, OpenAI, or 100% local with Ollama.
docker run -d -p 8000:8000 -p 8888:8888 -p 5678:5678 -e ANTHROPIC_API_KEY=sk-ant-... pgmenon/soul-stack:latest β¨ Features (v0.1.3)
- Multi-provider: Anthropic, OpenAI, or Ollama (100% local)
- Backend selection: BM25 (default), ChromaDB, or Qdrant via
SOUL_BACKEND - OpenAI embeddings: Direct support, not just Azure
- CLI tools:
soul chatandsoul statuswith graceful Ollama handling
Looking for Enterprise?
SoulMate brings soul.py to production at scale β HIPAA-compliant healthcare, telecom support for millions of customers, financial services personalization. The commercial embodiment of persistent AI memory.
Licensing: The SoulMate API backend (soulmate-api) is source-available under BSL 1.1. Self-host freely, deploy on your own cloud β you just can't resell it as a competing hosted service. Automatically converts to MIT on March 4, 2030. Also available on Docker Hub.
Learn About SoulMate βWant to Contribute?
All projects welcome PRs. Check the GitHub issues for good first contributions, or open a discussion if you have ideas.