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.
Type Declaration
Section titled “Type Declaration”sendMessage
Section titled “sendMessage”
readonlysendMessage: (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.
Parameters
Section titled “Parameters”string