---
title: "Rust SDK Code Agent SDK"
source: https://docs.autohand.ai/agent-sdk/rust
---

# Rust SDK

The Rust SDK wraps the Autohand CLI in JSON-RPC mode and exposes async, typed APIs for prompts, event streams, permissions, and structured output.

**Repository:** [autohandai/code-agent-sdk-rust](https://github.com/autohandai/code-agent-sdk-rust). This SDK is in beta while the Agent SDK APIs stabilize. Pin commits or package versions in production.

## Requirements

-   Rust 1.80 or newer.
-   Tokio runtime.
-   Autohand CLI installed, authenticated, and configured.

## Install

## Run your first agent

Start with the high-level agent API when you want the SDK to own the run lifecycle and final result collection.

## API shape

-   High-level \`Agent\` and \`Run\` APIs for application workflows.
-   Low-level \`AutohandSdk\` for direct JSON-RPC control.
-   Typed \`SdkEvent\` helpers for message deltas, tool events, permissions, and errors.
-   Structured JSON helpers through \`run\_json\` and \`JsonRunOptions\`.

## Low-level control

Use \`AutohandSdk\` when your host needs direct access to plan mode, model switching, permission responses, or raw JSON-RPC calls.

## Next steps

-   Use [Quickstart](quickstart.html) for the cross-language setup flow.
-   Open [Rust API](rust-api.html) for the reference surface.
-   Read [Stream responses in real-time](io/streaming.html) and [Handle approvals and user input](io/approvals.html) for shared runtime behavior.