Skip to main content
The TypeScript SDK wraps the hosted Amika API. This page gets you from install to a running agent in a few lines. The source lives in the amika repo under sdk/typescript.

Install

Get an API token

Generate an Amika API key in the web UI at app.amika.dev/settings. The SDK does not read it from your environment automatically — you pass it to the client.

Create a client

The client appends the API path prefix (/api/v0beta1) to baseUrl for you, so pass just the origin.
accessToken and tokenSource are mutually exclusive. For tokens that need to be fetched or refreshed, use a tokenSource instead — see Token sources.

Create a sandbox and run an agent

Timeouts and polling

  • Default HTTP timeout: 30 seconds.
  • agentSend HTTP timeout: 10 minutes — it blocks until the agent finishes.
  • waitForSandbox / waitForSandboxStart / waitForSandboxStop poll every 3 seconds with no client-side timeout. They throw if the sandbox enters the failed state.

Next steps

Client reference

Every method on AmikaClient.

Types

Request and response interfaces.

Errors

AmikaError, AmikaHTTPError, and agent-auth detection.

Token sources

Static tokens and custom token providers.