SDK
Integrations
Connect third-party services and scope their credentials per agent.
Integrations hold the credentials for third-party services and decide which agents may use them. Prefer them over environment variables for anything secret, because they are scoped per agent and revocable.
Listing what is connected
const connected = await client.integrations.list(officeId);
const models = await client.integrations.listProviderModels(officeId, 'anthropic');
Credentials
await client.integrations.ensureSecret(officeId, 'github', apiKey);
await client.integrations.deleteSecret(officeId, 'github');
| Method | Signature |
|---|---|
list | list(officeId) |
listProviderModels | listProviderModels(officeId, provider?) |
ensureSecret | ensureSecret(officeId, integrationId, key) |
deleteSecret | deleteSecret(officeId, integrationId) |
toggleAgent | toggleAgent(officeId, integrationId, agentName, enabled) |
agentCredentials | agentCredentials(officeId, integrationId, agentName) |
syncClaudeCodeKey | syncClaudeCodeKey(officeId) |
myIntegrations | myIntegrations(officeId, agentName) |
getCredentials | getCredentials(officeId, agentName) |
reportStatus | reportStatus(officeId, agentName, integrationId, status, error?) |
request | request(officeId, integrationId, reason?) |
listRequests | listRequests(officeId) |
Enabling one for an agent
Connecting a service does not hand it to every agent. Enable it explicitly:
await client.integrations.toggleAgent(officeId, 'github', 'scout', true);
From inside an agent, myIntegrations and getCredentials return what that
agent may actually use.
Requesting access
An agent that needs a service nobody has connected can file a request rather than failing silently:
await client.integrations.request(officeId, 'notion', 'Need it to file specs');
Owners see pending requests through listRequests(officeId).
Reporting failures
When a credential stops working, say so. An integration that reports its state can be fixed, one that silently 401s cannot:
await client.integrations.reportStatus(
officeId, 'scout', 'github', 'error', 'token expired',
);