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

✍️ OpenClawRadar📅 Published: March 2, 2026🔗 Source
soul.py adds persistent memory to local LLMs with simple file-based approach
Ad

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 init

Example 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."

Ad

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

Ad

👀 See Also

Visual Studio 2022 Extension Adds Native Ollama Integration for Local LLMs
Tools

Visual Studio 2022 Extension Adds Native Ollama Integration for Local LLMs

A free extension for Visual Studio 2022 connects directly to local Ollama endpoints, enabling private AI coding assistance without switching between tools. It supports models like DeepSeek and Llama 3 with cloud fallback options.

OpenClawRadar
Skill Bill: A Markdown-Based Governance Framework for AI Coding Skills
Tools

Skill Bill: A Markdown-Based Governance Framework for AI Coding Skills

A developer built Skill Bill, a framework of 44 Markdown-based AI skills for Kotlin, Android/KMP, PHP, and Go that addresses prompt management problems like naming drift and duplicated logic. It includes orchestrator skills like 'feature-implement' that chain 10-12 skill invocations and syncs to Claude Code, Copilot, GLM, and Codex.

OpenClawRadar
Any Buddy v2.0.0 Adds Preview Feature for Claude Code Buddies
Tools

Any Buddy v2.0.0 Adds Preview Feature for Claude Code Buddies

Any Buddy v2.0.0 introduces a preview feature that lets users test different buddies before applying them to Claude code, along with platform-specific fixes for Linux, Mac, and Windows. The tool has gained 160 GitHub stars since its release.

OpenClawRadar
IUM: MCP Symbol Indexer Cuts AI Agent Token Usage by 15.9x vs grep
Tools

IUM: MCP Symbol Indexer Cuts AI Agent Token Usage by 15.9x vs grep

IUM indexes codebases into an SQLite matrix of symbol events, exposing exact file:line coordinates, call graph tracing, and semantic search via MCP. Benchmarked against DataFusion (1,538 files) showing 15.9x fewer tokens than grep for equivalent queries.

OpenClawRadar