import { BaseChatModel } from '@langchain/core/language_models/chat_models';
import { BaseMessage, HumanMessage, ToolMessage } from '@langchain/core/messages';
import { Runnable, RunnableLambda } from '@langchain/core/runnables';
import { DynamicStructuredTool } from '@langchain/core/tools';
import { AgentState } from './types';
export declare const SUPERVISOR_NAME = "Supervisor";
export declare const TOOLS_NAME = "tools";
export interface State extends AgentState {
    next: string;
    instructions: string;
    reasoning: string;
    tool_call_id: string;
}
export declare function createState(): {
    next: {
        value: (x: string, y?: string) => string;
        default: () => string;
    };
    instructions: {
        value: (x: string, y?: string) => string;
        default: () => string;
    };
    reasoning: {
        value: (x: string, y?: string) => string;
        default: () => string;
    };
    tool_call_id: {
        value: (x: string, y?: string) => string;
        default: () => any;
    };
    input: import("@langchain/langgraph/web").SingleReducer<string, any>;
    role: import("@langchain/langgraph/web").SingleReducer<string, any>;
    context: import("@langchain/langgraph/web").SingleReducer<string, any>;
    references?: import("@langchain/langgraph/web").SingleReducer<string, any>;
    messages: import("@langchain/langgraph/web").SingleReducer<BaseMessage[], any>;
    language?: import("@langchain/langgraph/web").SingleReducer<string, any>;
};
export declare const getInstructions: RunnableLambda<State, {
    input: string;
    messages: HumanMessage[];
    role: string;
    context: string;
}, import("@langchain/core/runnables").RunnableConfig<Record<string, any>>>;
export declare const getMessages: RunnableLambda<State, {
    messages: BaseMessage[];
}, import("@langchain/core/runnables").RunnableConfig<Record<string, any>>>;
/**
 * Merge the messages of two graphs, and keep only the last message to the source graph
 */
export declare const joinGraph: RunnableLambda<AgentState, {
    messages: BaseMessage[];
}, import("@langchain/core/runnables").RunnableConfig<Record<string, any>>>;
export declare const SupervisorSystemPrompt: string;
export declare const RouteFunctionName = "route";
export declare function createRouteFunctionDef(members: string[]): {
    name: string;
    description: string;
    parameters: {
        title: string;
        type: string;
        properties: {
            reasoning: {
                title: string;
                type: string;
            };
            next: {
                title: string;
                anyOf: {
                    enum: string[];
                }[];
            };
            instructions: {
                title: string;
                type: string;
                description: string;
            };
        };
        required: string[];
    };
};
export declare function createSupervisor(llm: BaseChatModel, members: {
    name: string;
    description: string;
}[], systemPrompt?: string): Promise<Runnable>;
export declare function createSupervisorAgent<S extends AgentState>(llm: BaseChatModel, members: {
    name: string;
    description: string;
}[], tools: DynamicStructuredTool[], system: string, suffix?: string): Promise<(state: S) => Promise<State>>;
export declare const supervisorRouter: (state: AgentState) => any;
export declare function responseToolMessage(id: string, messages: BaseMessage[]): {
    tool_call_id: any;
    messages: ToolMessage[];
};
