Skip to main content
The Mutagent SDK does from code what the mutagent CLI does from a terminal. Use it when your own application, backend or test suite needs to manage your account or start Helix in the cloud.

Your first call

This lists your workspaces and the LLM providers in the workspace your key belongs to. Set MUTAGENT_API_KEY to an API key first. See API keys.
An empty provider list means the workspace has no LLM providers yet. Add one with mutagent providers add or from the SDK (TypeScript, Python).

What the SDK covers

For cloud sessions and managed agents, see Helix Cloud.

Keys and workspaces

Every call acts in one workspace:
  • With a workspace API key, calls act in that key’s workspace. Nothing else to set.
  • With an organization API key, send the workspace as the x-workspace-id header in the call’s request options. For example, in TypeScript: client.llmProviders.listProviderConfigs({}, { headers: { 'x-workspace-id': '<workspace-id>' } }).
Helix Cloud and Environment calls also take a short-lived sandbox token that you get from your API key. The Helix Cloud page shows how.

Added in TypeScript SDK 0.7

These groups need @mutagent/sdk 0.7 or later; the install command above gets a newer version. The Python SDK does not have them yet.
Version 0.7 adds these groups to the TypeScript client: client.helixSessions and client.helixCloud both start cloud sessions; use the one that fits the job. client.helixSessions launches a session in a sandbox (headless or interactive, managed agents included) and drives it by its reference: send, signal, checkpoint, restore, stream. It is what the CLI uses, and what the Helix Cloud page documents. client.helixCloud starts the sessions the web app shows: a session with a goal and, optionally, a repository branch, which you can list, rename, archive, answer approvals for and attach files to. For scripted runs and managed agents, use client.helixSessions. Version 0.7 also adds calls to groups you already use: