Authentication and scope
Platform users log in withPOST /api/auth/login and {"username":"...","password":"..."}, then send the returned token as Authorization: Bearer TOKEN. This identity manages Agents, Teams, Workflows, and Applications. Application backends instead use X-API-Key credentials issued under an Application, restricted to explicit target grants and scopes.
Set X-AgentScope-Tenant and X-AgentScope-Namespace for scoped requests. Body and query scope fields, when supplied, must agree. Runtime Host, Task/Attempt, and Environment credentials belong to their execution protocols and cannot substitute for Session API credentials.
Applications and credentials
An Application records the caller, members, and quotas. Credential creation requires explicittargets and scopes and returns the complete apiKey once. Listing credentials never returns plaintext keys. A credential does not automatically gain management permissions or a designated human’s approval identity.
Credential scopes are
invoke, read, interact, cancel, and webhooks:write. Application member roles are viewer, operator, and approver. Concurrency limits bound outstanding work. tokenBudget uses reported usage to govern further calls; it is not a provider prepaid hard limit.
Session and Turn API
Paths below use/api/v1/agent-sessions as their prefix. Set target.type to agent, team, or workflow, and target.id to that resource’s ID. Agents optionally accept version; Workflows accept revisionId. When omitted, the version is resolved and frozen at Session creation for subsequent Turns.
Managed Sessions also accept environmentId, memoryStoreIds, vaultIds, agentOverrides, and resources. General options include timeoutSeconds, budget.maxTokens, inputSchema, outputSchema, and resultMapping. Supply business input and output constraints when creating the Session.
Managed
/budget, /checkpoints, /fork, /inputs/inject, /subagents, and /export extend the same API. They are not supported by every target; follow the Session guide and capabilities. See Files and SSE for formats and signatures.
Agent catalog and runtime bindings
These operations use platform identity. Keep tenant/namespace fields, query parameters, and headers consistent. An Agent ID, business key, and display name are distinct. See Agent management for creation and registration workflows.binding.kind is managed, hosted-runtime, or external-application. Managed creation generates its configuration. Hosted uses runtimeProfileId and runtimePoolId. External applications use registration rather than creating a supposedly online instance through the catalog endpoint.
POST /api/v1/agent-registrations accepts agentKey, instanceKey, scope, framework, routingKey, capabilities, and related fields. It returns agent, binding, instance, and registrationCredential. This entry point currently does not authenticate callers; deployment must restrict it to trusted registration traffic. Returning a credential does not mean initial registration was authenticated. See External configuration.
Work, orchestration, automation, and resource parameters
These guides document request fields, responses, and operation sequences. Visual workflows live in the separate Console module.SDKs and runnable examples
PythonManagementClient prepares resources and credentials; ServiceClient creates Sessions, submits Turns, and reads results. The TypeScript client is in frontend/src/api/serviceSessions.ts. Runtime registration and reporting SDKs connect executors and have a separate responsibility from application clients.
service-controlplane/examples/service-api creates Sessions for an Agent, Team, and Workflow. Clients do not approve tools or create a new task automatically after a network error. Persist Session IDs, Turn IDs, and idempotency keys and follow the API guide for recovery.
Errors and version conflicts
For400, check the request. 401 indicates invalid credentials and 403 insufficient permission. 404 can mean absent or inaccessible data and should not reveal another user’s resources. With 409, check state, versions, or changed idempotent requests. Event 410 requires a fresh snapshot. Back off on throttling and transient errors while preserving the logical request’s idempotency key.
Read the current version before updating management resources. Issue decisions and Workflow publication use expectedVersion; Agent definition updates use their own version fields. Do not automatically replay an outdated human decision with a newer version.
The machine-readable contract is agentscope-service/docs/service-api/openapi-v1.json. It lists Session API and application credential paths. Migration from the previous entry points is described in the adjacent session-api-migration.md.