Agent
interface Agent implements Transient
Methods
Get the instructions that the agent should follow.
Invoke the agent with a given prompt, or resume a paused run with tool approval decisions.
Invoke the agent with a given prompt and return a streamable response.
Invoke the agent in a queued job.
Invoke the agent with a given prompt and broadcast the streamed events.
Invoke the agent with a given prompt and broadcast the streamed events immediately.
Queue the agent with a given prompt and broadcast the streamed events.
Details
at line 23
Stringable|string
instructions()
Get the instructions that the agent should follow.
at line 28
AgentResponse
prompt(AgentInput|UserMessage|Decisions|string $prompt, array $attachments = [], Provider|Lab|array|string|null $provider = null, string|null $model = null, int|null $timeout = null)
Invoke the agent with a given prompt, or resume a paused run with tool approval decisions.
at line 39
StreamableAgentResponse
stream(AgentInput|UserMessage|Decisions|string $prompt, array $attachments = [], Provider|Lab|array|string|null $provider = null, string|null $model = null, int|null $timeout = null)
Invoke the agent with a given prompt and return a streamable response.
at line 50
QueuedAgentResponse
queue(AgentInput|UserMessage|Decisions|string $prompt, array $attachments = [], Provider|Lab|array|string|null $provider = null, string|null $model = null)
Invoke the agent in a queued job.
at line 60
StreamableAgentResponse
broadcast(AgentInput|UserMessage|Decisions|string $prompt, Channel|array $channels, array $attachments = [], bool $now = true, Provider|Lab|array|string|null $provider = null, string|null $model = null)
Invoke the agent with a given prompt and broadcast the streamed events.
at line 72
StreamableAgentResponse
broadcastNow(AgentInput|UserMessage|Decisions|string $prompt, Channel|array $channels, array $attachments = [], Provider|Lab|array|string|null $provider = null, string|null $model = null)
Invoke the agent with a given prompt and broadcast the streamed events immediately.
at line 83
QueuedAgentResponse
broadcastOnQueue(AgentInput|UserMessage|Decisions|string $prompt, Channel|array $channels, array $attachments = [], Provider|Lab|array|string|null $provider = null, string|null $model = null)
Queue the agent with a given prompt and broadcast the streamed events.