Repository: 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