interface Agent implements Transient

Methods

Stringable|string
instructions()

Get the instructions that the agent should follow.

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.

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.

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.

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.

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.

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.

Details

at line 23
Stringable|string instructions()

Get the instructions that the agent should follow.

Return Value

Stringable|string

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.

Parameters

AgentInput|UserMessage|Decisions|string $prompt
array $attachments
Provider|Lab|array|string|null $provider
string|null $model
int|null $timeout

Return Value

AgentResponse

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.

Parameters

AgentInput|UserMessage|Decisions|string $prompt
array $attachments
Provider|Lab|array|string|null $provider
string|null $model
int|null $timeout

Return Value

StreamableAgentResponse

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.

Parameters

AgentInput|UserMessage|Decisions|string $prompt
array $attachments
Provider|Lab|array|string|null $provider
string|null $model

Return Value

QueuedAgentResponse

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.

Parameters

AgentInput|UserMessage|Decisions|string $prompt
Channel|array $channels
array $attachments
bool $now
Provider|Lab|array|string|null $provider
string|null $model

Return Value

StreamableAgentResponse

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.

Parameters

AgentInput|UserMessage|Decisions|string $prompt
Channel|array $channels
array $attachments
Provider|Lab|array|string|null $provider
string|null $model

Return Value

StreamableAgentResponse

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.

Parameters

AgentInput|UserMessage|Decisions|string $prompt
Channel|array $channels
array $attachments
Provider|Lab|array|string|null $provider
string|null $model

Return Value

QueuedAgentResponse