Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Feature Flags

Zeph uses Cargo feature flags to control optional functionality. The remaining optional features are organized into use-case bundles for common deployment scenarios, with individual flags available for fine-grained control.

Use-Case Bundles

Bundles are named Cargo features that group individual flags by deployment scenario. Use a bundle to get a sensible default for your use case without listing individual flags.

BundleIncluded FeaturesDescription
desktoptui, session, indexInteractive desktop agent with TUI dashboard, session persistence, and AST-based code indexing
ideacp, acp-httpIDE integration via ACP (Zed, Helix, VS Code)
servergateway, a2a, otel, prometheus, sessionHeadless server deployment: HTTP webhook gateway, A2A agent protocol, OpenTelemetry tracing, Prometheus metrics, session persistence
chatdiscord, slackChat platform adapters
mlcandle, pdfLocal ML inference (HuggingFace GGUF) and PDF document loading
fulldesktop + ide + server + chat + pdf + scheduler + classifiers + profiling + sandbox + gonkaEverything intended to ship in a release binary, except hardware-exclusive (metal, cuda, postgres) and dev-only harness features (bench, testing)

Bundle build examples

cargo build --release --features desktop          # TUI agent for daily use
cargo build --release --features ide              # IDE assistant (ACP)
cargo build --release --features server           # headless server/daemon
cargo build --release --features desktop,server   # combined: TUI + server
cargo build --release --features ml               # local model inference
cargo build --release --features ml,metal         # local inference with Metal GPU (macOS)
cargo build --release --features ml,cuda          # local inference with CUDA GPU (Linux)
cargo build --release --features full             # everything except hardware-exclusive/dev-only features
cargo build --release --features full,ml          # everything including local inference
cargo build --release --features full,testing     # full plus mock LLM providers for testing

Bundles are purely additive. All existing --features tui,scheduler style builds continue to work unchanged.

No cli bundle: the default build (cargo build --release, no features) already represents the minimal CLI use case. A separate cli bundle would be a no-op alias.

full does not imply testing: mock LLM providers are a dev-only test double, not something a release binary should ship with full alone. Add testing explicitly if you need zeph-llm’s mock provider outside cargo test.

Built-In Capabilities (always compiled, no feature flag required)

The following capabilities compile unconditionally into every build. They are not Cargo feature flags — there is no #[cfg(feature)] gate and no way to disable them. They are listed here for reference only.

CapabilityDescription
OpenAI providerOpenAI-compatible provider (GPT, Together, Groq, Fireworks, etc.)
Compatible providerCompatibleProvider for OpenAI-compatible third-party APIs
Multi-model orchestratorMulti-model routing with task-based classification and fallback chains
Router providerRouterProvider for chaining multiple providers with fallback
Self-learningSkill evolution via failure detection, self-reflection, and LLM-generated improvements
Qdrant integrationQdrant-backed vector storage for skill matching and MCP tool registry
Age vaultAge-encrypted vault backend for file-based secret storage (age)
MCP clientMCP client for external tool servers via stdio/HTTP transport
Daemon supervisorDaemon supervisor with component lifecycle, PID file, and health monitoring
Task orchestrationDAG-based execution with failure strategies and SQLite persistence, including LLM-backed planning/verification
Graph memorySQLite-based knowledge graph with entity-relationship tracking and BFS traversal
GuardrailContent sanitization, PII filtering, exfiltration guard, and quarantine
Context compressionReactive and focus-driven context compaction with summarization
Compression guidelinesFailure-driven guideline generation to improve future compaction quality
Policy enforcerDeclarative tool policy enforcement with LLM-based adversarial gate
LSP context injectionAutomatic LSP diagnostics, hover, and reference injection into tool calls
ExperimentsAutonomous self-experimentation engine with LLM-as-judge evaluation
Bundled skillsSKILL.md files compiled into the binary via include_dir
Speech-to-textOpenAI Whisper API transcription for audio input
zeph:// deep-link URI dispatchOS-level zeph:// scheme registration and prompt injection (spec #066); registration itself remains opt-in at the user level via --init or a CLI subcommand
Cocoon inference providerTEE-sidecar confidential-compute provider (spec #055)
Skill/plugin registry marketplacezeph skill search/get and zeph plugin search/get against external registries (e.g. skills.sh); opt-in via config, no network calls by default (spec #045-adjacent, #5869)

Optional Features

FeatureDescription
tuiratatui-based TUI dashboard with real-time agent metrics
candleLocal HuggingFace model inference via candle (GGUF quantized models) and local Whisper STT (guide)
metalMetal GPU acceleration for candle on macOS — implies candle
cudaCUDA GPU acceleration for candle on Linux — implies candle
discordDiscord channel adapter with Gateway v10 WebSocket and slash commands (guide)
slackSlack channel adapter with Events API webhook and HMAC-SHA256 verification (guide)
acpACP (Agent Client Protocol) server over stdio for IDE embedding — includes the stabilised-upstream unstable-session-* handlers (Zed, Helix, VS Code) (guide)
acp-httpACP server over HTTP+SSE and WebSocket transport — implies acp (guide)
a2aA2A protocol client and server for agent-to-agent communication
gatewayHTTP gateway for webhook ingestion with bearer auth and rate limiting (guide)
prometheusOpenMetrics /metrics endpoint — implies gateway
schedulerCron-based periodic task scheduler with SQLite persistence, including the update_check handler for automatic version notifications (guide)
sessionSession persistence, event-log replay, and zeph serve’s HTTP/SSE session API (spec #068)
otelOpenTelemetry tracing export via OTLP/gRPC (guide)
pdfPDF document loading via pdf-extract for the document ingestion pipeline
classifiersML-based content classifiers via local candle inference (implies candle)
indexAST-based code indexing, semantic retrieval, and repo map generation (spec #017)
gonkagonka.ai decentralized inference provider (specs #051, #052)
profilingDiagnostic tracing spans (Chrome trace format) and system metrics via sysinfo; zero overhead when not actively tracing
profiling-allocPer-span heap allocation counters — implies profiling
profiling-pyroscopeContinuous profiling export to Pyroscope — implies profiling and otel
sandboxLinux landlock/seccompiler and macOS Seatbelt tool-execution sandboxing; runtime-disabled by default (tools.sandbox.enabled = false)
testingMock LLM provider test doubles (zeph-llm/testing) — dev-only, not in full
benchBenchmark harness CLI (spec #034) — dev-only, not in full
sqliteSQLite database backend via sqlx (enabled by default)
postgresPostgreSQL database backend via sqlx — mutually exclusive with sqlite; activating both causes a compile error. Use --no-default-features --features postgres to switch

Important

--all-features activates both sqlite and postgres simultaneously, which triggers a compile_error! in zeph-db. Use --features full for local development instead (it defaults to sqlite via the crate’s default features; add postgres explicitly with --no-default-features --features full,postgres for a Postgres build).

Crate-Level Features

zeph-acp exposes its own unstable-* flags for ACP protocol surface still marked unstable upstream. The acp feature in the root crate enables all of them automatically — there is no separate acp-unstable flag.

CrateFeatureIn acp?Description
zeph-acpunstable-session-forkyessession/fork — clone session history into a new session
zeph-acpunstable-session-usageyesUsageUpdate session notification — per-turn token consumption sent after each LLM response
zeph-acpunstable-elicitationyeselicitation/create — structured user-input requests mid-turn
zeph-acpunstable-llm-providersyesLLM provider listing/switching extension
zeph-acpunstable-auth-methodsyesAuth-methods advertisement extension
zeph-acpunstable-cancel-requestnoWires the $/cancel_request notification onto the internal cancel signal — deliberate local opt-in, not enabled by acp or default (#5362)

Session lifecycle handlers that were previously gated behind unstable-session-delete, unstable-session-resume, unstable-logout, unstable-session-add-dirs, and unstable-message-id compile unconditionally — the corresponding upstream ACP features stabilised, and the Zeph Cargo features were removed entirely rather than kept as no-op tombstones.

Disable all unstable-* handlers to build a minimal ACP server without them:

cargo build -p zeph-acp --no-default-features

Build Examples

cargo build --release                                      # default build (scheduler + sqlite + always-on features)
cargo build --release --features desktop                   # TUI dashboard + session + index
cargo build --release --features ide                       # ACP (includes the stabilised unstable-session-* handlers)
cargo build --release --features server                    # gateway + a2a + otel + prometheus + session
cargo build --release --features desktop,server            # combined desktop and server
cargo build --release --features ml,metal                  # local inference with Metal GPU (macOS)
cargo build --release --features ml,cuda                   # local inference with CUDA GPU (Linux)
cargo build --release --features full                      # everything except hardware-exclusive/dev-only features
cargo build --release --features full,testing               # full plus mock LLM providers
cargo build --release --features tui                       # individual flag still works
cargo build --release --features tui,a2a                   # combine individual flags freely

Build Profiles

ProfileLTOCodegen UnitsUse Case
devoff256Local development
releasefat1Production binaries
cithin16CI release builds (~2-3x faster link than release)

Build with the CI profile:

cargo build --profile ci