Skip to main content

crewai-soul 🧠

The soul ecosystem for CrewAI agents.

One package, full stack:

  • Persistent Memory — Markdown-native, git-versionable, human-readable
  • Hybrid Retrieval — RAG + RLM via soul-agent
  • Database Intelligence — Auto-generated semantic layers via soul-schema
  • Managed Cloud Option — SoulMate handles memory infrastructure for you

Choose Your Setup

Setup Best For Storage
Local (default) Development, git-tracked projects SOUL.md + MEMORY.md files
SoulMate (managed) Production, teams, zero-infra Cloud API (we handle it)

Both use the same soul-agent RAG+RLM under the hood.

Install

pip install crewai-soul

This automatically installs:

  • soul-agent — Hybrid RAG+RLM memory
  • soul-schema — Database semantic layer generator

Quick Start

Basic Memory

from crewai import Crew, Agent, Task
from crewai_soul import SoulMemory

# Create markdown-based memory with full RAG+RLM
memory = SoulMemory()

# Use it with your crew
crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, writing_task],
    memory=memory,
)

result = crew.kickoff()

Your crew's memories are stored in MEMORY.md — human-readable, git-versionable, no database required.

Database Schema Intelligence

Give your agents understanding of database structure:

from crewai_soul import SchemaMemory

# Connect to any SQLAlchemy-compatible database
schema = SchemaMemory("postgresql://user:pass@host/db")

# Auto-generate semantic descriptions using LLM
schema.generate()

# Get context for natural language queries
context = schema.context_for("Show me revenue by region")
# Returns formatted markdown with relevant tables/columns

# Use in agent prompts
agent = Agent(
    role="Data Analyst",
    goal="Answer business questions with SQL",
    backstory=f"You have access to this schema:\n{schema.to_markdown()}"
)

Don't want to manage files? SoulMate is the managed version of soul-agent — same RAG+RLM, zero infrastructure:

from crewai_soul import SoulMateClient

client = SoulMateClient(
    api_key="your-key",
    tenant_id="your-org"
)

# Store memories in the cloud
client.remember("Critical decision: We're going with PostgreSQL", scope="/project/alpha")

# Semantic search across all memories
results = client.recall("database decisions")

# Full RAG+RLM question answering
answer = client.ask("What database did we choose for Project Alpha?")

Why crewai-soul?

Feature CrewAI Built-in crewai-soul
Storage Vector database Markdown files + optional vectors
Human-readable ❌ ✅
Git-versionable ❌ ✅
Database schema context ❌ ✅ (soul-schema)
Enterprise multi-tenant ❌ ✅ (SoulMate API)
RAG + RLM hybrid ❌ ✅ (soul-agent)
Infrastructure Database server None (or cloud API)

API Reference

SoulMemory

from crewai_soul import SoulMemory

memory = SoulMemory(
    soul_path="SOUL.md",      # Agent identity
    memory_path="MEMORY.md",  # Memory log
    provider="anthropic",     # LLM provider for RAG
    use_hybrid=True,          # Enable RAG+RLM (default: True if soul-agent installed)
)

# Store a memory
memory.remember("We decided to use PostgreSQL.", scope="/decisions")

# Recall relevant memories
matches = memory.recall("What database did we choose?", limit=5)
for m in matches:
    print(f"[{m.score:.2f}] {m.content}")

# Clear memories (optionally by scope)
memory.forget(scope="/decisions")

# Get stats
print(memory.info())

# View structure
print(memory.tree())

SchemaMemory

from crewai_soul import SchemaMemory

schema = SchemaMemory(
    database_url="postgresql://...",
    llm_provider="anthropic",
)

# Generate descriptions for all tables
schema.generate()

# Or specific tables only
schema.generate(tables=["customers", "orders"])

# Get single table description
info = schema.describe("customers")

# Generate context for a query
context = schema.context_for("revenue by region")

# Export in different formats
schema.save("schema.json", format="json")
schema.save("schema.yml", format="dbt")
schema.save("training.jsonl", format="vanna")

# Full markdown documentation
docs = schema.to_markdown()

SoulMateClient

from crewai_soul import SoulMateClient

client = SoulMateClient(
    api_key="...",              # or SOULMATE_API_KEY env var
    base_url="...",             # or SOULMATE_URL env var
    tenant_id="...",            # for multi-tenant isolation
)

# Store memories
client.remember("Important fact", scope="/project")

# Search
results = client.recall("important", limit=10)

# Full RAG+RLM Q&A
answer = client.ask("What do we know about...")

# Clear memories
client.forget(scope="/project")

# Get stats
info = client.info()

The Soul Ecosystem

crewai-soul brings together:

Package Purpose PyPI
soul-agent Persistent memory & identity pip install soul-agent
soul-schema Database semantic layers pip install soul-schema
crewai-soul CrewAI integration (this package) pip install crewai-soul

SoulMate API — Enterprise hosted service for production deployments.

License

MIT

Metadata

Release files for crewai-soul 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crewai-soul 0.3.1
File Size Uploaded Provenance
crewai_soul-0.3.1.tar.gz 17.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for crewai-soul 0.3.1
File Interpreter ABI Platform
crewai_soul-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / crewai_soul-0.3.1.tar.gz

Download URL crewai_soul-0.3.1.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f515ebb761b12a773668605ddd314ea59593d7a7f38816faeb0dbe1d41e35371
BLAKE2b-256 checksum
How to use checksums
6367110b97c1b3837ebefcf72fbd2a5547e8c58c33a89588d0fe02aeb43c7db1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / crewai_soul-0.3.1-py3-none-any.whl

Download URL crewai_soul-0.3.1-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5adf9910b8fde6d37de73496642e0082ff5454c8a90f028b9c12be4cafe679bf
BLAKE2b-256 checksum
How to use checksums
a146cd40269d0dab2cc672f5798c7fab0f19e26101e45164650f98236c18c0f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for crewai-soul 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page