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

Bypassing NemoClaw Sandbox Isolation for Local Nemotron 9B Agent
A developer bypassed NemoClaw's sandbox isolation to run a fully local agent using Nemotron 9B with tool calling on a single RTX 5090. The approach involved iptables configuration, a custom TCP relay, and real-time tool call translation.

Grape Root Tool Reduces Claude Code Token Usage by Caching Repository Context
A free experimental tool called Grape Root addresses redundant token consumption in Claude Code by maintaining lightweight state about previously explored repository files, preventing unnecessary re-reads of unchanged files during follow-up prompts.

Claude Code + MCP generates test suites from source code
Claude Code analyzes source code to generate hierarchical test suites covering modules, features, scenarios, happy paths, edge cases, and error handling, then pushes them to test management systems via MCP.

memv MCP Server: Persistent Structured Memory for AI Agents
memv, an open-source Python memory layer for agents, now ships with an MCP server. It provides five tools for persistent, structured memory with per-user isolation and LLM-optional extraction.