@langgraph-js/sdk
Version:
The UI SDK for LangGraph - seamlessly integrate your AI agents with frontend interfaces
12 lines (11 loc) • 881 B
TypeScript
import { z } from "zod";
import { AnnotationRoot, CompiledStateGraph } from "@langchain/langgraph";
declare const METADATA_KEY_HANDOFF_DESTINATION = "__handoff_destination";
interface CreateHandoffToolParams {
agentName: string;
description?: string;
updateState?: (state: any) => Record<string, any>;
}
declare const createHandoffTool: ({ agentName, description, updateState }: CreateHandoffToolParams) => import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, {}, {}, any>;
declare const getHandoffDestinations: <AnnotationRootT extends AnnotationRoot<any>>(agent: CompiledStateGraph<AnnotationRootT["State"], AnnotationRootT["Update"], string, AnnotationRootT["spec"], AnnotationRootT["spec"]>, toolNodeName?: string) => string[];
export { createHandoffTool, getHandoffDestinations, METADATA_KEY_HANDOFF_DESTINATION };