reagentbuilder
Version:
An enterprise-grade AI agent framework based on LangChain and LangGraph, featuring dynamic tools, interceptors, breakpoints, and performance monitoring.
50 lines • 1.97 kB
TypeScript
import { BaseMessage } from "@langchain/core/messages";
import { StructuredTool } from "@langchain/core/tools";
import { AgentStateType, AgentConfig } from "../types/index.js";
export declare class ReAgentBuilder {
private config;
private interceptorManager;
private breakpointManager;
private llm;
private workflow;
private toolMap;
private reactConfig;
private messageCache;
private readonly MAX_CACHE_SIZE;
private cleanupHandlers;
constructor(config?: AgentConfig & {
concurrency?: {
interceptors?: number;
breakpoints?: number;
};
});
private initializeLLM;
private setupTools;
private callModel;
private executeTools;
private shouldContinue;
private buildWorkflow;
private cacheMessages;
private getCachedMessages;
private clearMessageCache;
run(userInput: string | BaseMessage[], threadId?: string): Promise<import("@langchain/langgraph").StateType<{
messages: import("@langchain/langgraph").BinaryOperatorAggregate<BaseMessage[], BaseMessage[]>;
reactIteration: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
reactMaxIterations: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
}> | null>;
runStream(userInput: string | BaseMessage[], threadId?: string): AsyncGenerator<AgentStateType, AgentStateType | null, unknown>;
getLLMInfo(): string;
cleanup(): Promise<void>;
getConcurrencyStatus(): {
activeInterceptors: number;
activeBreakpoints: number;
toolMapSize: number;
};
getPerformanceReport(): any;
resetPerformanceStats(): void;
toTool(name: string, description: string): StructuredTool;
addTool(tool: StructuredTool): void;
getTool(toolName?: string): StructuredTool | StructuredTool[] | undefined;
setTool(tools: StructuredTool[]): void;
}
//# sourceMappingURL=agent-builder.d.ts.map