Zaxy

io.github.syndicalt由 GitHub 账号 syndicalt 发布v3.2.0更新于 Oct 27, 2026

Event-sourced, auditable agent memory over MCP: cited checkout, replayable provenance.

概览

AI 生成的概览

Zaxy 是一个本地运行、基于事件溯源的智能体记忆服务器,让助手可以追加、查询、重放和作废可审计的项目记忆。

可以做什么
  • 追加与查询记忆:记录任务、会话、工具观察和带引用的发现,并通过精确、关键词、向量与图遍历的混合检索取回。
  • 评审与合并:父会话与工作会话保持隔离,直到发现经过评审、冲突检查并合并回主记忆。
  • 重放与作废:查看或重放只追加的历史记录,并将事实标记为失效,可选由管理令牌保护。
  • 审计溯源:每条被接受的事实都能回溯到不可变的事件日志,带哈希链历史和有效期窗口。
  • 分析模型调用:可选的 OpenAI 兼容数据包分析器以只观察方式记录模型调用溯源事件。
适用场景
适合多个智能体或会话共同推进同一项目、希望拥有持久且可引用的记忆,而不是散落的 markdown 文件或向量片段时使用。也适合需要审计事实来源、重放项目状态演变过程的团队。
运行要求
以本地 stdio 进程运行,从 PyPI 安装 zaxy-memory(例如使用 uvx 或 pipx),需要 Python。通过 zaxy init 命令完成初始化,生成仓库级配置并把数据存放在本地 .eventloom 目录。默认的嵌入式图存储无需外部数据库;可选的 Neo4j 与 Pathlight 扩展需要各自的凭据。
安装前请注意
它会把记忆数据写入本地 .eventloom 目录,并可能启动捕获监视器记录智能体活动。重放与作废操作可由管理令牌(MCP_ADMIN_TOKEN)保护;可选扩展使用 NEO4J_PASSWORD 和 PATHLIGHT_ACCESS_TOKEN,可通过密钥文件提供。数据包分析器会把模型数据包转发到已配置的上游端点。README 已撤回此前的基准测试分数,对性能宣传应谨慎看待。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Zaxy,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Zaxy

Production memory for agent teams that need receipts.

Zaxy turns agent context into an auditable project memory fabric. It captures parent missions, worker sessions, tool observations, cited findings, conflict review, approval packets, and accepted merge-back into one durable history that can be queried, replayed, and inspected.

Under the hood, Zaxy uses Eventloom append-only JSONL as the source of truth and an embedded LadybugDB graph projection for local reasoning. It is built for agents that need to remember what happened, cite where it came from, and avoid turning project state into a pile of markdown files and vector chunks.

The embedded LadybugDB graph projection is the default local runtime.

The plain install uses embedded LadybugDB. Install zaxy-memory[neo4j] only for the optional Neo4j sidecar, and zaxy-memory[pathlight] only for Pathlight tracing.

Why It Matters

  • Auditable memory: every accepted fact can point back to Eventloom history.
  • Agent-team coordination: parent and worker sessions stay isolated until findings are reviewed and merged.
  • Local-first runtime: the default path uses embedded LadybugDB, no Neo4j sidecar.
  • MCP-native integration: Codex, Claude Code, Cursor, VS Code, Hermes Agent, LangGraph, CrewAI, and AutoGen can use the same memory interface.

Benchmark claims withdrawn (2026-07-03). The prior LongMemEval numbers were withdrawn: they were produced in oracle mode (mean ~1.9 candidate sessions per question, so Recall@5/citation-coverage were ~1.0 by construction, not by retrieval) and the preference-question scores rested on a hardcoded answer table that has since been removed. Zaxy does not currently publish a LongMemEval score. A real, full-haystack LongMemEval run is planned; until it lands, treat the earlier 0.956/0.910/1.000 figures as retracted. The Harvey LAB claim is pending the same audit.

Quick Start

Install, init, verify

bash
pipx install zaxy-memoryzaxy initzaxy memory log --eventloom-path .eventloom --limit 5zaxy memory bootstrap --eventloom-path .eventloomzaxy doctor --eventloom-path .eventloom

The PyPI distribution is zaxy-memory; the import package and console command are still zaxy. Bare zaxy init sets up the local embedded graph posture, repo-local profile, deterministic capture config, genesis event, heartbeat, and MCP guidance. For Codex, the printed activation launcher starts the managed capture watcher when the local capture config is present; pass --capture start only when you want init itself to start the watcher before opening Codex. The default human output is compact and action-first; add --verbose when you need the full setup diagnostics, optional checks, fallback commands, resume guidance, and notes. For automation, zaxy init --json keeps the raw onboarding fields and adds setup.status, setup.issues, setup.pending, readiness.status, readiness.reasons, readiness.actions, and structured readiness.action_items for both commands and non-command review tasks. Each structured action carries label, command, original source, and hints for compact-output tips such as activation <task> replacement and path-stable command guidance. Installers can render those tips without parsing prose. It also includes setup.summary, readiness.summary, readiness.required_action_count, and readiness.reason_count, so client UIs can render compact status without parsing human output. It also separates readiness.blocking_diagnostics from readiness.non_blocking_diagnostics so scripts can distinguish setup completion, required actions, and advisory doctor warnings before relying on live memory.

For Codex, zaxy init --codex-mcp-install auto is the default. It writes or reuses the user-level Codex MCP config when that can be done without replacing an existing zaxy server entry. If no safe config target exists, it prints the copyable codex mcp add command. If an existing zaxy entry differs, it asks you to review that config before replacing it because Codex can silently replace servers with the same name. Use an explicit mode when you need to force one side of that decision after review:

bash
zaxy init --codex-mcp-install user# or: zaxy init --codex-mcp-install command

Both Codex paths keep the server workspace-neutral. After init, start or restart Codex through the printed zaxy activate codex ... --launch command so the MCP server list and Zaxy activation packet are loaded together. The printed command includes explicit --eventloom-path and --workspace-root values, so it still targets the initialized repo when copied from another shell.

Run the single-agent memory example:

bash
python examples/single_agent_memory.py

Your local data lives under .eventloom/ as one append-only JSONL file per session.

For Claude Code instead of Codex:

bash
zaxy init . --domain my-project --preset local-claude --infra check

For Hermes Agent:

bash
zaxy ide-config hermes --install

For repository development, use pip install -e ".[dev]", ./scripts/setup.sh, and zaxy status. Start Docker sidecars only for integration tests or explicit backend comparisons. Production setup writes Docker secret files under ./secrets/; see docs/deployment.md.

Architecture

Agent (LangGraph / Any MCP Client)    |    vMCP Server — memory_append / memory_query / memory_feedback / memory_replay / memory_invalidate    |    vEventloom (immutable JSONL log)  →  Hybrid Extraction  →  Embedded LadybugDB graph    |                                                               |    +—————— Optional Pathlight traces ———————————————→  Query Router                                                              |                                                    Hybrid Retrieval                                                    (exact + BM25 + vector + traversal)

Zaxy also includes an observe-only OpenAI-compatible packet analyzer for model call provenance. It forwards packets to one configured upstream endpoint and records llm.packet.completed events to Eventloom without acting as a router. See LLM Packet Analyzer.

Public Site and Documentation

  • Public static site: site/index.html
  • Why Zaxy: docs/why-zaxy.md
  • Getting started: docs/getting-started.md
  • MCP quickstart: docs/mcp-quickstart.md
  • Architecture: docs/architecture.md
  • Configuration: docs/configuration.md
  • MCP interface: docs/mcp.md
  • Memory export contract: docs/export-contract.md
  • Eventloom contract: docs/eventloom.md
  • Graph schema: docs/graph-schema.md
  • Retrieval: docs/retrieval.md
  • Benchmarks: docs/benchmarks.md
  • LLM packet analyzer: docs/packet-analyzer.md
  • Embeddings: docs/embeddings.md
  • Security: docs/security.md
  • Operations and deployment: docs/operations.md, docs/deployment.md, docs/runbook.md
  • Python API: docs/api.md
  • Stability commitment: docs/stability-commitment.md
  • Migration guide: docs/migration.md
  • Archived benchmark iteration notes, release drafts, and research notes live under docs/archive/, docs/announcements/, and docs/research/.
  • Contributing: CONTRIBUTING.md

Key Features

  • Immutable audit trail: Eventloom append-only JSONL with SHA-256 hash chains.
  • Bi-temporal graph: Facts have validity windows (valid_from, valid_to).
  • Hybrid extraction: Rule-based for typed events (60–80% cost reduction), LLM fallback.
  • Hybrid retrieval: Exact + keyword + vector + graph traversal with configurable fusion weights.
  • Session sharding: One Eventloom log per agent/session, with a shared graph.
  • MCP-native: Drop-in memory for any MCP-compatible agent framework over stdio or SSE.
  • Observable: Optional Pathlight traces, breakpoints, and diff support via zaxy-memory[pathlight].
  • Hardened local defaults: bounded MCP inputs, safe session IDs, no-sidecar embedded graph projection, and optional admin token support for replay/invalidation.

Project Structure

FilePurpose
src/zaxy/event.pyEventloom JSONL I/O + hash chain integrity
src/zaxy/extract.pyHybrid extraction engine + rule registry
src/zaxy/embedded_graph_store.pyEmbedded LadybugDB projection store
src/zaxy/graph.pyOptional Neo4j bi-temporal wrapper via zaxy-memory[neo4j]
src/zaxy/query.pyHybrid retrieval router
src/zaxy/mcp_server.pyMCP stdio/SSE server
src/zaxy/trace.pyOptional Pathlight observability hooks
src/zaxy/core.pyMemoryFabric orchestrator
src/zaxy/session.pyPer-session Eventloom log manager
src/zaxy/security.pyShared validation and input bounds
src/zaxy/__main__.pyCLI (zaxy serve, zaxy replay, etc.)

Production Secrets

Zaxy supports Docker/Kubernetes-style secret files for sensitive settings:

VariableSecret-file variant
NEO4J_PASSWORDNEO4J_PASSWORD_FILE
MCP_ADMIN_TOKENMCP_ADMIN_TOKEN_FILE
PATHLIGHT_ACCESS_TOKENPATHLIGHT_ACCESS_TOKEN_FILE

Direct environment variables take precedence over their *_FILE variants. Use docker-compose.prod.yml as the production compose baseline.

Development

  • Tests first (Karpathy rule). Every public function has a test.
  • Unit tests mock external services. Integration tests use Docker for optional sidecar backends.
  • Coverage gate: ≥92% enforced by CI.
  • Lint/format: ruff. Types: mypy.
bash
# Run full suite with coverage gatepytest
# Run integration tests (requires Docker)./scripts/generate-certs.sh .certsdocker compose --profile integration up -d neo4j-test neo4j-tlspytest -m integration --no-cov
# Lint and type-checkruff check src testsmypy src
# LongMemEval benchmark numbers are WITHDRAWN (see the note at the top of this# README). The `--dataset .cache/.../longmemeval_oracle.json` path only exercises# the answer step over pre-selected gold sessions (oracle mode) and does NOT# measure retrieval on the full LongMemEval haystack; do not publish figures from# it as a LongMemEval score. A real full-haystack harness is TBD.
# Harvey LAB external memory-ablation comparison# Consumes externally generated Harvey normalized-result artifacts for Zaxy;# does not reuse LongMemEval statistics as legal-agent benchmark evidence.# Current full external Harvey LAB evidence:# reports/benchmarks/harvey-lab-memory-ablation/publishable-statistics.md# reports/benchmarks/harvey-lab-memory-ablation/harvey-lab-benchmark.json# 10/10 tasks, mean criterion pass rate 0.788, +0.184 vs regular/no-memory,# +0.081 vs article-best task rows, 9/10 wins vs article-best rows.
# Production deployment preflightscripts/validate-deployment.sh --root .
# Build and validate Python release artifactsscripts/build-dist.sh --root .
# Verify local release metadata, PyPI Trusted Publishing, and LangGraph smokezaxy doctor --release-smoke
# Validate public site and documentation linksscripts/validate-docs.sh --root .
# Clean-repo beta UAT: install into a throwaway workspace and verify init,# bootstrap, deterministic capture, doctor, and memory checkout.scripts/beta-uat.sh
# Summarize beta readiness gates without external services.zaxy doctor --beta-readiness
# Go-live release gatescripts/release-check.sh --root .

The full suite must stay at or above 92% coverage before a sprint is complete.

Release Publishing

The PyPI distribution name is zaxy-memory because zaxy is already occupied on PyPI. Published releases build from GitHub Actions and upload to https://pypi.org/project/zaxy-memory/ using PyPI Trusted Publishing with GitHub OIDC. The import package and console command remain zaxy.

Before publishing, run zaxy doctor --release-smoke to verify the package version, changelog entry, release workflow, tokenless publishing posture, and dependency-light LangGraph example.

License

MIT

来源:README.md,提交 892b108

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v3.2.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分