Changelog
Notable changes to the kova-sdk crate, newest first. Versions follow
SemVer; the crate is published on
crates.io.
0.9.0 — Stateless core: memory, orchestrator, and push-streaming removed
Section titled “0.9.0 — Stateless core: memory, orchestrator, and push-streaming removed”Removed (breaking) — the agent is now stateless-only; persistence, sessions, and multi-agent composition are host concerns.
memorymodule — theMemoryStoretrait,InMemoryStore, andAgentBuilder::memory. Own aVec<ConversationMessage>and persistresponse.new_messagesyourself. See Conversations & History.orchestratormodule —Orchestratorand itsSequential/Parallel/Routerpatterns. Compose agents with plain Rust overAgent::run(a few lines of?,tokio::join!, ormatch). See A Multi-Agent Pipeline.- Session / chat layer —
Agent::chat,chat_response, andchat_stream. Userun/run_streamover caller-owned history. - Push-based streaming — the
StreamingHandlertrait andAgentBuilder::streaming_handler. The pull-basedrun_stream(yieldingAgentEvents) is the streaming surface. See Streaming. KovaError::MemoryandKovaError::Orchestrationvariants.
No functional change to run / run_stream / run_structured /
run_cancellable.
0.8.0 — Native Anthropic, structured output, embeddings, cancellation, error classification, MCP resilience
Section titled “0.8.0 — Native Anthropic, structured output, embeddings, cancellation, error classification, MCP resilience”Added
- Native Anthropic provider (
provider::anthropic, featureanthropic, on by default) — the Messages API directly: streaming SSE, tool use, adaptive extended thinking, and automatic prompt caching. Signed reasoning blocks round-trip through history asContentBlock::Thinking. See Configuring a Provider. - Structured output —
InferenceConfig::response_format+Agent::run_structured::<T>(messages, format)constrain the final text to a JSON schema (native per provider; Bedrock rejects it). See Structured Output. - Embeddings — the
EmbeddingProvidertrait with OpenAI-compatible and Ollama implementations (kova ships no vector store). See Embeddings. - Token counting + context budgets —
LlmProvider::count_tokens(offline heuristic by default; native on Anthropic) andAgentBuilder::context_budget, which fails over-long prompts withKovaError::ContextBudgetExceededbefore the request. - Prompt-cache accounting —
UsageStats::cache_read_tokens/cache_creation_tokens(and the matchingStreamEvent::UsageEventfields); opt-in Bedrock caching viaBedrockProviderConfig::with_cache(true). - Cancellation —
Agent::run_cancellable/run_stream_cancellabletake aCancellationToken(prelude re-export) and abort withKovaError::Cancelled, producing no messages. - Provider error classification —
ProviderErrorClassonKovaError::Provider { class },err.provider_class(), and the constructorsprovider_http/provider_invalid/provider_auth. See Error Types. - MCP resilience —
McpClient::reconnect(),tools/listcaching, andtools_call_with_timeout; a dead transport auto-reconnects once. See Connecting MCP Servers.
Changed (breaking)
KovaError::Providergained a requiredclassfield; build provider errors through the new constructors.is_retryable()now derives from the class.- OpenAI-compatible usage reports
input_tokensexcluding cached prompt tokens (they arrive incache_read_tokens), soinput_tokens + cache_read_tokensis the full prompt on every provider. - MCP transport-level I/O failures now surface as
KovaError::Connectioninstead ofKovaError::Mcp; server-reported JSON-RPC errors remainMcp.
0.7.0 — Streamable HTTP transport + OAuth tokens
Section titled “0.7.0 — Streamable HTTP transport + OAuth tokens”Added
McpTransport::StreamableHttp { url, headers, auth }— the MCP 2025 Streamable-HTTP transport. UnlikeHttpSse, it performs theinitialize/notifications/initializedhandshake, tracks the server’sMcp-Session-Idand echoes it on every request, and parses both plain-JSON and SSE responses.TokenProvidertrait (token(),refresh()) — a pluggable bearer-token source forStreamableHttp. The transport attachesAuthorization: Bearer …to each request and, on a401, callsrefresh()once and retries. Kova owns no OAuth logic; the host supplies tokens.
Stdio and HttpSse are unchanged and remain supported; prefer StreamableHttp
for modern remote servers. See Connecting MCP Servers.
0.6.0 — Thinking-token accounting
Section titled “0.6.0 — Thinking-token accounting”Added
UsageStats::thinking_tokens: Option<u32>— reasoning token count when the provider reports it separately. It’s a subset ofoutput_tokens(not additive);Nonemeans “unknown” rather than a misleading0.StreamEvent::UsageEvent::thinking_tokens— reasoning tokens on streaming usage events.
Changed
- OpenAI (o-series) and Gemini now surface reasoning-token counts; Bedrock and
Ollama fold them into
output_tokensand reportNone. See Thinking & Reasoning Models.
0.5.0 — MCP server configuration
Section titled “0.5.0 — MCP server configuration”Added
McpTransport::Stdio { env }— extra environment variables for the spawned MCP server process.McpTransport::HttpSse { headers }— extra HTTP headers on every JSON-RPC request (e.g.Authorization).
0.4.0 — Built-in tools
Section titled “0.4.0 — Built-in tools”Added
- Built-in tools (
kova_sdk::tools) behind two feature flags:tools—read_file,list_dir,search,edit_file,write_file,patch_file,shell(light deps).web-tools(impliestools) —fetch_webpageplus thefetch_textSSRF-guarded helper.
ToolPolicy/WebPolicy— injected, config-agnostic guardrails.register_all_tools()/register_all_tools_with_policy(...).- SSRF defense in web tools: private-address rejection, DNS-pinned client, per-hop redirect re-validation.
See Built-in Tools & ToolPolicy.
0.3.0 — Stateless agent loop
Section titled “0.3.0 — Stateless agent loop”Added
- Stateless core loop:
Agent::run(&[ConversationMessage]) -> AgentResponse— caller-owned history in, full result out, no memory store. Agent::run_with_config,Agent::run_stream(pull-basedAgentEventstream),Agent::chat_response.- Retries with exponential backoff (
RetryConfig, default 2), applied to provider calls and stream establishment;KovaError::is_retryable()/status_code(). - Provider feature flags (
openai,gemini,ollama,bedrock). InferenceConfig::top_p/stop_sequences;kova_sdk::prelude;AgentBuilder::metrics; tool approval decisions (ApprovedForSession,DeniedAlways,DeniedWithReason).
Changed
- Memory writes are transactional per turn — a failed turn leaves the conversation unchanged.
InMemoryStoretruncation is tool-pair safe (cuts at a user-message boundary).ToolRegistrymethods are synchronous;tool_definitionsreturns a cached value invalidated on registration.- Streaming decodes bytes line-wise (UTF-8 safe across chunk splits); parallel
tool-call deltas correlated by provider
index.
0.2.0 — Gemini and Ollama providers
Section titled “0.2.0 — Gemini and Ollama providers”Added
OllamaProvider/OllamaProviderConfig/OllamaThink— local models, no API key, NDJSON streaming.GeminiProvider/GeminiProviderConfig—x-goog-api-key,with_thinking_budget.OpenAiProviderConfig::with_reasoning_effort;BedrockProviderConfig::with_additional_model_request_fields.ModelResponse::thinkingandStreamEvent::ThinkingDeltaacross all four providers;Agent::last_turn_input_tokens;StreamEvent::UsageEvent.
0.1.0 — Initial release
Section titled “0.1.0 — Initial release”Added
Agentwith blocking (chat) and streaming (chat_stream) loops;AgentBuilderwith validation.LlmProvidertrait +OpenAiCompatibleProviderandBedrockProvider.Tooltrait + thread-safeToolRegistry.MemoryStoretrait +InMemoryStore(unbounded and capped).McpClient(stdio + HTTP+SSE) and theMcpTooladapter.StreamingHandlertrait + SSE parser.Orchestratorwith Sequential, Parallel, and Router patterns.TelemetryConfig(feature-gated OTEL) and always-availableMetricsCollector.- Unified
KovaErrorenum; compile-timeSend + Syncassertions.