Installation

AutohandSDK

Main async API for controlling the Autohand CLI.

Constructor

Common args: cwd, cli_path, debug, timeout, model, provider, api_key, permission_mode, skills, etc.

Lifecycle

Also supports async context manager: async with AutohandSDK(...) as sdk:

Prompting

Control Methods

Information Methods

Events

Events are dictionaries. Common types:

  • agent_start - Agent started a session
  • message_update - Streaming assistant text delta
  • tool_start - Tool execution started
  • tool_end - Tool execution completed
  • permission_request - Runtime pause for approval
  • error - Transport, runtime, or execution failure

Common fields have both camelCase and snake_case aliases: sessionId/session_id, toolName/tool_name, etc.

Types

SDKConfig

Exceptions

  • TransportNotStartedError - request attempted before start()
  • RequestTimeoutError - no JSON-RPC response before timeout
  • RPCError - CLI returned a JSON-RPC error response (has code and data)

See Also