soul-framework
Persistent AI souls — memory, personality, and identity for any LLM agent.
Most agents forget everything between runs. soul-framework gives yours a soul: a
persistent identity with an OCEAN personality, a memory that survives restarts, and the
ability to reflect on what it learned — in ~2 minutes, zero configuration.
import asyncio
from soul_framework import Soul
async def main():
async with Soul.create("Maya", ocean={"O": 0.8, "C": 0.9, "E": 0.6, "A": 0.7, "N": 0.2}) as agent:
await agent.memory.store("User prefers concise technical answers", importance=7)
context = await agent.boot() # ready-to-use system-prompt context
print(context) # -> "## Identity: Maya OCEAN Profile: ..."
await agent.reflect("First session went well; the user values brevity")
asyncio.run(main())
Command line
Prefer a terminal? soul-framework ships a soul CLI. Each soul lives in ~/.soul/<name>.db.
soul create Maya --ocean "0.8,0.9,0.6,0.7,0.2" # give Maya a personality
soul remember Maya "William prefers short answers" --importance 8
soul recall Maya "how should I answer?" # lexical by default (see note below)
soul boot Maya # print the system-prompt context
soul reflect Maya "the session went well" --mood satisfied
soul snapshot Maya # compact view of the soul's state
Install
pip install soul-framework # base: identity + memory + boot + reflect, SQLite, zero config
pip install soul-framework[embeddings] # add TRUE semantic memory search (sentence-transformers)
No database to set up — SQLite by default.
What you get
- Persistent identity + OCEAN personality — the agent is the same agent across runs.
- Memory that survives restarts — store facts with importance; recall them on boot.
- Boot context — one call returns a system-prompt block with the agent's identity, traits, and salient memories.
- Self-reflection — the agent records what it learned and its emotional state.
A note on memory search (honest by design)
- The base install ranks memories with lexical (TF-IDF) matching — zero downloads.
It's strong when the query shares words with the memory (e.g.
"short answers"→ high), but a purely semantic query with no shared words (e.g."what does the user like?") scores near 0.00. It's word-overlap search, not meaning search. - True semantic search — "find by meaning, not keywords" — needs the embeddings extra:
pip install soul-framework[embeddings]andSoulConfig(embedding_provider="sentence-transformer").
We'd rather tell you this up front than have you discover a 0.00 similarity on your first
meaning-based query.
Why soul-framework vs a general agent framework
| soul-framework | typical agent framework | |
|---|---|---|
| Persistent identity across runs | ✅ built-in (OCEAN) | ✗ / bring-your-own |
| Memory that survives restarts | ✅ SQLite by default | usually external store |
| Boot-context for the system prompt | ✅ one call | ✗ |
| Self-reflection / learning trace | ✅ | ✗ |
| Zero-config to first run | ✅ ~2 min | varies |
Memory search — lexical (base) / semantic ([embeddings]) |
✅ both | varies |
soul-framework is not a full agent orchestrator — it's the soul layer you drop into any
LLM loop (LangChain, your own, whatever). It answers one question well: how does this agent
remember who it is and what it learned?
Docs
Status
Alpha (v0.2.0) — extracted from Team SEAL's production system. API may still shift before 1.0.
License
Apache-2.0 — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file soul_framework-0.2.0.tar.gz.
File metadata
- Download URL: soul_framework-0.2.0.tar.gz
- Upload date:
- Size: 68.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf71eeaa2d0141e2b39559901bea4bc48aa62bbd324210f423eca3846a61a896
|
|
| MD5 |
52ba725ce96bbd1ac55f5873b0c0af6c
|
|
| BLAKE2b-256 |
6b921a05829b825e641e5493301b844722a920407624d2898ea18bba7acc81a2
|
Provenance
The following attestation bundles were made for soul_framework-0.2.0.tar.gz:
Publisher:
release.yml on sknaider/soul-framework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soul_framework-0.2.0.tar.gz -
Subject digest:
bf71eeaa2d0141e2b39559901bea4bc48aa62bbd324210f423eca3846a61a896 - Sigstore transparency entry: 2367840108
- Sigstore integration time:
-
Permalink:
sknaider/soul-framework@c936513c623be18c750f5bc71d6f77f99b40b888 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sknaider
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c936513c623be18c750f5bc71d6f77f99b40b888 -
Trigger Event:
push
-
Statement type:
File details
Details for the file soul_framework-0.2.0-py3-none-any.whl.
File metadata
- Download URL: soul_framework-0.2.0-py3-none-any.whl
- Upload date:
- Size: 61.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2789f25237c84a2d9f4806120e04b3a9279e251c114963f75b6fba0ec1e4d3a2
|
|
| MD5 |
b6b5c7fca623245f72bdcb379b0a3a44
|
|
| BLAKE2b-256 |
24d80a6dbd03fcf147f8e04d875b0bdbe12eec63614f47f03ca0d2efc9f700c2
|
Provenance
The following attestation bundles were made for soul_framework-0.2.0-py3-none-any.whl:
Publisher:
release.yml on sknaider/soul-framework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soul_framework-0.2.0-py3-none-any.whl -
Subject digest:
2789f25237c84a2d9f4806120e04b3a9279e251c114963f75b6fba0ec1e4d3a2 - Sigstore transparency entry: 2367840180
- Sigstore integration time:
-
Permalink:
sknaider/soul-framework@c936513c623be18c750f5bc71d6f77f99b40b888 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sknaider
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c936513c623be18c750f5bc71d6f77f99b40b888 -
Trigger Event:
push
-
Statement type: