soul.py adds persistent memory to local LLMs with simple file-based approach

soul.py is a Python library that provides persistent memory for local LLM sessions by storing conversation history in human-readable markdown files, eliminating the need for databases or running servers.
How it works
The library creates two markdown files: SOUL.md for identity information and MEMORY.md for conversation logs. Every time you call agent.ask(), the system reads both files into the system prompt, processes the query, then appends the exchange to MEMORY.md. This allows memory to survive across processes and sessions.
Basic usage
Installation and setup:
pip install soul-agent
soul initExample implementation with Ollama:
from soul import Agent
agent = Agent(
provider="openai-compatible",
base_url="http://localhost:11434/v1",
model="llama3.2",
api_key="ollama"
)
agent.ask("My name is Prahlad, I'm working on an AI research lab.")
Later, in a new session:
agent.ask("What do you know about me?")
Returns: "You're Prahlad, working on an AI research lab."
Key features
- Works with Ollama, OpenAI, and Anthropic models
- No database or server required
- Human-readable markdown files
- Git-versionable and editable by hand
- Memory persists across processes and sessions
- Built specifically for adding persistent memory to local models
The tool was created to solve the problem of local LLMs forgetting information between sessions, providing a lightweight alternative to database-backed solutions.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Fixing Context Bloat in Claude Code Auto-Memory with a Naming Schema and Audit Script
A Claude Code skill enforces a 3-type naming schema, required frontmatter, and a bash audit script to deduplicate memory files and reduce context load.

Claude Session Tracker: Auto-Save Claude Code Sessions to GitHub Issues
A new tool called claude-session-tracker automatically saves Claude Code sessions to GitHub Issues, logging every prompt and response as comments with timestamps. It creates one GitHub Issue per session linked to a Projects board and works through Claude Code's native hook system without consuming context tokens.

RelayPlane Open Source Proxy Shows 73% Cost Reduction with Claude Model Routing
RelayPlane, an open source npm-native proxy for the Anthropic API, demonstrated 73.4% cost savings in benchmarks by routing requests to appropriate Claude models based on complexity. The tool reduced cost per 10 requests from $0.0323 to $0.0086 while improving p50 latency from 1.55s to 0.78s.

OpenClaw skill reduces accessibility tree tokens from 600K to 1.3K for ad-heavy sites
A developer built an OpenClaw skill that uses ML-based element ranking to prune accessibility trees, cutting slickdeals.com from ~598K tokens to ~1.3K tokens by keeping only the top ~50 actionable elements.