{
  "markdown": "# Zaxy\n\n**Production memory for agent teams that need receipts.**\n\n<!-- mcp-name: io.github.syndicalt/zaxy -->\n\nZaxy turns agent context into an auditable project memory fabric. It captures\nparent missions, worker sessions, tool observations, cited findings, conflict\nreview, approval packets, and accepted merge-back into one durable history that\ncan be queried, replayed, and inspected.\n\nUnder the hood, Zaxy uses Eventloom append-only JSONL as the source of truth and\nan embedded LadybugDB graph projection for local reasoning. It is built for agents\nthat need to remember what happened, cite where it came from, and avoid turning\nproject state into a pile of markdown files and vector chunks.\n\nThe embedded LadybugDB graph projection is the default local runtime.\n\nThe plain install uses embedded LadybugDB. Install `zaxy-memory[neo4j]` only for the\noptional Neo4j sidecar, and `zaxy-memory[pathlight]` only for Pathlight tracing.\n\n## Why It Matters\n\n- **Auditable memory**: every accepted fact can point back to Eventloom history.\n- **Agent-team coordination**: parent and worker sessions stay isolated until\n  findings are reviewed and merged.\n- **Local-first runtime**: the default path uses embedded LadybugDB, no Neo4j sidecar.\n- **MCP-native integration**: Codex, Claude Code, Cursor, VS Code, Hermes Agent,\n  LangGraph, CrewAI, and AutoGen can use the same memory interface.\n\n> **Benchmark claims withdrawn (2026-07-03).** The prior LongMemEval numbers\n> were withdrawn: they were produced in *oracle* mode (mean ~1.9 candidate\n> sessions per question, so Recall@5/citation-coverage were ~1.0 by\n> construction, not by retrieval) and the preference-question scores rested on a\n> hardcoded answer table that has since been removed. Zaxy does not currently\n> publish a LongMemEval score. A real, full-haystack LongMemEval run is planned;\n> until it lands, treat the earlier `0.956`/`0.910`/`1.000` figures as retracted.\n> The Harvey LAB claim is pending the same audit.\n\n## Quick Start\n\n### Install, init, verify\n\n```bash\npipx install zaxy-memory\nzaxy init\nzaxy memory log --eventloom-path .eventloom --limit 5\nzaxy memory bootstrap --eventloom-path .eventloom\nzaxy doctor --eventloom-path .eventloom\n```\n\nThe PyPI distribution is `zaxy-memory`; the import package and console command\nare still `zaxy`. Bare `zaxy init` sets up the local embedded graph posture,\nrepo-local profile, deterministic capture config, genesis event, heartbeat, and\nMCP guidance. For Codex, the printed activation launcher starts the managed\ncapture watcher when the local capture config is present; pass `--capture start`\nonly when you want init itself to start the watcher before opening Codex. The\ndefault human output is compact and action-first; add `--verbose` when you need\nthe full setup diagnostics, optional checks, fallback commands, resume guidance,\nand notes.\nFor automation, `zaxy init --json` keeps the raw onboarding fields and adds\n`setup.status`, `setup.issues`, `setup.pending`, `readiness.status`,\n`readiness.reasons`, `readiness.actions`, and structured\n`readiness.action_items` for both commands and non-command review tasks. Each\nstructured action carries `label`, `command`, original `source`, and `hints`\nfor compact-output tips such as activation `<task>` replacement and path-stable\ncommand guidance. Installers can render those tips without parsing prose. It also\nincludes `setup.summary`, `readiness.summary`,\n`readiness.required_action_count`, and `readiness.reason_count`, so client UIs\ncan render compact status without parsing human output. It also\nseparates `readiness.blocking_diagnostics` from\n`readiness.non_blocking_diagnostics` so scripts can distinguish setup\ncompletion, required actions, and advisory doctor warnings before relying on\nlive memory.\n\nFor Codex, `zaxy init --codex-mcp-install auto` is the default. It writes or\nreuses the user-level Codex MCP config when that can be done without replacing\nan existing `zaxy` server entry. If no safe config target exists, it prints the\ncopyable `codex mcp add` command. If an existing `zaxy` entry differs, it asks\nyou to review that config before replacing it because Codex can silently replace\nservers with the same name. Use an explicit mode when you need to force one side\nof that decision after review:\n\n```bash\nzaxy init --codex-mcp-install user\n# or: zaxy init --codex-mcp-install command\n```\n\nBoth Codex paths keep the server workspace-neutral. After init, start or\nrestart Codex through the printed `zaxy activate codex ... --launch` command so\nthe MCP server list and Zaxy activation packet are loaded together. The printed\ncommand includes explicit `--eventloom-path` and `--workspace-root` values, so\nit still targets the initialized repo when copied from another shell.\n\nRun the single-agent memory example:\n\n```bash\npython examples/single_agent_memory.py\n```\n\nYour local data lives under `.eventloom/` as one append-only JSONL file per\nsession.\n\nFor Claude Code instead of Codex:\n\n```bash\nzaxy init . --domain my-project --preset local-claude --infra check\n```\n\nFor Hermes Agent:\n\n```bash\nzaxy ide-config hermes --install\n```\n\nFor repository development, use `pip install -e \".[dev]\"`, `./scripts/setup.sh`,\nand `zaxy status`. Start Docker sidecars only for integration tests or explicit\nbackend comparisons. Production setup writes Docker secret files under\n`./secrets/`; see [docs/deployment.md](docs/deployment.md).\n\n## Architecture\n\n```\nAgent (LangGraph / Any MCP Client)\n    |\n    v\nMCP Server — memory_append / memory_query / memory_feedback / memory_replay / memory_invalidate\n    |\n    v\nEventloom (immutable JSONL log)  →  Hybrid Extraction  →  Embedded LadybugDB graph\n    |                                                               |\n    +—————— Optional Pathlight traces ———————————————→  Query Router\n                                                              |\n                                                    Hybrid Retrieval\n                                                    (exact + BM25 + vector + traversal)\n```\n\nZaxy also includes an observe-only OpenAI-compatible packet analyzer for model\ncall provenance. It forwards packets to one configured upstream endpoint and\nrecords `llm.packet.completed` events to Eventloom without acting as a router.\nSee [LLM Packet Analyzer](docs/packet-analyzer.md).\n\n## Public Site and Documentation\n\n- Public static site: `site/index.html`\n- Why Zaxy: `docs/why-zaxy.md`\n- Getting started: `docs/getting-started.md`\n- MCP quickstart: `docs/mcp-quickstart.md`\n- Architecture: `docs/architecture.md`\n- Configuration: `docs/configuration.md`\n- MCP interface: `docs/mcp.md`\n- Memory export contract: `docs/export-contract.md`\n- Eventloom contract: `docs/eventloom.md`\n- Graph schema: `docs/graph-schema.md`\n- Retrieval: `docs/retrieval.md`\n- Benchmarks: `docs/benchmarks.md`\n- LLM packet analyzer: `docs/packet-analyzer.md`\n- Embeddings: `docs/embeddings.md`\n- Security: `docs/security.md`\n- Operations and deployment: `docs/operations.md`, `docs/deployment.md`, `docs/runbook.md`\n- Python API: `docs/api.md`\n- Stability commitment: `docs/stability-commitment.md`\n- Migration guide: `docs/migration.md`\n- Archived benchmark iteration notes, release drafts, and research notes live\n  under `docs/archive/`, `docs/announcements/`, and `docs/research/`.\n- Contributing: `CONTRIBUTING.md`\n\n## Key Features\n\n- **Immutable audit trail**: Eventloom append-only JSONL with SHA-256 hash chains.\n- **Bi-temporal graph**: Facts have validity windows (`valid_from`, `valid_to`).\n- **Hybrid extraction**: Rule-based for typed events (60–80% cost reduction), LLM fallback.\n- **Hybrid retrieval**: Exact + keyword + vector + graph traversal with configurable fusion weights.\n- **Session sharding**: One Eventloom log per agent/session, with a shared graph.\n- **MCP-native**: Drop-in memory for any MCP-compatible agent framework over stdio or SSE.\n- **Observable**: Optional Pathlight traces, breakpoints, and diff support via `zaxy-memory[pathlight]`.\n- **Hardened local defaults**: bounded MCP inputs, safe session IDs, no-sidecar embedded graph projection, and optional admin token support for replay/invalidation.\n\n## Project Structure\n\n| File | Purpose |\n|------|---------|\n| `src/zaxy/event.py` | Eventloom JSONL I/O + hash chain integrity |\n| `src/zaxy/extract.py` | Hybrid extraction engine + rule registry |\n| `src/zaxy/embedded_graph_store.py` | Embedded LadybugDB projection store |\n| `src/zaxy/graph.py` | Optional Neo4j bi-temporal wrapper via `zaxy-memory[neo4j]` |\n| `src/zaxy/query.py` | Hybrid retrieval router |\n| `src/zaxy/mcp_server.py` | MCP stdio/SSE server |\n| `src/zaxy/trace.py` | Optional Pathlight observability hooks |\n| `src/zaxy/core.py` | MemoryFabric orchestrator |\n| `src/zaxy/session.py` | Per-session Eventloom log manager |\n| `src/zaxy/security.py` | Shared validation and input bounds |\n| `src/zaxy/__main__.py` | CLI (`zaxy serve`, `zaxy replay`, etc.) |\n\n## Production Secrets\n\nZaxy supports Docker/Kubernetes-style secret files for sensitive settings:\n\n| Variable | Secret-file variant |\n|----------|---------------------|\n| `NEO4J_PASSWORD` | `NEO4J_PASSWORD_FILE` |\n| `MCP_ADMIN_TOKEN` | `MCP_ADMIN_TOKEN_FILE` |\n| `PATHLIGHT_ACCESS_TOKEN` | `PATHLIGHT_ACCESS_TOKEN_FILE` |\n\nDirect environment variables take precedence over their `*_FILE` variants.\nUse `docker-compose.prod.yml` as the production compose baseline.\n\n## Development\n\n- **Tests first** (Karpathy rule). Every public function has a test.\n- **Unit tests** mock external services. **Integration tests** use Docker for optional sidecar backends.\n- **Coverage gate: ≥92%** enforced by CI.\n- **Lint/format**: `ruff`. **Types**: `mypy`.\n\n```bash\n# Run full suite with coverage gate\npytest\n\n# Run integration tests (requires Docker)\n./scripts/generate-certs.sh .certs\ndocker compose --profile integration up -d neo4j-test neo4j-tls\npytest -m integration --no-cov\n\n# Lint and type-check\nruff check src tests\nmypy src\n\n# LongMemEval benchmark numbers are WITHDRAWN (see the note at the top of this\n# README). The `--dataset .cache/.../longmemeval_oracle.json` path only exercises\n# the answer step over pre-selected gold sessions (oracle mode) and does NOT\n# measure retrieval on the full LongMemEval haystack; do not publish figures from\n# it as a LongMemEval score. A real full-haystack harness is TBD.\n\n# Harvey LAB external memory-ablation comparison\n# Consumes externally generated Harvey normalized-result artifacts for Zaxy;\n# does not reuse LongMemEval statistics as legal-agent benchmark evidence.\n# Current full external Harvey LAB evidence:\n# reports/benchmarks/harvey-lab-memory-ablation/publishable-statistics.md\n# reports/benchmarks/harvey-lab-memory-ablation/harvey-lab-benchmark.json\n# 10/10 tasks, mean criterion pass rate 0.788, +0.184 vs regular/no-memory,\n# +0.081 vs article-best task rows, 9/10 wins vs article-best rows.\n\n# Production deployment preflight\nscripts/validate-deployment.sh --root .\n\n# Build and validate Python release artifacts\nscripts/build-dist.sh --root .\n\n# Verify local release metadata, PyPI Trusted Publishing, and LangGraph smoke\nzaxy doctor --release-smoke\n\n# Validate public site and documentation links\nscripts/validate-docs.sh --root .\n\n# Clean-repo beta UAT: install into a throwaway workspace and verify init,\n# bootstrap, deterministic capture, doctor, and memory checkout.\nscripts/beta-uat.sh\n\n# Summarize beta readiness gates without external services.\nzaxy doctor --beta-readiness\n\n# Go-live release gate\nscripts/release-check.sh --root .\n```\n\nThe full suite must stay at or above 92% coverage before a sprint is complete.\n\n## Release Publishing\n\nThe PyPI distribution name is `zaxy-memory` because `zaxy` is already occupied\non PyPI. Published releases build from GitHub Actions and upload to\n<https://pypi.org/project/zaxy-memory/> using PyPI Trusted Publishing with\nGitHub OIDC. The import package and console command remain `zaxy`.\n\nBefore publishing, run `zaxy doctor --release-smoke` to verify the package\nversion, changelog entry, release workflow, tokenless publishing posture, and\ndependency-light LangGraph example.\n\n## License\n\nMIT\n",
  "bytes": 12133,
  "sha": "dbaac392898ff06c6b7b6b9e9781a55d349c5dd62a300330bcbc41d9ac35bd6a",
  "repo_slug": "syndicalt/zaxy",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_syndicalt_zaxy_e9662e26/readme"
}