UNPKG

@langgraph-js/pro

Version:

The Pro SDK for LangGraph - seamlessly integrate your AI agents with frontend interfaces and build complex AI workflows

15 lines (14 loc) 1.13 kB
import { z } from "zod"; import { AnnotationRoot, Command, 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<{}, z.core.$strip>, Record<string, never>, Record<string, never>, Command<unknown, { messages: import("@langchain/core/messages").BaseMessage<import("@langchain/core/messages").MessageStructure, import("@langchain/core/messages").MessageType>[]; activeAgent: string; }, string>>; 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 };