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

# Quickstart

Create an API key, install the SDK, and run Fantail or Moa from your host language.

The examples below use the current CLI-backed SDK flow where each wrapper starts or controls the Autohand runtime, streams events, and returns a final run result. Requests to Autohand-hosted models authenticate with `AUTOHAND_API_KEY`.

## 1\. Choose your language TypeScript

Pick the SDK you want to start with. The install command and first prompt example update to match.

 ! TypeScriptStableAutohand key! PythonStableAutohand key ! GoStableAutohand key ! JavaPreviewSnapshot ! SwiftPreviewProvider auth ! RustPreviewGit install ! RubyPreviewGit install ! C#/.NETPreviewSource option ! C++PreviewSource build

## 2\. Create an API key

Open [API Keys in the Autohand Console](https://console.autohand.ai/api-keys) and select **Create API Key**. Use a recognizable name for the machine, service, or environment that will run the SDK.

![Autohand Console API Keys page with the Create API Key action and one-time secret warning](/media/agent-sdk/console-api-keys.jpg)

01Open API Keys and select **Create API Key**.

![Autohand Console dialog for naming and creating an API key](/media/agent-sdk/console-create-api-key.jpg)

02Name the client or environment, then create and copy the key.

Close

1.  Enter a descriptive name such as `local-sdk` or `production-reviewer`.
2.  Select **Create Key**.
3.  Copy the raw key immediately. The Console will not show the complete value again.

**Keep the key server-side.** Do not place it in browser code, commit it to a repository, or include it in screenshots and logs. Revoke the key in the Console before rotating the client that uses it.

## 3\. Check prerequisites

-   Node.js or Bun.
-   The Autohand CLI config in `~/.autohand/config.json`.
-   A repo you want the agent to work in.

-   Python 3.10 or newer.
-   The Autohand CLI config in `~/.autohand/config.json`.
-   A repo you want the agent to work in.

-   Go 1.21 or newer.
-   The Autohand CLI config in `~/.autohand/config.json`.
-   A repo you want the agent to work in.

-   Java 21 or newer.
-   Maven 3.9 or newer.
-   The Autohand CLI config in `~/.autohand/config.json`.

-   Swift 6.0 or newer.
-   A provider key such as OpenAI or OpenRouter for the native Swift SDK.
-   A repo you want the agent to work in.

-   Rust 1.80 or newer.
-   Tokio runtime.
-   Autohand CLI installed, authenticated, and configured.

-   Ruby 3.2 or newer.
-   Bundler.
-   Autohand Code CLI installed with `bundle exec autohand-sdk install-cli` or supplied with `cli_path:`.

-   .NET 8 or newer.
-   Autohand CLI installed, authenticated, and configured.
-   Optional `AUTOHAND_CLI_PATH` for local CLI builds.

-   C++20 compiler.
-   CMake 3.22 or newer.
-   Autohand CLI installed, authenticated, and configured.

## 4\. Install the SDK

## 5\. Configure authentication

Export the key in the shell or secret manager that launches your application. The CLI-backed SDKs read `AUTOHAND_API_KEY` from the server environment.

Use `fantail` for focused, latency-sensitive coding loops and `moa` for deeper repository-wide work. The examples on the [documentation home page](/) show both model identifiers for every supported language.

If you bring your own provider instead, configure that provider in `~/.autohand/config.json` or through the provider-native SDK adapter. Keep every provider credential server-side.

## 6\. Run your first prompt

### Run the example

Completion checkpoint

### You’re connected when the response streams from your repository

The exact answer depends on the project. A successful first run should start without an authentication error, stream text into the terminal, and refer to files in the working directory.

-   ✓The runtime starts without an API-key or CLI-path error.
-   ✓Response events arrive before the final result completes.
-   ✓The answer names files or risks from the current repository.

[Check or rotate the API key](https://console.autohand.ai/api-keys) [Troubleshoot authentication →](/guides/troubleshooting.html) [Troubleshoot runtime startup →](/agent-sdk/concepts/cli-runtime-control.html)

## 7\. Next moves

-   Go to [Handle approvals and user input](/docs/agent-sdk/io/approvals.html) when you need human review in the loop.
-   Open the language guides: [TypeScript](/docs/agent-sdk/typescript.html), [Python](/docs/agent-sdk/python.html), [Go](/docs/agent-sdk/go.html), [Java](/docs/agent-sdk/java.html), [Swift](/docs/agent-sdk/swift.html), [Rust](/docs/agent-sdk/rust.html), [Ruby](/docs/agent-sdk/ruby.html), [C#/.NET](/docs/agent-sdk/csharp.html), [C++](/docs/agent-sdk/cpp.html).
-   Use the [streaming docs](/docs/agent-sdk/io/streaming.html) next if you are building a terminal UI, dashboard, or chat surface around the SDK.