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

# Autohand Code Agent SDK

Embed the Autohand Code runtime inside your own products, tools, and workflows. The SDK gives you the same agent loop that started in the CLI, with structured events and approvals your app can own.

## Why we built this

Autohand Code started in the CLI. Teams then asked for editor integrations, so we added ACP and a JSON protocol for external clients. The next request was more direct: teams wanted the agent loop inside product surfaces, internal tools, terminals, dashboards, and deployment flows.

The Code Agent SDK is that embedding layer. Start an agent, stream every event, handle permission requests, and keep session state close to the app that owns the workflow.

## Language status

The SDK family now includes the CLI-backed wrappers for TypeScript, Python, Go, Java, Rust, Ruby, C#/.NET, and C++, plus the native Swift SDK.

### TypeScript

Mainline SDK for Node.js, Bun apps, CLIs, and internal tooling.

### Python

Async-first wrapper with typed event parsing and clean lifecycle management.

### Go

Context-aware package with typed events and channel-based streaming.

### Java

JVM wrapper with builder-style configuration and sealed event types.

### Swift

Native Swift concurrency with local tools, hooks, and agent loop strategies.

### Rust

Tokio-based crate with typed events, stream-based runs, and JSON helpers.

### Ruby

Ruby gem with enumerator streams, Rails-friendly configuration, and JSON helpers.

### C#/.NET

.NET package with IAsyncEnumerable, CancellationToken, and System.Text.Json.

### C++

Modern C++20 package with CMake targets and typed event callbacks.

## Core workflow

Every CLI-backed SDK page in this section follows the same runtime path.

-   Start or create an agent session.
-   Send a prompt or prompt params object.
-   Stream `message_update`, `tool_*`, and `permission_request` events.
-   Reply to approvals when the runtime pauses.
-   Wait for the final result or keep the session alive for the next run.

## What you get

Events

### Stream the runtime

Build terminal UIs, approval flows, logs, and structured automations from typed events instead of scraping plain text output.

Permissions

### Control autonomy

Choose interactive review, restricted execution, or unattended runs, then answer approval requests from your own interface.

Sessions

### Keep context alive

Reuse an agent across prompts, preserve history, and separate planning steps from execution inside the same application flow.

Tools

### Extend the agent

Use built-in file, shell, git, and search tools, then add MCP or custom tools when your product needs domain-specific actions.

## Next steps

### Quickstart

Pick a language, install the SDK, and run a first prompt with current package names.

### Approvals

Wire the permission flow so your app can pause, ask, allow, or deny cleanly.

### Language guides

Jump into the language-specific setup and event examples for your runtime.