The Mutagent client takes options controlling auth, the API endpoint, timeouts, and retries.
With no options it reads MUTAGENT_API_KEY from the environment and targets the hosted Platform.
Which workspace a call acts in
A workspace API key acts in its own workspace. With an organization API key, name the workspace in
each call’s request options, the last argument of every call:
client.workspaces.listWorkspaces() returns the IDs as workspaces[].id. See
API keys for the two kinds of key.
Errors
A call that fails throws. The error’s message is the platform’s own, for example
Invalid, expired or revoked API key. for a key that is not valid.
You rarely need to set anything — new Mutagent() with MUTAGENT_API_KEY exported is enough for
most scripts. Override serverURL only if you’re pointed at a non-default endpoint.