Agents & Provisioning

Switch between Python and TypeScript code examples using the language tabs.
The AgentsClient manages the full agent lifecycle. Access it via zaby.agents.

Create an agent

body
dict
required
Agent configuration object
body.name
string
required
Display name for the agent
body.slug
string
required
URL-friendly identifier. Must be unique per tenant.
body.description
string
Human-readable description of the agent’s purpose
id
string
Unique agent identifier
status
string
Initial status — always “DRAFT”
name
string
Display name
slug
string
URL identifier
createdAt
string
ISO-8601 creation timestamp

Getting Started

Create, publish, and deploy your first agent in 5 minutes.

Runtime Client

Start runs and stream agent responses.

Manage agents

The current SDK does not include dedicated get, list, update, or delete methods on AgentsClient. These can be performed via direct API calls using the provisioning endpoints:
  • List: GET /api/v1/provisioning/agentic-os/agents (cursor-based pagination)
  • Get: GET /api/v1/provisioning/agentic-os/agents/{agentId}
  • Update: PATCH /api/v1/provisioning/agentic-os/agents/{agentId}
  • Delete: DELETE /api/v1/provisioning/agentic-os/agents/{agentId}

Publish and deploy

Agents start in DRAFT status. Publishing creates a version snapshot; deploying makes it live.
1

Publish

id
string
Version identifier (used for deployment)
2

Deploy

agent_version_id
string
required
Version ID from the publish step
environment
string
required
One of “TEST” or “PRODUCTION”
The deployment returns immediately with status PENDING. Cloudflare provisioning runs in the background. The deployment transitions to ACTIVE after roughly 12 minutes. Calling getProvisioning() before the deployment is ACTIVE returns 404.
3

Get provisioning details


External apps

External apps represent your application that embeds Zaby agents. They bridge deployments to runtime tokens.

Create

name
string
required
Display name
slug
string
required
Unique identifier
allowedOrigins
string[]
CORS origins for browser-based runtime
tokenTtlSeconds
number
Default TTL for generated tokens

Manage

deploymentId
string
required
Deployment to bind
allowBrowserRuntime
boolean
Enable browser-based runtime
allowServerRuntime
boolean
Enable server-side runtime (required for ZabyRuntime)
allowApprovals
boolean
Enable approval requests during runs

Runtime tokens

Create disposable JWT tokens for the ZabyRuntime client.
A quota policy must be created first and its ID passed as quotaPolicyId. Without it, the server returns a 500 error: “Cloudflare runtime sync snapshot is missing quotaPolicyId”.
input
dict
required
Single object with all parameters
input.externalAppId
string
required
External app ID
input.deploymentId
string
required
Deployment ID
input.quotaPolicyId
string
required
Quota policy ID (create via runtimeTokenPolicies.create)
input.externalUserId
string
required
End-user identifier
input.externalSessionId
string
Session identifier
input.channel
string
Runtime channel: "server", "web", "mobile" (default: "server")
input.ttlSeconds
number
Token lifespan in seconds (default: 600)
input.maxUses
number
Maximum uses before token expires
input.scopes
string[]
Permission scopes for the token

Record feedback

Record runtime feedback using the runtime token context:
run_id
string
required
Run identifier

Rotate tokens

Rotate the current runtime token, issuing a new one with the same claims:

Rotate by unique ID

Rotate a specific runtime token using its uniqueIdHash and externalAppId:

Revoke token family

Revoke an entire token family by family ID, invalidating all tokens within it:

Attach tools & knowledge


Test & run


Approvals

run_id
string
required
Run identifier
approval_id
string
required
Approval request identifier

Usage analytics

MCP Client

Manage MCP servers, tools, and installations.

Knowledge Bases

Create and manage knowledge bases with documents.

Memory Client

Store and retrieve agent memory items.

Intelligence Client

Signals, rollups, and improvement tracking.