/** * Enhanced Agent - Agent with session management, provider abstraction, and tool support */ import { type ToolCall } from '../llm/providers'; import { Session } from '../session'; import { FunctionTool } from '../tools/decorator'; export interface EnhancedAgentConfig { name?: string; instructions: string; llm?: string; tools?: Array; session?: Session; sessionId?: string; verbose?: boolean; stream?: boolean; maxToolCalls?: number; temperature?: number; maxTokens?: number; outputSchema?: any; } export interface ChatOptions { stream?: boolean; temperature?: number; maxTokens?: number; outputSchema?: any; onToken?: (token: string) => void; } export interface ChatResult { text: string; structured?: any; toolCalls?: ToolCall[]; usage: { promptTokens: number; completionTokens: number; totalTokens: number; }; runId: string; sessionId: string; } /** * Enhanced Agent with full feature support */ export declare class EnhancedAgent { readonly name: string; readonly instructions: string; readonly sessionId: string; private provider; private providerPromise; private llmModel; private session; private toolRegistry; private verbose; private stream; private maxToolCalls; private temperature; private maxTokens?; private outputSchema?; constructor(config: EnhancedAgentConfig); /** * Get the LLM provider (lazy initialization with AI SDK backend) */ private getProvider; private registerTools; /** * Add a tool to the agent */ addTool(t: FunctionTool | { name: string; description?: string; parameters?: any; execute: Function; }): this; /** * Get all registered tools */ getTools(): FunctionTool[]; /** * Chat with the agent */ chat(prompt: string, options?: ChatOptions): Promise; /** * Start method for compatibility */ start(prompt: string, options?: ChatOptions): Promise; /** * Get the session */ getSession(): Session; /** * Clear conversation history */ clearHistory(): void; }