UNPKG

tinyagent-ts

Version:

Modern TypeScript framework for building AI agents with pluggable tools and ReAct reasoning

37 lines (36 loc) 1.23 kB
import { ModelManager } from '../model'; import { ReActEngine } from '../react'; import { StandardToolRegistry, Tool } from '../tools'; import { Agent, AgentConfig, AgentExecutionOptions, AgentResult } from './types'; /** * Unified agent implementation supporting multiple execution modes */ export declare class UnifiedAgent implements Agent { private modelManager; private toolRegistry; private reactEngine; private promptEngine; private config; constructor(config?: AgentConfig); private registerDefaultTools; execute<T = any>(input: string, options?: AgentExecutionOptions): Promise<AgentResult<T>>; private executeSimple; private executeReAct; getConfig(): AgentConfig; updateConfig(config: Partial<AgentConfig>): void; getToolRegistry(): StandardToolRegistry; getModelManager(): ModelManager; getReActEngine(): ReActEngine; /** * Register a tool with both the registry and ReAct engine */ registerTool(tool: Tool): void; /** * Unregister a tool from both the registry and ReAct engine */ unregisterTool(name: string): void; /** * Register multiple tools at once */ registerTools(tools: Tool[]): void; }