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 runs 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

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>' } }).
Environment calls also take a short-lived sandbox token that you get from your API key. The Environments page shows how (TypeScript, Python).

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: Version 0.7 also adds calls to groups you already use: