asapi), the agentservice CLI, or (soon) Node.js.
Before you begin
- Python 3.10+ if you use the Python client or install the CLI via pip.
- A virtual environment (recommended):
- An API key from your workspace: Sudoiq settings.
The PyPI project may be published as
asapi or agentserviceapi; the import is asapi unless your release notes say otherwise. The CLI wheel package name is agentservice.Run one agent (pick your surface)
Use the dropdown to switch between Python, Node.js, and CLI. The Python and CLI paths use a long-lived streaming connection (server-sent events, SSE) when the API supports it, so your process can wait for completion without polling in your own code.Python
Python: editable install
If you develop the client from a clone:What happens under the hood
The Pythonrun_agent / execute_agent path opens a streaming HTTP connection after starting the run; the server pushes status updates. When the model calls tools, you can supply local handlers (see Interactive runs and local tools).
The CLI execute ... --wait follows the same idea: it prefers that streaming path when the bundled client supports it and only falls back internally if streaming is unavailable (see agentservice execute --help).
For runs that may last hours or days, consider webhooks instead of holding a connection open — see Running agents and Webhooks.