Feature Flags
Kova uses Cargo features so your build compiles only what you use. Providers are on by default; tools and telemetry are off.
| Flag | Default | What it adds | Extra dependencies |
|---|---|---|---|
anthropic | ✅ | Native Anthropic provider (Messages API: streaming, tool use, adaptive thinking, automatic prompt caching) | none beyond core |
openai | ✅ | OpenAI-compatible provider (OpenAI, Azure, vLLM, LM Studio, local Ollama endpoint) + OpenAI embeddings | none beyond core |
gemini | ✅ | Google Gemini provider | none beyond core |
ollama | ✅ | Ollama provider (local models, no API key) + Ollama embeddings | none beyond core |
bedrock | ✅ | AWS Bedrock provider | the AWS SDK crates (aws-sigv4, aws-config, smithy, …) |
tools | ❌ | Filesystem & shell tools: read_file, list_dir, search, edit_file, write_file, patch_file, shell | glob, regex, diffy |
web-tools | ❌ | Adds fetch_webpage + the fetch_text SSRF-guarded helper; implies tools | scraper, dom_smoothie, htmd, enables tokio/net |
telemetry | ❌ | OpenTelemetry span export (OTLP gRPC/HTTP, Jaeger, stdout) | opentelemetry*, tracing-opentelemetry |
The openai and ollama flags also gate the matching EmbeddingProvider
implementations — see Embeddings.
Common combinations
Section titled “Common combinations”Just hosted Anthropic, lightest build — skip the AWS dependency tree:
kova-sdk = { version = "0.9", default-features = false, features = ["anthropic"] }Local development with Ollama, no cloud:
kova-sdk = { version = "0.9", default-features = false, features = ["ollama"] }A coding/automation agent that needs filesystem + shell + web:
kova-sdk = { version = "0.9", features = ["web-tools"] }Production with tracing to an OTLP collector:
kova-sdk = { version = "0.9", features = ["telemetry"] }Everything:
kova-sdk = { version = "0.9", features = ["web-tools", "telemetry"] }Why some things are gated
Section titled “Why some things are gated”bedrockis on by default but heavy. It pulls the entire AWS SDK stack. If you don’t target Bedrock,default-features = falseand re-add only the providers you use — the build shrinks noticeably.- Built-in tools are off by default. They add dependencies (
web-toolspulls an HTML parser + readability extraction). Opt in only when you need them, and prefertoolsoverweb-toolsif you don’t fetch web pages. telemetryis off by default. OpenTelemetry crates are heavy on compile time and binary size. Without the feature,TelemetryConfig::init()still installs a lightweighttracing_subscriberwith zero OTEL overhead — so you keep structured logs and only pay for OTEL when you export.
The tools / web-tools relationship
Section titled “The tools / web-tools relationship”web-tools implies tools — enabling it gives you the filesystem/shell
tools and the web tools. There’s no way to get web tools without the file
tools, by design (the web tools build on the same policy machinery). If you only
need files and shell, use tools alone to avoid the HTML parsing stack.
Verifying what’s compiled
Section titled “Verifying what’s compiled”# See the resolved feature set and dependency treecargo tree -e features -p kova-sdk
# Build with a specific setcargo build --no-default-features --features openai,toolsRelated
Section titled “Related”- Installation — adding the crate.
- Configuring a Provider — the provider features in use.
- Built-in Tools & ToolPolicy — the tool features in use.
- Telemetry & Metrics — the telemetry feature.