Skip to content

UseAgentRunResult

UseAgentRunResult = AgentRunsSnapshot & object

Defined in: packages/react/src/lib/use-agent-run.ts:16

What useAgentRun() returns: the Agent Run snapshot plus a way to send input.

The agent loop is experimental in 0.3 and may change in any minor release.

readonly sendMessage: (text, options?) => AgentMessageSubmission

Sends text to the agent through Orchestrator.sendMessage and returns the input id and a result promise at once. The input appears in the snapshot as pending before the frame is sent. result settles once with the run state at that moment and never rejects, and a message that never left the client settles not_submitted. A lost result may have reached the agent, so do not resend it automatically. Keeps its identity for the life of the Provider’s Orchestrator.

string

SendMessageOptions

AgentMessageSubmission