Start task (streaming)
Starts an agent task and streams events via SSE (Content-Type: text/event-stream).
Body ParametersJSON
Instruction is the task prompt for the agent.
AgentIcon is optional client metadata used by task history UIs. It is captured by go-backend before proxying and ignored by older agent servers.
AgentType is accepted for legacy clients. Current agent servers ignore it.
ComputerID reuses a live computer session, or restores a saved persistent session with the same ID if it is not currently live.
EnvironmentID restores a previous persistent session snapshot. Prefer ComputerID with the saved computer/session ID for new integrations.
IdempotencyKey deduplicates retried task start requests.
KeepAlive is a user-friendly alias for terminate_on_completion=false.
MaxDurationSeconds caps wall-clock runtime before the server cancels the task.
MaxSteps caps how many agent loop steps can run before max-steps termination.
Metadata is customer-defined task metadata for correlating with external workflows.
Model is the LLM model to use. Omit to use the agent server default.
Persistent controls whether the computer session should persist state on teardown.
SaveSession is a user-friendly alias for Persistent.
StartURL opens this URL before the agent starts. Omitted kind defaults to browser.
StreamDeltas streams per-token text deltas as progress_update events when supported.
SystemPrompt is appended to the harness system message.
Temperature controls LLM sampling temperature. Omit to use the harness default.
TerminateOnCompletion controls whether the task should terminate its computer automatically. Set false to keep the computer alive for handoff or inspection.
ThreadID is optional client metadata for grouping task history by chat thread. It is captured by go-backend before proxying and ignored by older agent servers.
ViewportHeight is the browser viewport height in pixels.
ViewportWidth is the browser viewport width in pixels.
Returns
Start task (streaming)
curl https://api.tzafon.ai/agent/tasks/stream \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TZAFON_API_KEY" \
-d '{
"instruction": "instruction"
}'