@hashgraphonline/conversational-agent
Version:
Hashgraph Online conversational AI agent implementing HCS-10 communication, HCS-2 registries, and content inscription on Hedera
35 lines (33 loc) • 1.14 kB
TypeScript
import { BaseAgent, ConversationContext, ChatResponse, OperationalMode, UsageStats } from './base-agent';
import { MCPConnectionStatus } from './mcp/types';
export declare class LangChainAgent extends BaseAgent {
private executor;
private systemMessage;
private mcpManager?;
private smartMemory;
private mcpConnectionStatus;
boot(): Promise<void>;
chat(message: string, context?: ConversationContext): Promise<ChatResponse>;
shutdown(): Promise<void>;
switchMode(mode: OperationalMode): void;
getUsageStats(): UsageStats;
getUsageLog(): UsageStats[];
clearUsageStats(): void;
getMCPConnectionStatus(): Map<string, MCPConnectionStatus>;
private createAgentKit;
private createExecutor;
private handleError;
private initializeMCP;
/**
* Connect to MCP servers asynchronously after agent boot with background timeout pattern
*/
connectMCPServers(): Promise<void>;
/**
* Connect to a single MCP server in background with timeout
*/
private connectServerInBackground;
/**
* Check if a string is valid JSON
*/
private isJSON;
}