Important
Distributed Long-Term Memory for Autonomous AI Agents
- Project: SomaFractalMemory
- Version: 0.2.0
- Classification: PROPRIETARY / COMMERCIAL SENSITIVE
- Status: Production Ready
SomaFractalMemory is a distributed long-term memory service for AI agents. It provides persistent vector storage with semantic search, enabling agents to recall past experiences and learned knowledge across sessions.
Core component of the Soma Cognitive Triad:
- SomaBrain: Processing & Reasoning
- SomaAgent01: Orchestration & Execution
- SomaFractalMemory: Storage & Recall (This Repo)
- Semantic Search: 768-dim embeddings via Milvus.
- Hierarchical Memory: Episodes (raw), Semantic (facts), Summaries (patterns).
- Multi-Tenancy: Crypto-isolated namespaces.
- Fractal Organization: Weighted importance and degradation graphs.
- Python: 3.12+
- Docker: 24.0+
- PostgreSQL: 15+ (Metadata)
- Milvus: 2.3+ (Vectors)
- Redis: 7.0+ (Cache)
- HashiCorp Vault: (Optional, Recommended for Secrets)
- Open Policy Agent: (Optional, Recommended for AuthZ)
# 1. Clone & Setup
git clone https://github.com/somatechlat/somafractalmemory.git
cd somafractalmemory
# 2. Configure Environment
cp .env.example .env
# EDIT .env WITH REAL CREDENTIALS
# 3. Launch Stack
docker compose -f infra/standalone/docker-compose.yml up -d| Variable | Description | Default |
| Variable | Description | Default |
|---|---|---|
SOMA_API_PORT |
API Service Port | 10101 |
SOMA_POSTGRES_URL |
Database Connection | postgresql://... |
SOMA_MILVUS_HOST |
Vector Store Host | localhost |
SOMA_REDIS_HOST |
Cache Host | localhost |
SOMA_VAULT_URL |
Vault URL (Secrets) | "" |
SOMA_OPA_URL |
OPA URL (AuthZ) | http://opa:10818 |
SOMA_OPA_FAIL_OPEN |
AuthZ Safety Mode | False (Fail Closed) |
# Start Django Server via Gunicorn/Uvicorn
gunicorn somafractalmemory.config.wsgi:application --bind 0.0.0.0:10101# Run tests
pytest tests/curl http://localhost:10101/healthz
# Returns: {"kv_store": true, "vector_store": true, "graph_store": true}POST /memories
{
"coord": "1.0,2.0,3.0",
"payload": { "content": "User prefers dark mode" },
"memory_type": "semantic"
}POST /memories/search
{
"query": "dark mode",
"top_k": 5
}- License: Apache 2.0
- Maintainer: SomaTech LAT
- Issues: GitHub Issues