Create a new task and task run.
If wait_for_completion is false (default), the task executes in the background via Cloud Tasks and returns immediately with the task ID and run ID. If wait_for_completion is true, waits for task completion and returns the result.
Request model for creating a new task and task run.
The task to be performed by the agent
3The JSON schema for the task result
The model to use for the task. Defaults to 'gpt-4.1'.
The provider to use for the task. Defaults to 'openai'.
The webhook URL to send the result to
Whether to return the result as text or JSON
The id of associated auth context
The initial URL to navigate to before executing the task
The timeout for the task in seconds
Whether to wait for the task to complete before returning the response. If false, the task will be executed in the background and the response will contain only the task ID.
Successful Response
Represents a Run.
The ID of the created task run
The ID of the created task
The status of the agent's task
success, failure, pending The final result of the agent's task
Whether the agent has completed its task
Whether the agent was successful in completing its task