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
desktoptuiInteractive desktop agent with TUI dashboard
ideacp, acp-httpIDE integration via ACP (Zed, Helix, VS Code)
servergateway, a2a, otelHeadless server deployment: HTTP webhook gateway, A2A agent protocol, OpenTelemetry tracing
chatdiscord, slackChat platform adapters
mlcandle, pdfLocal ML inference (HuggingFace GGUF) and PDF document loading
fulldesktop + ide + server + chat + pdf + scheduler + classifiersAll optional features except candle, metal, and cuda (hardware-specific)

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             # all optional features (CI / release builds)
cargo build --release --features full,ml          # everything including local inference

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.

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
Mock providersMock providers and channels for integration testing
Daemon supervisorDaemon supervisor with component lifecycle, PID file, and health monitoring
Task orchestrationDAG-based execution with failure strategies and SQLite persistence
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

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)
a2aA2A protocol client and server for agent-to-agent communication
gatewayHTTP gateway for webhook ingestion with bearer auth and rate limiting (guide)
schedulerCron-based periodic task scheduler with SQLite persistence, including the update_check handler for automatic version notifications (guide)
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)

Crate-Level Features

Some workspace crates expose their own feature flags for fine-grained control:

CrateFeatureDefaultDescription
zeph-llmschemaonEnables schemars dependency and typed output API (chat_typed, Extractor, cached_schema)
zeph-acpunstable-session-listonlist_sessions RPC handler — enumerate in-memory sessions (unstable, see ACP guide)
zeph-acpunstable-session-forkonfork_session RPC handler — clone session history into a new session (unstable, see ACP guide)
zeph-acpunstable-session-resumeonresume_session RPC handler — reattach to a persisted session without replaying events (unstable, see ACP guide)
zeph-acpunstable-session-usageonUsageUpdate session notification — per-turn token consumption (used/size) sent after each LLM response; IDEs that handle this event render a context window badge (unstable, see ACP guide)
zeph-acpunstable-session-modelonset_session_model handler — IDE model picker support; emits SetSessionModel notification on switch (unstable, see ACP guide)
zeph-acpunstable-session-info-updateonSessionInfoUpdate notification — auto-generated session title emitted after the first exchange (unstable, see ACP guide)

ACP session management (unstable)

The unstable-session-* flags gate ACP session lifecycle handlers and IDE integration features that depend on draft ACP spec additions. They are enabled by default but the API surface may change before the spec stabilises. Each flag also enables the corresponding feature in agent-client-protocol so the SDK advertises the capability during initialize.

The acp feature in the root crate automatically enables all unstable-session-* flags in zeph-acp. There is no separate acp-unstable flag.

Disable all session management flags to build a minimal ACP server without them:

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

Disable the schema feature to compile zeph-llm without schemars:

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

Build Examples

cargo build --release                                      # default build (scheduler + sqlite + always-on features)
cargo build --release --features desktop                   # TUI dashboard
cargo build --release --features ide                       # ACP (includes all unstable-session-* flags)
cargo build --release --features server                    # gateway + a2a + otel
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                      # all optional features (except candle/metal/cuda)
cargo build --release --features tui                       # individual flag still works
cargo build --release --features tui,a2a                   # combine individual flags freely

The full feature enables every optional feature except candle, metal, and cuda (hardware-specific, opt-in).

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

zeph-index Language Features

Tree-sitter grammars are controlled by sub-features on the zeph-index crate (always-on). All are enabled by default.

FeatureLanguages
lang-rustRust
lang-pythonPython
lang-jsJavaScript, TypeScript
lang-goGo
lang-configBash, TOML, JSON, Markdown