Quick Start
AgentResponse
The main response object returned byagent.run().
Properties
Methods
has_files()
Check if the response contains generated files.files (property)
Get the list of generated files.to_dict()
Convert response to dictionary.Example
AgentStream
A single chunk from a streaming response. Yielded when usingstream=True.
Properties
Methods
has_files()
Check if the chunk contains generated files.files (property)
Get generated files from the chunk.to_dict()
Convert chunk to dictionary.Example
Streaming with Progress
Artifact
Represents a generated file whenfile_output=True.
Properties
Methods
download()
Download the artifact to a local file.Example
TaskResponse
Response from creating a long-running task.Properties
TaskStatus
Status of a long-running task.Methods
is_complete()
Check if task has finished (completed or failed).is_successful()
Check if task completed successfully.Structured Responses
When usingresponse_model, responses are parsed into Pydantic models: