import { AnnotationRoot, StateGraph } from '@langchain/langgraph/web'; /** * Definition of a client-side agent that can be registered with the ArcGIS Assistant Agent component. * * @see [LangGraph documentation](https://docs.langchain.com/oss/javascript/langgraph/overview) * @beta * @since 5.0 */ export interface AgentRegistration { /** * A unique identifier for the agent. */ id: string; /** * A human-readable name for the agent. This must be unique, but also be semantically meaningful. */ name: string; /** * A brief description of the agent's purpose and functionality. */ description: string; /** * A function that creates and returns the agent's state graph. This graph defines the agent's behavior, * including how it processes inputs, makes decisions, and produces outputs. The graph consists of nodes and edges * that represent the agent's deterministic logic and flow. This is a structure defined using LangGraph's StateGraph. * * @see [LangGraph documentation](https://docs.langchain.com/oss/javascript/langgraph/overview) */ createGraph: () => StateGraph; /** * The workspace variables or context required by the agent's graph. This includes messages, results, * and any other relevant data required by the LLM to make decisions and determine parameters for function calls. * This is a structure defined using LangGraph's AnnotationRoot. * * @see [LangGraph documentation](https://docs.langchain.com/oss/javascript/langgraph/overview) */ workspace: AnnotationRoot; } export type GetContext> = () => Promise | TContext; export interface AgentWithContext = Record> { agent: AgentRegistration; /** * Lazily resolves runtime context. * Can be sync or async, and may perform lifecycle checks (e.g. await view.when()). */ getContext?: GetContext; } export declare class AgentRegistry { private agentRegistry; register>(entry: AgentWithContext): void; get(id: string): AgentWithContext | undefined; list(): AgentWithContext[]; }