zer0dex Local Memory
Give long-running agents inspectable, cross-session recall through a Markdown index and local semantic retrieval.
Per-dimension scores and reasoning
The design uses local Ollama, Chroma, and project-scoped storage, requires the host to invoke retrieval explicitly, verifies a launch token and process identity before stopping a background server, and gives the publishing job only repository-read and PyPI OIDC permissions. Data flow, file locations, external effects, dependencies, authorship, and Hermes Labs attribution are clearly described. Deductions apply because the evidence shows no server authentication, encryption, secret scanning, or dependency-vulnerability audit, and the project expressly disclaims access-control and privacy-governance functions. Runtime dependencies have minimum versions but no lockfile or upper bounds. Server shutdown and stale-state cleanup provide partial recovery, but memory deletion, backup, and rollback of stored data are not demonstrated.
The README, package metadata, CLI surface, and tests describe a coherent product. Tests check version consistency and cover configuration round trips, argument validation, readiness, occupied ports, stale state, process identity, and local HTTP exchanges. Failure paths generally exit nonzero with actionable messages, including unreachable Ollama, a missing client, and zero extracted memories. Dependency availability is reduced because operation still requires a separately installed Ollama service and two downloaded models, constraints are broad minimums, and the supplied evidence omits the complete implementation needed to inspect every compatibility path.
The intended developers, scenarios, two-layer architecture, host responsibilities, and non-goals are explicit. Retrieval is precisely positioned as an explicit host-controlled lookup before model calls, and the adapter guidance keeps retrieved text in an untrusted context rather than installing an implicit hook. Collection, port, storage path, user, and model settings are configurable. Environment-fit points are deducted because CI evidence covers only Python 3.11/3.12 on Ubuntu; later Python versions are expressly untested, while the broader operating-system claim lacks equivalent support in the supplied files.
The README has strong information architecture covering preview, audience, rationale, installation, first success, integration, evidence limits, non-goals, development, citation, and licensing. Examples are substantial, and tests align naming and versions across metadata, runtime, citation, and machine-readable documents. The complete Apache-2.0 license, Alpha status, security contact, supported-version rule, and response targets are present. Deductions apply because there is no dedicated FAQ; the changelog and compatibility policy are referenced but absent from the supplied evidence; and although an author, organization, and security email are named, publisher identity is unverified and no broader maintainer roster or succession path is shown.
The query result is concise and usable as agent context, with memory text, score, and source. The dual-layer design offers plausible, clearly explained value over either a large flat file or opaque vector-only retrieval. The README reports recall on one 86-memory, 97-case workload and carefully limits generalization. Deductions apply because the underlying evaluation document is not supplied, so marginal value is supported only by the README summary, while model, memory, disk, installation-size, latency, and operating costs are not quantified sufficiently for a thorough cost-benefit judgment.
Many operational claims trace to package metadata, CI configuration, and focused tests; versions, commands, process safeguards, error behavior, and local exchanges are corroborated across files. The sample output is labeled illustrative, and benchmark observations are explicitly separated from general guarantees, earning strong fact-inference separation. Claim traceability is reduced because the full implementation, evaluation report, compatibility policy, and changelog are absent, preventing direct corroboration of performance figures and some documentation promises.
- This is not an access-control, privacy, compliance, or governance system; do not place sensitive memories in unencrypted or ambiguously permissioned project storage.
- Retrieved memories are explicitly untrusted data; the host should apply provenance, authorization, and prompt-injection checks before prompt insertion.
- Dependencies are not locked and no vulnerability scan is shown; pin and audit mem0ai, ChromaDB, the Ollama client, and CI Actions before production use.
- The 91.2% average recall and 80.0% cross-reference recall come from one small, single-run workload; re-evaluate thresholds, latency, and resource cost on representative data.
- Background-server shutdown verifies identity, but the evidence shows no memory deletion, backup, migration, or write-rollback workflow; establish data recovery procedures before deployment.
What does this agent do, and when should you use it?
zer0dex is a local dual-layer memory reference implementation for agent hosts, combining a hand-editable Markdown index with semantic storage built on mem0 and Chroma. The host keeps the compact index in context and queries a local HTTP service for memories relevant to each message before calling a model. The package supplies a Python CLI, a local server, and POST /query, POST /add, and GET /health endpoints, but it is neither a complete agent framework nor an automatic pre-message hook installer. Its default setup runs nomic-embed-text and mistral:7b through Ollama, requiring no hosted memory service or cloud API key. Queries produce memories with fields such as text, score, and source, while the host remains responsible for validation and prompt injection. As a 0.1.x Alpha developer preview, it is best suited to teams that can own the integration and tolerate continued refinement.
A user creates or edits MEMORY.md to hold categories, durable summaries, and cross-topic pointers, then runs zer0dex seed --source MEMORY.md to populate the project-local mem0/Chroma store. zer0dex serve --background launches the local HTTP service and records managed process state in server.json under the configured storage directory. Before each model call, an agent host sends the current question to POST /query; the service performs semantic retrieval and returns memories whose fields can include text, score, and source. POST /add or zer0dex add extracts and stores new memories, and the CLI exits nonzero if extraction stores nothing. GET /health, zer0dex check, and zer0dex status expose operational checks, while zer0dex stop verifies the server's per-launch identity before signaling it. The included queryZer0dex TypeScript example demonstrates a bounded, fail-open lookup and places retrieved material in an explicitly untrusted context field.
- A developer running a local coding or research agent who needs project facts to persist across sessions while keeping core memory directly inspectable and editable.
- A team whose single MEMORY.md has grown too large for the prompt and wants a compact index backed by semantic retrieval of message-specific details.
- An agent-framework author who does not want an opaque vector store to be the only view of memory and needs Markdown to expose categories, summaries, and relationships.
- A host developer able to add one local HTTP request before each model call and wanting full control over which retrieved records enter the prompt.
- A local-first workflow that needs cross-project recall without adopting hosted memory infrastructure or supplying a cloud API key.
- A reliability team prepared to rerun memory-retrieval evaluations on representative data before selecting thresholds or making production claims.
What are this agent's strengths and limitations?
- The Markdown layer stays human-readable and editable while Chroma handles semantic detail retrieval, combining inspectability with on-demand recall.
- The default Ollama, mem0, and Chroma path runs locally and does not require a hosted memory service or cloud API key.
- A small CLI and HTTP boundary can be integrated into different hosts without adopting a full agent framework.
- Managed shutdown verifies a per-launch server identity, reducing the risk that stale or reused PID state stops an unrelated process.
- The project documents its evaluation method and limits; on the stated 86-memory, 97-case workload, it reports 91.2% average recall and 80.0% cross-reference recall.
- The host must implement the pre-call lookup, result selection, trust boundary, and prompt injection because zer0dex installs no automatic hook.
- The default runtime depends on Ollama, nomic-embed-text, mistral:7b, mem0ai, and ChromaDB, with corresponding local RAM and disk costs.
- The project remains an Alpha 0.1.x developer preview; migration notes are promised before documented breaking changes, but refinement is still expected.
- Evidence is limited to one 86-memory, 97-case workload, a single-run score without confidence intervals, and hardware-specific latency; it does not establish performance across domains or at thousands of memories.
- It provides no hosted multi-tenancy, compliance controls, access-control system, privacy governance, or guarantee that retrieved text is true or safe to inject.
How do you install or deploy this agent?
Use Python 3.11 or 3.12 and install Ollama so it serves locally at http://localhost:11434. Create an environment and install the package:
python -m venv .venv
source .venv/bin/activate
pip install zer0dex
zer0dex --versionPull the required local models:
ollama pull nomic-embed-text
ollama pull mistral:7bThe package installation includes mem0ai, ChromaDB, and the Ollama Python client. The default path requires no cloud API key, but the machine needs enough memory and disk for both models and the Chroma store.
How do you use this agent?
Run this documented first-success sequence:
printf '%s\n' '# Memory' '## Project Atlas' '- Deployment target: staging' > MEMORY.md
zer0dex check
zer0dex init
zer0dex seed --source MEMORY.md
zer0dex serve --background
zer0dex query "Where does Project Atlas deploy?"
zer0dex add "Project Atlas deploys from the release branch"
zer0dex status
zer0dex stopInitialization creates .zer0dex.json and a local .zer0dex/ store in the working directory. For an actual host integration, call POST /query before each model invocation and process the returned memories under the host's own prompt and trust policy. POST /add can write memories, and GET /health checks the service. A TypeScript host can adapt the repository's queryZer0dex helper, but must wire it into its own message pipeline.
How does this agent compare with similar options?
Compared with an ever-growing flat MEMORY.md, zer0dex keeps only a compact semantic table of contents in context and retrieves details on demand, making it a better fit when all memory no longer fits comfortably in a prompt. Compared with vector-only RAG, it adds an inspectable Markdown layer that shows what knowledge exists and how topics relate. The tradeoff is that adopters must maintain both layers and define how their host uses retrieved results.