---
title: "Go API Reference Code Agent SDK"
source: https://docs.autohand.ai/agent-sdk/go-api
---

# Go API Reference

Complete API reference for the Autohand SDK Go. The SDK spawns the Autohand CLI as a subprocess and communicates over JSON-RPC.

## Installation

## Config

All fields are optional.

## Low-Level API

### AutohandSDK

#### Prompting

#### Control Methods

#### Information Methods

## High-Level API

### Agent

### Run

## Events

StreamPrompt and Run.Stream return channels of typed events:

-   `MessageUpdateEvent` - Streaming assistant text delta
-   `ToolStartEvent` - Tool execution started
-   `ToolEndEvent` - Tool execution completed
-   `PermissionRequestEvent` - Runtime pause for approval
-   `ErrorEvent` - Transport, runtime, or execution failure

## Error Handling

The SDK returns errors from the standard `error` interface.

## See Also

-   [Go SDK Overview](go.html)
-   [CLI Quick Start](../guides/cli-quick-start.html)