Skip to main content

Install

Cargo.toml
[dependencies]
meerkat = "0.1"
tokio = { version = "1", features = ["full"] }

Run an agent

let result = meerkat::with_anthropic(std::env::var("ANTHROPIC_API_KEY")?)
    .model("claude-sonnet-4-5")
    .run("What is the capital of France?")
    .await?;
println!("{}", result.text);

Switch providers

Same code, different model. The provider is inferred from the model name:
rkat run --model claude-sonnet-4-5 "Explain monads"
rkat run --model gpt-5.2 "Explain monads"
rkat run --model gemini-3-flash-preview "Explain monads"

Add tools

Register an MCP server and its tools are available to the agent immediately:
rkat mcp add filesystem -- npx -y @anthropic/mcp-server-filesystem /tmp
rkat run "List the files in /tmp"

Enforce budgets

Cap token usage, wall-clock time, or tool calls:
rkat run --max-total-tokens 10000 --max-duration 30s --max-tool-calls 5 "Analyze this codebase"
The agent completes its current turn when a limit is hit, then stops.

What’s next