import type { ILLMProvider } from '../../llm/ILLMProvider.ts'; import type { ITool } from '../../tools/ITool.ts'; import type { ExecutionContext } from '../../core/ExecutionContext.ts'; import type { AgentResult } from './AgentResult.ts'; import type { ReActLoop } from '../../reasoning/ReActLoop.ts'; import { ToolRegistry } from '../../tools/ToolRegistry.ts'; import type { ResidualMemory } from '../../memory/ResidualMemory.ts'; import type { EpisodeLearner } from '../../evals/EpisodeLearner.ts'; export interface BaseAgentOptions { residualMemory?: ResidualMemory; episodeLearner?: EpisodeLearner; } /** * Base lifecycle for every agent. Intentional dependency hub: by contract it * touches the LLM, tool, core, reasoning, memory, and evals layers — changing * any of those surfaces is expected to flow through here. */ export declare abstract class BaseAgent { readonly llm: ILLMProvider; protected reasoningLoop: ReActLoop; protected toolRegistry: ToolRegistry; abstract role: string; protected abstract tools: ITool[]; protected abstract getSystemPrompt(context: ExecutionContext): Promise; protected residualMemory?: ResidualMemory; protected episodeLearner?: EpisodeLearner; private readonly lifecycle; constructor(llm: ILLMProvider, reasoningLoop: ReActLoop, toolRegistry: ToolRegistry, options?: BaseAgentOptions); run(input: string, context: ExecutionContext): Promise; /** * Shared invocation lifecycle: tool registration, decay, prompt, timing, * tracing, learning, decision/provenance recording, and Sentry reporting. * Subclasses that execute differently (e.g. Oracle's retrieval-first ask) * supply the executor and inherit the whole lifecycle. Executors return the * responding model so attribution is recorded centrally, not by poking the * loop from the agent layer. */ protected runWithExecutor(input: string, context: ExecutionContext, execute: (systemPrompt: string, input: string) => Promise<{ output: string; model?: string; }>): Promise; private registerTools; } //# sourceMappingURL=BaseAgent.d.ts.map