Skip to main content
All interfaces use camelCase field names. On the wire the API uses snake_case JSON, and the SDK maps between the two for you. Import any of these as types from @amika/sdk:
Optional fields may be undefined. Required fields that the server can leave empty are typed T | null. Your editor shows each field’s documentation on hover.

Rigs

  • repoUrl is a clone URL. The SDK does not detect a local Git checkout.
  • envVars sets literal environment variables. secretEnvVars maps an environment variable name to a stored secret name. See Inject credentials.
  • snapshot takes a snapshot slug to boot from. null opts out of the repository’s default snapshot. Omit it to keep the default.
  • agentCredentials picks which stored agent credentials the rig receives. Omitting it injects none.
  • githubAuthMode picks how the rig authenticates to GitHub, such as app_token or pat. Omit it to use the server default.
  • hostId runs the rig on one of your organization’s own hosts. Get the ID from amika host get <hostname>. An empty string throws. With hostId:
    • size names one of that host’s own sizes;
    • the server rejects provider, autoStopInterval, and autoDeleteInterval;
    • a snapshot must have been taken on that same host.
    See Bring your own compute.
Each entry configures one agent kind, at most one entry per kind:
  • { kind } alone lets the server pick: the repository default, then your OAuth credential, then your API key.
  • name picks a stored credential by name.
  • type picks your single credential of that type.
  • none: true injects nothing for that kind.
  • Use rig.wait() rather than reading status or state yourself. It checks both the lifecycle status and setupStatus.
  • services is a short summary. Use client.services.list() for full service records.
  • secretNames and mountedSecrets describe injected secrets. Values are never returned.
  • resolvedAgentCredentials reports, per requested kind, whether a credential was injected and why not if it was skipped.

Agent sessions

AgentSendResponse is the same type as AgentSessionSendResponse. Claude reports usage; Codex currently doesn’t.
agentSessions.get() returns an AgentSession: an AgentSessionDetail with bound refresh(), send(), and sendStream() methods.

Snapshots

Services

Secrets

Agent credentials

Repositories

Deprecated aliases

Sandbox-named types such as RemoteSandbox, CreateSandboxRequest, SandboxSnapshot, and SandboxServiceResource remain as deprecated aliases of the rig-named types. Some rig types also carry legacy field spellings, such as providerSandboxId next to providerRigId, with the same value.