import { type ChatResponse, type LLM } from "../llm/index.js"; import { ObjectRetriever } from "../objects/index.js"; import type { BaseToolWithCall, JSONObject, JSONValue } from "../types.js"; import { AgentRunner, AgentWorker, type AgentParamsBase } from "./base.js"; import type { TaskHandler } from "./types.js"; type ReACTAgentParamsBase = AgentParamsBase; type ReACTAgentParamsWithTools = ReACTAgentParamsBase & { tools: BaseToolWithCall[]; }; type ReACTAgentParamsWithToolRetriever = ReACTAgentParamsBase & { toolRetriever: ObjectRetriever; }; export type ReACTAgentParams = ReACTAgentParamsWithTools | ReACTAgentParamsWithToolRetriever; type BaseReason = { type: unknown; }; type ObservationReason = BaseReason & { type: "observation"; observation: JSONValue; }; type ActionReason = BaseReason & { type: "action"; thought: string; action: string; input: JSONObject; }; type ResponseReason = BaseReason & { type: "response"; thought: string; response: ChatResponse; }; type Reason = ObservationReason | ActionReason | ResponseReason; type ReACTAgentStore = { reasons: Reason[]; }; export declare class ReACTAgentWorker extends AgentWorker { taskHandler: TaskHandler, ReACTAgentStore>; } export declare class ReActAgent extends AgentRunner { constructor(params: ReACTAgentParamsWithTools | ReACTAgentParamsWithToolRetriever); createStore(): { reasons: never[]; }; static taskHandler: TaskHandler; } export {};