Runtime Client
Switch between Python and TypeScript code examples using the language tabs.
ZabyRuntime client is for interacting with deployed agents at runtime. Unlike Zaby, it uses a JWT token for authentication rather than an API key.
See Runtime Tokens for generating a JWT from zaby.runtime_tokens.create().
- Python
- TypeScript
For non-production environments, use
configureZaby() to set the API origin before creating ZabyRuntime:- Python
- TypeScript
Create a Runtime Token
Generate a JWT from
zaby.runtime_tokens.create() or zaby.runtimeTokens.create()Agents Client
Create, publish, and deploy agents.
Start a run
The user’s message to the agent
Idempotency key for safe retries — use a unique value per request
- Python
- TypeScript
Unique run identifier
Run status:
"COMPLETED", "FAILED", or "PENDING"Agent’s final response text (present when status is COMPLETED)
Stream agent responses
Stream real-time agent output via Server-Sent Events.- Python
- TypeScript
Event types
SseEvent fields
Event type identifier
Parsed JSON payload
Optional event ID for tracking
Retrieve events
Fetch stored events for a completed run:Maximum events to return (default: 50)
- Python
- TypeScript
Approvals
Respond to approval requests during a run:- Python
- TypeScript
Feedback
Rating score from 1 to 5
Optional free-text feedback
- Python
- TypeScript
Complete example
Requires the full agent lifecycle: create agent → publish → deploy → bind external app → create quota policy → generate runtime token.
- Python
- TypeScript
Agents & Provisioning
Full agent lifecycle reference.
Testing
Mock SSE streaming with MockTransport.

