A memory-first AI agent that remembers why decisions were made — not just the last message. Runs local (Ollama), cloud (Claude · OpenAI · Gemini), or decentralized TEE. Graph memory, self-learning skills, multi-model routing, sandboxed tools. MCP · ACP · A2A. One Rust binary.
See the codeMost AI assistants forget everything the moment you close the window. Zeph is built the other way around: it remembers.
Point it at your code, your documents, or your team chat, and it keeps working across days and sessions — recalling not just what was said, but why a decision was made. It runs on your laptop with free local models, reaches for the cloud (or a decentralized network) only when a task is genuinely hard, and keeps your API keys encrypted and your tools sandboxed the entire time.
It's a single ~12 MB Rust binary. No Python, no Node, no database server to babysit.
curl -fsSL https://github.com/bug-ops/zeph/releases/latest/download/install.sh | sh
zeph init # interactive wizard sets up your provider and keys
zeph # start talking
Prefer to stay fully offline? Run Ollama, pull two small models, and nothing ever leaves your machine:
ollama pull qwen3:8b
ollama pull qwen3-embedding
zeph init && zeph
That's it — install, configure, chat. Want the dashboard instead? zeph --tui.
| Code with it | Point Zeph at a repo. It reads files, runs commands, searches code, and answers with full project context. Drop a zeph.md in your repo for project-specific instructions, or plug it into your editor over ACP. |
| Put it in your team chat | Deploy as a Telegram, Discord, or Slack bot with streaming replies, user allowlists, and voice-message transcription. Your team gets an assistant where they already work. |
| Keep it private | Run 100% locally with Ollama — no data leaves your machine. Encrypt secrets in an age vault, sandbox file and shell access, and require confirmation before anything destructive. |
| Let it run long jobs | Research loops, document RAG, scheduled tasks, multi-step plans, and sub-agents — work that spans hours and many tool calls, not a single reply. |
| If you want… | Zeph gives you… |
|---|---|
| An agent that survives long projects | SQLite conversation history, semantic recall, graph memory, session digests, and goal-aware compaction. |
| Lower running costs | A default embedded vector store, local Ollama defaults, and routing that sends easy work to cheap models and saves expensive ones for hard tasks. |
| Memory that understands why | Typed knowledge-graph facts, multi-hop recall, probabilistic belief edges, and write-quality gates — not just keyword search over old chat logs. |
| Provider freedom | Ollama, Claude, OpenAI, Gemini, Candle, any OpenAI-compatible endpoint, plus decentralized networks (Gonka, Cocoon TEE). |
| Agent-grade safety | Encrypted vault, sandboxed tools, prompt-injection detection, SSRF guards, PII filtering, and exfiltration checks. |
| To work where you already are | CLI, TUI dashboard, chat apps, IDEs, MCP tools, an HTTP gateway, and a scheduler. |
The sections below go from the headline idea to the implementation detail. Skim the summaries; expand the ▸ details blocks when you want to see exactly how it works.
Most agents bolt recall on as an afterthought. In Zeph, memory is the core. It runs several layers at once instead of dumping everything into one vector index:
| Layer | What it holds |
|---|---|
| Working context | Keeps the current task coherent under context pressure. |
| Episodic | Per-session messages, tool outputs, and digests, persisted to SQLite. |
| Semantic | Cross-session facts promoted once they recur across distinct sessions. |
| Graph | Entities, decisions, and the typed relationships between them. |
So you can ask "Why did we choose Kafka?" and Zeph follows causal edges from Kafka through the decision graph to surface the original rationale — instead of returning ten documents that happen to contain the word.
Zeph layers ~20 specialized mechanisms on top of vanilla vector search. The notable ones:
valid_from/until for the fact, created_at/expired_at for ingestion). Contradictions supersede rather than overwrite, leaving a full audit trail you can time-travel through.See memory concepts and graph memory.
Adding more skills and tools shouldn't inflate every prompt. Zeph keeps prompt size O(K), not O(N): with 50 skills installed, only the ~5 relevant to your query are loaded — roughly 2,500 tokens of skill context instead of ~50,000.
See Why Zeph? and token efficiency.
Declare every provider once in [[llm.providers]], then let Zeph route each task to the cheapest option that can handle it — with automatic fallback if one fails.
[[llm.providers]]
name = "fast" # cheap local model for extraction, embeddings, routing
type = "ollama"
model = "qwen3:8b"
embedding_model = "qwen3-embedding"
embed = true
[[llm.providers]]
name = "quality" # reserved for planning, code, hard reasoning
type = "claude"
model = "claude-sonnet-5"
default = true
[llm]
routing = "bandit"
Eight provider types work out of the box: Ollama, Claude, OpenAI, Gemini, any OpenAI-compatible endpoint (Groq, Together, Fireworks…), Candle for fully-local GGUF inference, and two decentralized networks:
| Network | Type | What's special |
|---|---|---|
| Gonka | gonka / compatible | Distributed GPU nodes — no shared rate ceiling, no single-vendor lock-in, OpenAI-compatible gateway. |
| Cocoon | cocoon | Hardware TEE isolation — node operators can't read your prompts or weights, with attested speech-to-text. |
Five strategies are implemented, plus reputation and stability layers on top:
Reputation-aware selection penalizes providers that emit invalid tool calls; an Agent Stability Index tracks response coherence; a quality gate verifies the chosen output. See adaptive inference.
Skills are plain SKILL.md markdown files — easy to write, version, and share. Edit one and it hot-reloads; no restart. Matching is by meaning, so "check disk space" finds the system-info skill without a keyword match.
When a skill repeatedly fails, Zeph notices (its feedback detector works across 7 languages), reflects on the cause, and generates an improved version — with Wilson-score ranking promoting what actually works and auto-rollback if a new version regresses.
See self-learning and skill trust.
Secrets live in an age-encrypted vault, never in .env files. Every tool call passes through trust gates, command filters, sandboxing, and an audit log. Content from untrusted sources (web pages, tool output, MCP servers) is sanitized before it ever reaches the model.
0600, zeroized in memory on drop, atomic writes... escapes rejected before canonicalization.[security.rate_limit]) and a daily LLM cost cap ([cost].max_daily_cents, default $25/day) already enabled, so a runaway agent loop can't hammer a tool category or burn unbounded API spend. Local-only Ollama/Candle usage costs 0 and never trips the cap; any config that sets these keys explicitly keeps its own values.ZEPH_HISTORY_KEY), so an edited, reordered, or partially-stripped entry is detected and fails closed before it's replayed as trusted prior context; a tampered session can be inspected read-only via zeph sessions resume <id> --print --allow-unverified. A per-file vault anchor ([integrity] anchor = "vault", the default) additionally closes the whole-file-strip downgrade a chain alone can't catch — a file-write-only attacker cannot forge or delete a vault entry. Durable execution journals use a separate authenticated high-water-mark, vault-sealable via zeph durable seal-integrity to close the equivalent whole-row-delete lever. zeph sessions verify / zeph doctor report status.See the security model.
Zeph's Telegram integration treats the messenger as a coordination layer, not a thin input box:
answerGuestQuery through a transparent local proxy (no second getUpdates, no 409 conflicts).| Area | Highlights |
|---|---|
| Memory | SQLite/PostgreSQL history, embedded SQLite vectors or Qdrant, graph memory, SYNAPSE, APEX-MEM, BeliefMem, MemCoT recall views, SleepGate, document RAG. |
| Context | Goal-aware compaction, typed-page assembler, output compression, tool-output archive, session recap, active-goal injection. |
| Skills | SKILL.md registry, hot reload, BM25 + embedding matching, trust levels, self-learning. |
| Providers | Ollama, Claude, OpenAI, Gemini, OpenAI-compatible, Gonka, Cocoon TEE, Candle, adaptive routing. |
| Tools | Shell, file, web, MCP, quotas, approval gates, audit trail, sandboxing, output compression, speculative dispatch, ShadowSentinel. |
| Interfaces | CLI, TUI, Telegram, Discord, Slack, ACP, A2A, HTTP gateway, scheduler. |
| Code intelligence | Tree-sitter indexing (Rust, Python, TS/JS, Go, and more), semantic repo map, LSP diagnostics and hover via MCP. |
| Observability | Debug dumps, JSONL mode, opt-in live sub-agent transcript forwarding to TUI/--bare, Prometheus, OpenTelemetry traces, per-model cost tracking with daily budgets. |
# Pre-built binary (no Rust toolchain needed)
curl -fsSL https://github.com/bug-ops/zeph/releases/latest/download/install.sh | sh
# Cargo
cargo install zeph
cargo install zeph --features desktop # with the TUI dashboard
# Docker
docker pull ghcr.io/bug-ops/zeph:latest
# From source
git clone https://github.com/bug-ops/zeph.git
cd zeph && cargo build --release --features full
Builds run only what you need via feature bundles: desktop (TUI), ide (ACP), server (gateway + A2A + telemetry), chat (Discord + Slack), ml (Candle + PDF), or full. Cross-platform: Linux, macOS, Windows on x86_64 and ARM64.
[!IMPORTANT] Building from source requires Rust 1.98 or later. Pre-built binaries do not need a toolchain.
zeph init # generate config through the wizard
zeph doctor # run preflight checks
zeph --tui # launch the dashboard
zeph ingest ./docs # ingest documents into semantic memory
zeph skill list # inspect installed skills
zeph router stats # inspect adaptive provider routing
zeph memory export dump.json # export a memory snapshot
A Cargo workspace (Edition 2024) of focused crates. See the architecture overview and crate map.
zeph
src/ CLI, bootstrap, init wizard, command handlers
crates/zeph-core agent loop and runtime orchestration
crates/zeph-config TOML schema, migration, provider registry
crates/zeph-llm provider abstraction and model backends
crates/zeph-memory semantic, graph, episodic, and document memory
crates/zeph-skills skill registry, matching, trust, learning
crates/zeph-tools tool executors, sandboxing, policy, audit
crates/zeph-mcp MCP client and tool lifecycle
crates/zeph-tui ratatui dashboard
crates/zeph-acp IDE integration via Agent Client Protocol
crates/zeph-a2a agent-to-agent protocol support
crates/zeph-subagent sub-agent definitions, spawning, transcripts
crates/zeph-orchestration DAG planning, scheduling, verification
Zeph draws on published work in parallel tool execution, temporal knowledge graphs, agentic memory linking, failure-driven compression, retrieval quality, and multi-model routing. See References & Inspirations.
See CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md. Coverage-guided fuzzing harnesses for parser-like components live in fuzz/.
Licensed under either of MIT or Apache License, Version 2.0 at your option.
2,753 commits
5 commits
Rust
99.8%
A memory-first AI agent that remembers why decisions were made — not just the last message. Runs local (Ollama), cloud (Claude · OpenAI · Gemini), or decentralized TEE. Graph memory, self-learning skills, multi-model routing, sandboxed tools. MCP · ACP · A2A. One Rust binary.
See the codeMost AI assistants forget everything the moment you close the window. Zeph is built the other way around: it remembers.
Point it at your code, your documents, or your team chat, and it keeps working across days and sessions — recalling not just what was said, but why a decision was made. It runs on your laptop with free local models, reaches for the cloud (or a decentralized network) only when a task is genuinely hard, and keeps your API keys encrypted and your tools sandboxed the entire time.
It's a single ~12 MB Rust binary. No Python, no Node, no database server to babysit.
curl -fsSL https://github.com/bug-ops/zeph/releases/latest/download/install.sh | sh
zeph init # interactive wizard sets up your provider and keys
zeph # start talking
Prefer to stay fully offline? Run Ollama, pull two small models, and nothing ever leaves your machine:
ollama pull qwen3:8b
ollama pull qwen3-embedding
zeph init && zeph
That's it — install, configure, chat. Want the dashboard instead? zeph --tui.
| Code with it | Point Zeph at a repo. It reads files, runs commands, searches code, and answers with full project context. Drop a zeph.md in your repo for project-specific instructions, or plug it into your editor over ACP. |
| Put it in your team chat | Deploy as a Telegram, Discord, or Slack bot with streaming replies, user allowlists, and voice-message transcription. Your team gets an assistant where they already work. |
| Keep it private | Run 100% locally with Ollama — no data leaves your machine. Encrypt secrets in an age vault, sandbox file and shell access, and require confirmation before anything destructive. |
| Let it run long jobs | Research loops, document RAG, scheduled tasks, multi-step plans, and sub-agents — work that spans hours and many tool calls, not a single reply. |
| If you want… | Zeph gives you… |
|---|---|
| An agent that survives long projects | SQLite conversation history, semantic recall, graph memory, session digests, and goal-aware compaction. |
| Lower running costs | A default embedded vector store, local Ollama defaults, and routing that sends easy work to cheap models and saves expensive ones for hard tasks. |
| Memory that understands why | Typed knowledge-graph facts, multi-hop recall, probabilistic belief edges, and write-quality gates — not just keyword search over old chat logs. |
| Provider freedom | Ollama, Claude, OpenAI, Gemini, Candle, any OpenAI-compatible endpoint, plus decentralized networks (Gonka, Cocoon TEE). |
| Agent-grade safety | Encrypted vault, sandboxed tools, prompt-injection detection, SSRF guards, PII filtering, and exfiltration checks. |
| To work where you already are | CLI, TUI dashboard, chat apps, IDEs, MCP tools, an HTTP gateway, and a scheduler. |
The sections below go from the headline idea to the implementation detail. Skim the summaries; expand the ▸ details blocks when you want to see exactly how it works.
Most agents bolt recall on as an afterthought. In Zeph, memory is the core. It runs several layers at once instead of dumping everything into one vector index:
| Layer | What it holds |
|---|---|
| Working context | Keeps the current task coherent under context pressure. |
| Episodic | Per-session messages, tool outputs, and digests, persisted to SQLite. |
| Semantic | Cross-session facts promoted once they recur across distinct sessions. |
| Graph | Entities, decisions, and the typed relationships between them. |
So you can ask "Why did we choose Kafka?" and Zeph follows causal edges from Kafka through the decision graph to surface the original rationale — instead of returning ten documents that happen to contain the word.
Zeph layers ~20 specialized mechanisms on top of vanilla vector search. The notable ones:
valid_from/until for the fact, created_at/expired_at for ingestion). Contradictions supersede rather than overwrite, leaving a full audit trail you can time-travel through.See memory concepts and graph memory.
Adding more skills and tools shouldn't inflate every prompt. Zeph keeps prompt size O(K), not O(N): with 50 skills installed, only the ~5 relevant to your query are loaded — roughly 2,500 tokens of skill context instead of ~50,000.
See Why Zeph? and token efficiency.
Declare every provider once in [[llm.providers]], then let Zeph route each task to the cheapest option that can handle it — with automatic fallback if one fails.
[[llm.providers]]
name = "fast" # cheap local model for extraction, embeddings, routing
type = "ollama"
model = "qwen3:8b"
embedding_model = "qwen3-embedding"
embed = true
[[llm.providers]]
name = "quality" # reserved for planning, code, hard reasoning
type = "claude"
model = "claude-sonnet-5"
default = true
[llm]
routing = "bandit"
Eight provider types work out of the box: Ollama, Claude, OpenAI, Gemini, any OpenAI-compatible endpoint (Groq, Together, Fireworks…), Candle for fully-local GGUF inference, and two decentralized networks:
| Network | Type | What's special |
|---|---|---|
| Gonka | gonka / compatible | Distributed GPU nodes — no shared rate ceiling, no single-vendor lock-in, OpenAI-compatible gateway. |
| Cocoon | cocoon | Hardware TEE isolation — node operators can't read your prompts or weights, with attested speech-to-text. |
Five strategies are implemented, plus reputation and stability layers on top:
Reputation-aware selection penalizes providers that emit invalid tool calls; an Agent Stability Index tracks response coherence; a quality gate verifies the chosen output. See adaptive inference.
Skills are plain SKILL.md markdown files — easy to write, version, and share. Edit one and it hot-reloads; no restart. Matching is by meaning, so "check disk space" finds the system-info skill without a keyword match.
When a skill repeatedly fails, Zeph notices (its feedback detector works across 7 languages), reflects on the cause, and generates an improved version — with Wilson-score ranking promoting what actually works and auto-rollback if a new version regresses.
See self-learning and skill trust.
Secrets live in an age-encrypted vault, never in .env files. Every tool call passes through trust gates, command filters, sandboxing, and an audit log. Content from untrusted sources (web pages, tool output, MCP servers) is sanitized before it ever reaches the model.
0600, zeroized in memory on drop, atomic writes... escapes rejected before canonicalization.[security.rate_limit]) and a daily LLM cost cap ([cost].max_daily_cents, default $25/day) already enabled, so a runaway agent loop can't hammer a tool category or burn unbounded API spend. Local-only Ollama/Candle usage costs 0 and never trips the cap; any config that sets these keys explicitly keeps its own values.ZEPH_HISTORY_KEY), so an edited, reordered, or partially-stripped entry is detected and fails closed before it's replayed as trusted prior context; a tampered session can be inspected read-only via zeph sessions resume <id> --print --allow-unverified. A per-file vault anchor ([integrity] anchor = "vault", the default) additionally closes the whole-file-strip downgrade a chain alone can't catch — a file-write-only attacker cannot forge or delete a vault entry. Durable execution journals use a separate authenticated high-water-mark, vault-sealable via zeph durable seal-integrity to close the equivalent whole-row-delete lever. zeph sessions verify / zeph doctor report status.See the security model.
Zeph's Telegram integration treats the messenger as a coordination layer, not a thin input box:
answerGuestQuery through a transparent local proxy (no second getUpdates, no 409 conflicts).| Area | Highlights |
|---|---|
| Memory | SQLite/PostgreSQL history, embedded SQLite vectors or Qdrant, graph memory, SYNAPSE, APEX-MEM, BeliefMem, MemCoT recall views, SleepGate, document RAG. |
| Context | Goal-aware compaction, typed-page assembler, output compression, tool-output archive, session recap, active-goal injection. |
| Skills | SKILL.md registry, hot reload, BM25 + embedding matching, trust levels, self-learning. |
| Providers | Ollama, Claude, OpenAI, Gemini, OpenAI-compatible, Gonka, Cocoon TEE, Candle, adaptive routing. |
| Tools | Shell, file, web, MCP, quotas, approval gates, audit trail, sandboxing, output compression, speculative dispatch, ShadowSentinel. |
| Interfaces | CLI, TUI, Telegram, Discord, Slack, ACP, A2A, HTTP gateway, scheduler. |
| Code intelligence | Tree-sitter indexing (Rust, Python, TS/JS, Go, and more), semantic repo map, LSP diagnostics and hover via MCP. |
| Observability | Debug dumps, JSONL mode, opt-in live sub-agent transcript forwarding to TUI/--bare, Prometheus, OpenTelemetry traces, per-model cost tracking with daily budgets. |
# Pre-built binary (no Rust toolchain needed)
curl -fsSL https://github.com/bug-ops/zeph/releases/latest/download/install.sh | sh
# Cargo
cargo install zeph
cargo install zeph --features desktop # with the TUI dashboard
# Docker
docker pull ghcr.io/bug-ops/zeph:latest
# From source
git clone https://github.com/bug-ops/zeph.git
cd zeph && cargo build --release --features full
Builds run only what you need via feature bundles: desktop (TUI), ide (ACP), server (gateway + A2A + telemetry), chat (Discord + Slack), ml (Candle + PDF), or full. Cross-platform: Linux, macOS, Windows on x86_64 and ARM64.
[!IMPORTANT] Building from source requires Rust 1.98 or later. Pre-built binaries do not need a toolchain.
zeph init # generate config through the wizard
zeph doctor # run preflight checks
zeph --tui # launch the dashboard
zeph ingest ./docs # ingest documents into semantic memory
zeph skill list # inspect installed skills
zeph router stats # inspect adaptive provider routing
zeph memory export dump.json # export a memory snapshot
A Cargo workspace (Edition 2024) of focused crates. See the architecture overview and crate map.
zeph
src/ CLI, bootstrap, init wizard, command handlers
crates/zeph-core agent loop and runtime orchestration
crates/zeph-config TOML schema, migration, provider registry
crates/zeph-llm provider abstraction and model backends
crates/zeph-memory semantic, graph, episodic, and document memory
crates/zeph-skills skill registry, matching, trust, learning
crates/zeph-tools tool executors, sandboxing, policy, audit
crates/zeph-mcp MCP client and tool lifecycle
crates/zeph-tui ratatui dashboard
crates/zeph-acp IDE integration via Agent Client Protocol
crates/zeph-a2a agent-to-agent protocol support
crates/zeph-subagent sub-agent definitions, spawning, transcripts
crates/zeph-orchestration DAG planning, scheduling, verification
Zeph draws on published work in parallel tool execution, temporal knowledge graphs, agentic memory linking, failure-driven compression, retrieval quality, and multi-model routing. See References & Inspirations.
See CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md. Coverage-guided fuzzing harnesses for parser-like components live in fuzz/.
Licensed under either of MIT or Apache License, Version 2.0 at your option.
2,753 commits
5 commits
Rust
99.8%