import { AgentRunObjectOptions, AgentRunStreamingOptions, AgentEventStream, ToolCallEngineType, AgentContextAwarenessOptions } from '@multimodal/agent-interface'; import { ToolManager } from './tool-manager'; import { ResolvedModel, LLMReasoningOptions } from '@multimodal/model-provider'; import type { Agent } from './agent'; import { LLMProcessor } from './runner/llm-processor'; import { ToolProcessor } from './runner/tool-processor'; import { LoopExecutor } from './runner/loop-executor'; import { StreamAdapter } from './runner/stream-adapter'; import { AgentEventStreamProcessor } from './event-stream'; /** * Runner configuration options */ interface AgentRunnerOptions { instructions: string; maxIterations: number; maxTokens?: number; temperature: number; reasoningOptions: LLMReasoningOptions; toolCallEngine?: ToolCallEngineType; eventStream: AgentEventStreamProcessor; toolManager: ToolManager; agent: Agent; contextAwarenessOptions?: AgentContextAwarenessOptions; } /** * AgentRunner - Coordinates the agent's execution * * This class serves as the main entry point for running agent loops, * delegating to specialized components for specific functionality. */ export declare class AgentRunner { private options; private instructions; private maxIterations; private maxTokens?; private temperature; private reasoningOptions; private toolCallEngine?; private eventStream; private toolManager; private agent; private contextAwarenessOptions?; private logger; readonly toolProcessor: ToolProcessor; readonly llmProcessor: LLMProcessor; readonly loopExecutor: LoopExecutor; readonly streamAdapter: StreamAdapter; constructor(options: AgentRunnerOptions); /** * Create the appropriate tool call engine based on configuration * @param engineType The requested engine type * @returns The created tool call engine */ private createToolCallEngine; /** * Get the current loop iteration number * @returns The current iteration number (1-based) */ getCurrentIteration(): number; /** * Handles errors from LLM processing and agent loop execution * @param error The error that occurred * @param resolvedModel The resolved model information * @param sessionId The current session ID * @param abortSignal Optional abort signal * @returns An assistant message event with error information */ private handleError; /** * Executes the agent's reasoning loop in non-streaming mode * * @param runOptions Options for this execution * @param resolvedModel The resolved model configuration * @param sessionId Unique session identifier * @returns Final answer as an AgentEventStream.AssistantMessageEvent */ execute(runOptions: AgentRunObjectOptions, resolvedModel: ResolvedModel, sessionId: string): Promise; /** * Executes the agent's reasoning loop in streaming mode * * @param runOptions Options for this execution * @param resolvedModel The resolved model configuration * @param sessionId Unique session identifier * @returns AsyncIterable of streaming events */ executeStreaming(runOptions: AgentRunStreamingOptions, resolvedModel: ResolvedModel, sessionId: string): Promise>; } export {}; //# sourceMappingURL=agent-runner.d.ts.map