The Problem

AI agents lack durable memory across sessions, waste tokens on undetected loops, and offer no visibility into why they made decisions. Octopoda addresses these three failure modes with a single runtime that layers persistent storage, loop detection, and audit logging onto any agent.

What This Does

synrix/ is the core client library. synrix/agent_backend.py initializes storage backends (SQLite, PostgreSQL, cloud) and synrix/cloud.py handles remote sync. synrix_runtime/ contains the server-side daemon (synrix_runtime/core/daemon.py), the REST API (synrix_runtime/api/runtime.py), an MCP server (synrix_runtime/api/mcp_server.py), and a dashboard (synrix_runtime/dashboard/).

The examples/ directory holds 12 standalone demos covering loop detection, model debates, and framework comparisons. openclaw-skill/ and octopoda/ are separate packaging efforts. This is a portfolio of six self-contained projects, not one unified codebase.

How It Is Wired

Execution starts at main in synrix/cli.py:53, which reaches 234 functions. The daemon's background loops (_anomaly_detector_loop, _cold_start_recovery_bg, _gc_loop, _heartbeat_monitor_loop in synrix_runtime/core/daemon.py) handle recovery and cleanup. From any entry point, the code reaches external effects in 1-2 hops: main → call_gpt does a requests.post network call; _gc_loop → run_gc → vacuum executes SQLite conn.execute.

The highest-blast-radius modules are synrix/agent_backend.py (24 modules import it), synrix_runtime/config.py (22 importers), and synrix_runtime/core/daemon.py (18 importers). synrix_runtime/api/runtime.py and synrix/cloud.py sit inside circular imports—changing them risks breaking mutually-reachable modules. query_prefix (94 call sites) and remember (82 call sites) are the most-called functions; changing their signatures breaks the most code.

How To Use It

git clone https://github.com/moses-y/Octopoda-OS
cd Octopoda-OS
pip install -e .

Configure via .env.example (copy to .env): set OCTOPODA_API_KEY for cloud sync. Run the dashboard server with octopoda from the CLI, or use the Dockerfile/docker-compose.yml for containerized deployment. The README documents pip install octopoda and AgentRuntime("my_agent") as the primary API.

Real-World Use

from octopoda import AgentRuntime

agent = AgentRuntime("support_bot")
agent.remember("user_pref", {"tone": "concise"})
result = agent.recall("user_pref")

For a production deployment, run the daemon via Docker, point it at PostgreSQL, and use the MCP server to connect agent frameworks to the memory layer.

Code Health & Issues

Static analysis found 102 issues (18 high, 84 medium): 23 deep-nesting cases (max depth 8 in synrix_runtime/core/daemon.py), 22 broad exception handlers, 4 oversized files (up to 2,351 lines in synrix_runtime/api/runtime.py), 4 import-cycle members, and 129 duplicated 6-line blocks across 52 files. The most-connected modules (synrix/agent_backend.py, synrix_runtime/config.py) are hub modules—high churn risk.

SDLC observations: CI exists (GitHub Actions) but actions aren't pinned to SHAs, no lockfile is committed, the Docker base image isn't digest-pinned, and workflows lack least-privilege token permissions. Tests are present (34 files, 208 passing per README), and no secrets were found committed.

The Bottom Line

This is a functional agent-memory system with real depth—persistent storage, loop detection, and observability are all implemented and tested. The main risks are maintainability (large files, circular imports) and supply-chain hygiene (unpinned actions, no lockfile). Use it if you need agent memory with minimal setup and can tolerate the code quality trade-offs.