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

TypeScript

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

Read the guide
Python

Python

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

Read the guide
Go

Go

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

Read the guide
Java

Java

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

Read the guide
Swift

Swift

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

Read the guide
Rust

Rust

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

Read the guide
Ruby

Ruby

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

Read the guide
C#/.NET

C#/.NET

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

Read the guide
C++

C++

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

Read the guide

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.

Open quickstart

Approvals

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

Read approvals

Language guides

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

Start with TypeScript