ῥῆμα · "the spoken word": words that do things.

A small, embeddable agent framework in Rust.

Run the coding agent that ships with it, write your own driver, or embed the engine. Every layer is a generic crate with a public interface.

host_agent.rs1 / 3
let mut agent = HostAgent::new(HostAgentConfig::new(
    AnthropicProvider::new(key),
    "claude-sonnet-5-5",
    workspace,
    AllowAll, // any approval hook
))?;

let reply = agent.turn(
      "Fix the failing tests", 
      &mut sink // any EventSink
    )
    .await?;

// agent.session() is saveable/resumable
let mut agent = Agent::builder()
    .provider(provider)
    .resolver(tools) // check_stock, ... any custom tool
    .system("You fulfill orders.")
    .model("model-id")
    .build()?;

let mut session = Session::default();
let reply = agent
    .turn("Can we fulfill an order of 8 units of SKU-42?",
          &mut session,
          sink, // any custom event sink
          &ToolContext::default())
    .await?;
// run_turn, the loop from rhema-core
// Agent::turn is the shorthand
pub async fn run_turn(
    agent: &mut Agent,
    session: &mut Session,
    input: Message,
    sink: &mut dyn EventSink,
    ctx: &ToolContext,
    max_iterations: NonZeroU32,
) -> Result<ModelOutput, AgentError> {
    session.history.push(input);
    let mut step = agent.step(session, sink, ctx).await?;
    let mut remaining = max_iterations.get() - 1;
    while step.output.stop_reason == 
      StopReason::ToolUse && remaining > 0 {
        step = agent.step(session, sink, ctx).await?;
        remaining -= 1;
    }
    Ok(step.output)
}

Assemble the host agent from your program, run turns.

01 · the workspace

Build at the right layer

Build at the layer you need: run a frontend, write it yourself on top of an existing agent, write your own agent, add a provider, embed the core.

layer 3 · frontends
Rhema Codebinary
the Rhema Code prompt and status line
The rhema binary: a full-screen terminal UI, a pipeable one-shot runner, the rhema acp subprocess.
layer 3 · protocol
rhema-acpThe Agent Client Protocol adapter: editors drive rhema-host-agent through rhema acp.
layer 2 · drivers
rhema-host-agentThe host-agent driver: the step engine wired to the bash and prompt tools, a session built to persist and resume.
rhema-cloud-agentThe harness the cloud frontends share: assembly without a filesystem, approval that round-trips through the client.
rhema-autonomous-agentThe resident-agent driver: sources, a lease-driven loop, a tool registry. Rhema Claw runs it.
layer 2 · extensions
rhema-subagentsMarkdown subagent definitions and the subagent tool: fresh agents with their own prompts.
rhema-mcpThe MCP client extension: configured servers join the agent as plain bash commands.
layer 1 · registries
rhema-provider-registryThe provider fleet's name-to-adapter wiring: one build call per rhema-config spelling.
rhema-websearch-registryThe web search fleet's name-to-adapter wiring: brave, exa, tavily behind one rhema-config spelling.
layer 1 · seams
rhema-sandboxThe sandbox seam: the Sandbox contract, the ShellSandbox adapter, the shared backend machinery.
rhema-session-storeThe seam every saved-session backend implements: the store trait, the session id, the picker row.
rhema-websearchThe web search vocabulary and the fallback chain: a query in, results out, providers tried in order.
layer 1 · tooling
rhema-bashOne tool, a command: approval-gated bash, the see and job macros, search as shell output.
rhema-promptThe system prompt: the Jinja renderer and the skills list; skill bodies load through bash when a trigger applies.
layer 1 · services
rhema-configThe config file: named profiles, stored keys, the active provider.
rhema-submissionsThe lifecycle layer for requested work: durable ids and statuses that survive a resume.
rhema-rsdResource-scoped dispatch: per-key leases, live inboxes, revision-guarded checkpoints.
rhema-memoryCross-session memory the model pulls through tools, never injected context.
rhema-identityThe accounts layer: accounts and their secrets, never shown to a model.
rhema-transcriptThe bounded view over an unbounded session: the request view, the slot algebra, the zoom tool.
layer 1 · sandbox backends
docker
ecrou
http
local
lxd
ssh
layer 1 · store and search backends
file
sqlite
brave
exa
tavily
layer 1 · provider adapters
anthropic
chatgpt
copilot
google
llama-cpp
mistral
opencode
openai-compatible
openrouter
layer 0 · core
rhema-coreThe step engine: request in, reply and tool results out.
rhema-providerThe adapters' shared base: model cards, pricing, SSE decoding.