v0.3.1
Highlights
Two new model providers land in this release: a native Anthropic Messages API adapter (with streaming + server tools) and a Cerebras inference adapter. Both ship as standalone crates and slot into the existing Agent::builder().model(...) flow.
What's Changed
agentkit-provider-anthropic
First-class Messages API provider — not the OpenAI-compatibility shim. Streams deltas, surfaces cache_creation_input_tokens / cache_read_input_tokens for prompt caching, and threads Anthropic server tools (web search, code execution) through the standard LoopObserver event stream.
use agentkit_core::{Item, ItemKind};
use agentkit_loop::{Agent, LoopStep, SessionConfig};
use agentkit_provider_anthropic::{AnthropicAdapter, AnthropicConfig};
let config = AnthropicConfig::from_env()?; // ANTHROPIC_API_KEY + ANTHROPIC_MODEL
let adapter = AnthropicAdapter::new(config)?;
let mut driver = Agent::builder()
.model(adapter)
.input(vec![Item::text(ItemKind::User, "Summarise the news from today.")])
.build()?
.start(SessionConfig::new("anthropic-demo"))
.await?;
while let LoopStep::Interrupt(_) = driver.next().await? { /* cooperative yields */ }agentkit-provider-cerebras
Adapter for Cerebras' OpenAI-style /v1/chat/completions with the full Cerebras feature surface exposed through CerebrasConfig: reasoning modes, output formats, predictions, queue thresholds, request encoding (raw / brotli), service tiers, and rate-limit snapshots.
use agentkit_provider_cerebras::{CerebrasAdapter, CerebrasConfig, ReasoningConfig, ReasoningEffort};
let config = CerebrasConfig::new(std::env::var("CEREBRAS_API_KEY")?, "qwen-3-235b-a22b-thinking-2507")?
.with_reasoning(ReasoningConfig::new().with_effort(ReasoningEffort::High))
.with_streaming(true);
let adapter = CerebrasAdapter::new(config)?;
let mut driver = Agent::builder()
.model(adapter)
.input(vec![Item::text(ItemKind::User, "Solve x^2 - 4 = 0.")])
.build()?
.start(SessionConfig::new("cerebras-demo"))
.await?;The full feature matrix is exercised in the new examples/cerebras-chat REPL — every CerebrasConfig knob is reachable via CLI flag, runtime state (rate-limit snapshot, last-turn usage, computed headers) is inspectable via slash commands.
Commits
- feat(anthropic): Messages API provider with streaming + server tools (#2)
- feat: cerebras inference provider (f3bdd94)
Full Changelog: v0.3.0...v0.3.1