Skip to main content

Function: processRequestWithExternalTools()

processRequestWithExternalTools(agentos, input, executeToolCall): AsyncGenerator<AgentOSResponse, void, undefined>

Defined in: packages/agentos/src/api/processRequestWithExternalTools.ts:103

Runs a full AgentOS.processRequest(...) turn and automatically resumes any actionable external tool pauses through handleToolResult(...).

Actionable external tool calls are executed in emitted order. When a pause contains multiple actionable tool calls, the helper batches their results and resumes the stream once through handleToolResults(...) when available.

Parameters

agentos

Pick<IAgentOS, "processRequest" | "handleToolResult"> & Partial<Pick<IAgentOS, "handleToolResults">>

input

AgentOSInput

executeToolCall

AgentOSExternalToolHandler

Returns

AsyncGenerator<AgentOSResponse, void, undefined>