Skip to content

Quick Start

Heartbit uses Anthropic’s Claude models by default. Export your API key:

Terminal window
export ANTHROPIC_API_KEY=sk-...

Pass a task directly to the CLI. No config file needed:

Terminal window
heartbit "Analyze the Rust ecosystem"

Heartbit runs in standalone mode by default — a single agent with 14 built-in tools (bash, file read/write, search, and more), no infrastructure required.

Start a multi-turn REPL session:

Terminal window
heartbit chat

Type your messages and the agent responds conversationally, maintaining context across turns. Press Ctrl+C to exit.

For multi-agent setups or custom configuration, create a heartbit.toml:

[provider]
name = "anthropic"
model = "claude-sonnet-4-20250514"
[[agents]]
name = "researcher"
description = "Research specialist"
system_prompt = "You are a research specialist."
[[agents]]
name = "writer"
description = "Writing specialist"
system_prompt = "You are a writing specialist."

Then run with the config:

Terminal window
heartbit run --config heartbit.toml "Write an article about Rust"

The orchestrator automatically delegates subtasks to the appropriate sub-agent.

VariableDefaultDescription
ANTHROPIC_API_KEYAnthropic API key (required)
HEARTBIT_MAX_TURNS50Maximum agent turns per task
HEARTBIT_TOOL_PROFILEstandardTool filtering: conversational, standard, or full
HEARTBIT_SESSION_PRUNEfalseTrim old tool results before LLM calls
HEARTBIT_RECURSIVE_SUMMARIZATIONfalseCluster-then-summarize for long conversations
FlagDescription
--config <path>Path to heartbit.toml
--approveEnable human-in-the-loop approval for tool calls
-v, --verboseEmit agent events as JSON to stderr

Ready to embed Heartbit in your own Rust application? Continue to Your First Agent.