/** * Base Agent Class * * Reusable base class for all AI agents in the platform. * Provides common functionality: chat, sessions, status, lifecycle management. * * Each specific agent (ExpenseAnalyzer, MarketMaker, etc.) extends this class * and adds domain-specific methods and tools. */ import { StandardAgent, AgentResponse } from './index.js'; /** * Logger interface abstraction * Decouples from specific logging libraries */ export interface ILogger { info(message: string | object, ...args: any[]): void; error(message: string | object, ...args: any[]): void; warn(message: string | object, ...args: any[]): void; debug(message: string | object, ...args: any[]): void; } /** * Chat message interface */ export interface ChatMessage { role: 'user' | 'assistant' | 'system'; content: string; timestamp: string; } /** * Chat session interface */ export interface ChatSession { sessionId: string; messages: ChatMessage[]; metadata?: Record; } /** * Base agent configuration */ export interface BaseAgentConfig { name: string; description: string; systemPrompt: string; logger: ILogger; llm: { model: string; temperature: number; maxTokens: number; openAIApiKey: string; }; memory: { enabled: boolean; persistentThreadId: boolean; maxMessages: number; }; capabilities?: string[]; enableRAG?: boolean; } /** * Base Agent Class * * All agents extend this class and inherit common functionality. * Specific agents can override methods or add domain-specific ones. */ export declare abstract class BaseAgent { protected agent: StandardAgent; protected logger: ILogger; protected sessions: Map; protected startTime: number; protected config: BaseAgentConfig; constructor(config: BaseAgentConfig); /** * Start the agent */ start(): Promise; /** * Process a user message and return AI response */ chat(userMessage: string, sessionId: string, contextMetadata?: Record): Promise; /** * Get session history */ getSession(sessionId: string): ChatSession | undefined; /** * Clear session history */ clearSession(sessionId: string): void; /** * Get all active sessions */ getActiveSessions(): string[]; /** * Get agent status */ getStatus(): { name: string; status: string; uptime: number; activeSessions: number; model: string; capabilities: string[]; }; /** * Stop the agent */ stop(): Promise; /** * Get underlying StandardAgent (for advanced use) */ protected getUnderlyingAgent(): StandardAgent; } //# sourceMappingURL=base-agent.d.ts.map