Agent Device Cloud
Sign in

API and errors

One contract across every interface

HTTP, CLI, MCP, the TypeScript client and the official Skill share the same invocation, policy and result semantics.

Authentication boundaries

Owner session
A browser session or CLI management session administers devices, authorizations, approvals and account settings. State-changing requests require the deployment origin.
Agent connection
A revocable Bearer credential can inspect only its bound authorization and invoke only the tools, folders and devices in that grant.
Device identity
Connector routes use an Ed25519 signature, timestamp and one-time nonce. Device credentials are not accepted by owner or Agent routes.

Core HTTP surface

The browser console and official clients use the same versioned API. The table highlights stable integration points; management clients should prefer the typed client rather than reconstructing response types.

Approvals and audit use newest-first cursor pagination. Pass limit (1–100) and the returned nextCursor as cursor; approvals accepts status=pending|resolved, while audit accepts category=dispatch|approval|task|node|grant|credential|oauth or an exact invocationId.

MethodPathIdentityPurpose
GET/api/v1/meOwner or AgentInspect the current identity and scope.
GET/api/v1/nodesOwnerList paired devices and effective capabilities.
GET/api/v1/overviewOwnerRead bounded console counts and recent activity.
GET/api/v1/projects?include=rootsOwnerList projects and their roots in one request.
POST/api/v1/pairing-codesOwnerCreate a short-lived, one-time pairing code.
GET · POST/api/v1/grantsOwnerList or create Agent authorizations.
PATCH · DELETE/api/v1/grants/:grantIdOwnerUpdate with a revision or delete an authorization.
POST/api/v1/invocationsAgentSubmit a typed tool invocation.
GET/api/v1/invocations/:invocationIdOwner or AgentResume an invocation across approval and dispatch.
GET/api/v1/tasks/:jobIdAgentRead the current task state or terminal result.
POST/api/v1/tasks/:jobId/cancelAgentRequest cancellation for an active task.
GET/api/v1/approvalsOwnerPage pending or resolved approvals with a cursor.
GET/api/v1/auditOwnerPage and filter account-scoped activity records.

Invocation envelope

Identity fields are derived from the Agent connection by official clients. Targets and absolute paths must remain inside the current grant. Side-effecting tools also require an idempotency key.

JSON
{
  "schemaVersion": "0.1",
  "invocationId": "inv_example001",
  "attemptId": "att_example001",
  "accountId": "acct_example001",
  "actor": { "type": "agent", "id": "actor_example001" },
  "target": { "nodeId": "node_example001" },
  "authorization": {
    "grantId": "grant_example001",
    "rootIds": ["root_workspace001"]
  },
  "tool": "file.read",
  "args": { "path": "/Users/me/work/README.md" },
  "issuedAt": "2026-09-29T10:00:00.000Z",
  "expiresAt": "2026-09-29T10:05:00.000Z",
  "metadata": { "source": "sdk" }
}

Results and task state

A successful HTTP response can still carry a domain status such as denied, approval_required or offline. Track approval_required by invocationId; queued and running results include a jobId for task polling.

JSON
{
  "schemaVersion": "0.1",
  "invocationId": "inv_example001",
  "attemptId": "att_example001",
  "status": "offline",
  "error": {
    "code": "offline",
    "message": "No authorized device is online.",
    "retryable": true
  }
}

Stable error semantics

CodeRetryRequired action
invalid_requestNoFix the request schema or arguments.
expiredNoCreate a new invocation with a new deadline.
deniedNoReview the grant, device policy and local scope.
approval_requiredAfter approvalResolve the pending approval before it expires.
offlineYesWait for device presence, then retry.
conflictConditionallyRefresh state; never overwrite a newer revision.
lease_expiredConditionallyRead task state before creating more work.
unknown_outcomeNo automatic retryReconcile the device effect and receipt first.
internalWhen retryableUse bounded backoff and retain the same request identity.

Never turn unknown_outcome into an automatic retry. Reusing the exact idempotency key can recover a durable receipt; inventing a new key can repeat the side effect.