Skip to main content

Persistent Memory Kernel for AI Agents — crash recovery, shared memory, audit trail, real-time dashboard

Project description

🐙 Octopoda

The open-source memory operating system for AI agents.
Persistent memory · Loop detection · Audit trails · 3D visualization

PyPI Downloads License Python 3.9+ Tests Stars

Website · Docs · Dashboard · Quick start · MCP

Octopoda Neural Brain — 3D visualization of live agent activity

Live 3D view of 5 agents, 294 events, and 98 loops caught — $1.19 in wasted tokens detected.


Why Octopoda

  • Agents forget. Every session starts from zero. Octopoda gives them memory that survives restarts, crashes, and deployments — automatically.
  • Agents loop. A stuck agent can burn hundreds of dollars in tokens before anyone notices. Octopoda's 5-signal loop detector catches it in seconds.
  • Agents are black boxes. Why did it do that? Octopoda logs every decision, every write, every recovery — and visualizes it in a 3D view so you can actually see what's happening.

Quick Start

pip install octopoda
from octopoda import AgentRuntime

agent = AgentRuntime("my_agent")

That's it. Your agent now has persistent memory, loop detection, crash recovery, and an audit trail. Everything runs automatically in the background. Memory survives restarts, crashes, and deployments.

Store and retrieve memories when you need to:

agent.remember("key", "value")
agent.recall("key")

Want the dashboard? Run the server:

pip install octopoda[server]
octopoda

Open http://localhost:7842 — same dashboard as the cloud version, running against your local data. No account needed.

Want cloud sync across machines? Sign up free at octopodas.com, set your API key, and your agents sync to the cloud automatically:

export OCTOPODA_API_KEY=sk-octopoda-...

Same code, same dashboard — now backed by PostgreSQL with multi-device sync and team access.


Local vs Cloud

Local Cloud
Setup pip install octopoda Sign up at octopodas.com
Storage SQLite on your machine PostgreSQL + pgvector
Dashboard http://localhost:7842 octopodas.com/dashboard
Account needed No Yes (free)
Data stays on your machine Yes Stored on cloud
Multi-device sync No Yes
Semantic search Needs octopoda[ai] extra Built-in
Upgrade path Set OCTOPODA_API_KEY Already there

Start local, upgrade to cloud when you need sync or team access. Both use the same API, same dashboard design, same code.


What You Get Out of the Box

When you create an AgentRuntime, all of this is handled for you automatically:

  • Persistent memory — everything your agent stores survives restarts and crashes
  • Loop detection — catches agents stuck in repetitive patterns before they burn tokens
  • Audit trail — every decision, every write, every action is logged
  • Crash recovery — automatic heartbeat monitoring with snapshot/restore
  • Health scoring — continuous monitoring of memory quality and agent performance
  • Heartbeats — background thread tracks agent liveness

You don't need to configure any of this. It just works.


Dashboards

Track latency, error rates, memory usage, and health scores per agent.

Agent Performance

Browse every memory, inspect version history, and see exactly how an agent's knowledge changed over time.

Memory Explorer


Audit Trail

Every decision, crash, recovery, and anomaly your agents make is logged with full context — including a memory snapshot captured at the moment of decision. Replay any time window and see exactly what each agent knew, decided, and why.

Audit Trail

agent.log_decision(
    decision="Keep single VPS instead of Kubernetes",
    reasoning="Current traffic (14k req/day) doesn't justify K8s complexity. VPS handles 100x this load.",
    context={"current_rps": 14000, "threshold_rps": 1000000},
)

Every log_decision call automatically captures a snapshot of the agent's memory at that instant. The audit timeline shows decisions alongside crashes and recoveries, filterable per agent. Built-in loop detection warns you if a decision repeats a recent one.


Shared Memory

Multiple agents working on the same problem can share knowledge through named memory spaces. Writes are atomic, reads are immediate, and every change is logged with its author — so you always know which agent contributed what.

Shared Memory

# Research agent writes a finding into a shared space
research_agent.share("market_size", "$2.1B AI memory market by 2027", space="team-knowledge")

# Any other agent in the same space reads it
result = coding_assistant.read_shared("market_size", space="team-knowledge")
print(result.value)  # "$2.1B AI memory market by 2027"

Each space tracks authorship and timestamps for every write. Use agent.shared_conflicts(space="team-knowledge") to surface disagreements when multiple agents write to the same key.


When You Need More Control

Everything below is optional. Use it when you need it.

Semantic Search

Find memories by meaning, not just exact keys.

agent.remember("bio", "Alice is a vegetarian living in London")
results = agent.recall_similar("what does the user eat?")
# Returns the right memory with a similarity score

Agent Messaging

Agents can talk to each other through shared inboxes.

agent_a.send_message("agent_b", "Found a bug in auth", message_type="alert")
messages = agent_b.read_messages(unread_only=True)

Goal Tracking

Set goals and track progress. Integrates with drift detection.

agent.set_goal("Migrate to PostgreSQL", milestones=["Backup", "Schema", "Migrate", "Validate"])
agent.update_progress(milestone_index=0, note="Backup done")

Memory Management

agent.forget("outdated_config")                    # Delete specific memories
agent.forget_stale(max_age_seconds=30*86400)       # Clean up memories older than 30 days
agent.consolidate(dry_run=False)                   # Merge duplicate memories (omit dry_run to preview)
agent.memory_health()                              # Get a health report

Snapshots

agent.snapshot("before_migration")
# ... something goes wrong ...
agent.restore("before_migration")

Export / Import

bundle = agent.export_memories()
new_agent.import_memories(bundle)

Framework Integrations

Works with the frameworks you already use. Just swap in Octopoda and your agents get persistent memory.

LangChain — drop-in conversation memory
from octopoda import LangChainMemory
memory = LangChainMemory("my-chain")
memory.save_context({"input": "I prefer dark mode"}, {"output": "Got it!"})
variables = memory.load_memory_variables({})
CrewAI — persistent crew findings and task results
from octopoda import CrewAIMemory
crew = CrewAIMemory("research-crew")
crew.store_finding("researcher", "market_size", {"value": "$4.2B"})
finding = crew.get_finding("market_size")
AutoGen — multi-agent conversation memory
from octopoda import AutoGenMemory
memory = AutoGenMemory("dev-team")
memory.store_message("user_proxy", "assistant", "Research quantum computing")
history = memory.get_conversation_history()
OpenAI Agents SDK — thread and run persistence
from octopoda import OpenAIAgentsMemory
memory = OpenAIAgentsMemory()
memory.store_thread_state("thread_001", {"messages": [...]})
restored = memory.restore_thread("thread_001")

All integrations work locally (no API key) or with cloud sync (set OCTOPODA_API_KEY).


MCP Server

Give Claude, Cursor, or any MCP-compatible AI persistent memory with zero code.

pip install octopoda[mcp]

Add to Claude Code:

claude mcp add octopoda -s user -e OCTOPODA_API_KEY=sk-octopoda-YOUR_KEY -- python -m synrix_runtime.api.mcp_server

Or add to Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "octopoda": {
      "command": "python",
      "args": ["-m", "synrix_runtime.api.mcp_server"],
      "env": {
        "OCTOPODA_API_KEY": "sk-octopoda-YOUR_KEY"
      }
    }
  }
}

28 tools for memory, search, loop detection, goals, messaging, and more.


Cloud

Sign up free at octopodas.com for the dashboard, managed hosting, and cloud API.

export OCTOPODA_API_KEY=sk-octopoda-...

Or run octopoda-login to sign up from your terminal.

from octopoda import Octopoda

client = Octopoda()
agent = client.agent("my_agent")
agent.write("preference", "dark mode")
results = agent.search("user preferences")
Free Pro ($19/mo) Business ($49/mo) Scale ($99/mo)
Agents 5 25 75 Unlimited
Memories 5,000 250,000 1,000,000 5,000,000
AI extractions 100 10,000 50,000 Unlimited
Rate limit 60 rpm 300 rpm 1,000 rpm 5,000 rpm
Dashboard Yes Yes Yes Yes

How It Compares

Octopoda Mem0 Zep LangChain Memory
Open source MIT Apache 2.0 Partial (CE) MIT
Local-first Yes (SQLite) Cloud-first Cloud-first In-process
Loop detection 5-signal engine No No No
Agent messaging Built-in No No No
Audit trail Full history No No No
Crash recovery Snapshots + restore N/A No No
Shared memory Built-in No No No
MCP server 28 tools No No No
Semantic search Local embeddings Cloud embeddings Cloud embeddings Needs vector DB
Integrations LangChain, CrewAI, AutoGen, OpenAI LangChain LangChain Own only

Installation

pip install octopoda              # Core — everything you need to get started
pip install octopoda[ai]          # + Local embeddings for semantic search
pip install octopoda[nlp]         # + spaCy for knowledge graph extraction
pip install octopoda[mcp]         # + MCP server for Claude/Cursor
pip install octopoda[all]         # Everything

Configuration

Variable Default Description
OCTOPODA_API_KEY Cloud API key (free at octopodas.com)
OCTOPODA_LLM_PROVIDER none LLM for fact extraction: openai, anthropic, ollama
OCTOPODA_OPENAI_API_KEY Your OpenAI key for local fact extraction
OCTOPODA_EMBEDDING_MODEL BAAI/bge-small-en-v1.5 Local embedding model (33MB, CPU)
SYNRIX_DATA_DIR ~/.synrix/data Local data directory

Contributing

See CONTRIBUTING.md for setup instructions and guidelines.

Security

See SECURITY.md for reporting vulnerabilities.

License

MIT — use it however you want. See LICENSE.


Built by RYJOX Technologies | PyPI | Cloud API | Dashboard

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octopoda-3.1.5.tar.gz (11.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octopoda-3.1.5-py3-none-any.whl (11.3 MB view details)

Uploaded Python 3

File details

Details for the file octopoda-3.1.5.tar.gz.

File metadata

  • Download URL: octopoda-3.1.5.tar.gz
  • Upload date:
  • Size: 11.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for octopoda-3.1.5.tar.gz
Algorithm Hash digest
SHA256 88d17ff236993672c5557af5cec2e5e43654e9f1e8f0104107ba84821af3b3ab
MD5 519fd42bd86d6055dca2310fbf1187d7
BLAKE2b-256 525157003892c11ec3c11eac698072b9502edfb5eabf03b87711385d4edc7bdd

See more details on using hashes here.

File details

Details for the file octopoda-3.1.5-py3-none-any.whl.

File metadata

  • Download URL: octopoda-3.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for octopoda-3.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fdbac60b0fecfbba9957f0b0ce1717bae501bbb02d5f73ed4b5892f60826f253
MD5 cd7330b6f3308a46fa6949040f2466b9
BLAKE2b-256 79153183c9525dd8547cf20e55ab087f99faab9380ab84f87ca90fe07788b067

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page