▾
import type { ChatHistory, AgentRegistration, VectorSearchFieldResults, DirectRoutingOptions, AutoRoutingOptions } from "@arcgis/ai-components/orchestrator/types.js";Type definitions
ChatHistory
Represents the chat message history between the user and the assistant, including all messages sent and received during the conversation. This structure is used to provide context for the assistant's responses and can be utilized when invoking prompts to ensure the model has access to the full conversation history.
- Type
- BaseMessage[]
AgentRegistration
The registration object you create and provide to the arcgis-assistant-agent component when building a custom agent directly with LangGraph. Agent class instances created using agent-utils can be directly provided to the arcgis-assistant-agent component.
description
- Type
- string
A description of what the agent does and when the assistant should invoke it. Include examples of user requests the agent can handle to help the assistant select it.
- Example
- agentRegistration.description = "This agent calculates service areas for a given location.Use this agent when users ask questions about drive or walk times from a specific location, or when theyask for areas reachable within a certain time frame from a location.";
createGraph
- Type
- () => StateGraph<unknown>
A function that creates and returns the agent's LangGraph state graph, which defines its execution flow.
- See also
workspace
- Type
- AnnotationRoot<any>
The LangGraph annotation that defines the state fields available to the agent's graph.
- See also
VectorSearchFieldResults
- Type
- FieldVectors[]
CustomConfigurableType
Object used for getting and managing the context provided to an agent via its context property.
This is used to access application state context, such as the map view or other relevant variables,
that an agent may require to perform its tasks.
thread_id
- Type
- string
hitlResponse
- Type
- HITLResponse | null
Latest HITL response injected by the host application, or null before a response.
hitlResponses
- Type
- readonly HITLResponse[] | undefined
HITL responses for the current request in submission order, including the latest response.
QueryEmbeddingCache
Cache for query embeddings to avoid duplicate API calls within a request
AgentExecutionContext
- Type parameters
- <TState extends SharedState = SharedState>
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Runtime execution context available to agent graph nodes and tools.
- Supertypes
- Readonly<AgentExecutionContextShape
>
AgentStatus
Execution status returned by an agent run.
- Type
- "failed" | "success" | "unknown"
UiInterrupt
Represents a user-facing interruption emitted by an agent that requires input before execution can continue. This is used to implement human-in-the-loop workflows where the agent needs to ask the user for clarification, confirmation, or additional information before proceeding with its tasks.
Used to pause an agent flow and request clarification, confirmation, or additional information from the user.
id
- Type
- string
Unique identifier for this interrupt instance. This is used to associate the interrupt with a specific message or action in the agent's workflow, allowing the system to track and manage the interrupt effectively.
agentId
- Type
- string
Identifier of the agent requesting input (e.g. "navigation", "myCustomAgent", etc.). This is used to associate the interrupt with the specific agent that emitted it, which can be helpful for debugging, logging, and providing context to the user about which agent is requesting input.
kind
- Type
- "booleanChoice" | "multipleSelection" | "singleSelection" | "textInput"
The type of input being requested. See the list below for the currently supported input types. This is used to determine how to render the interrupt in the user interface and what kind of input to expect from the user.
booleanChoice- Presents the user with a yes or no option. This is typically used for confirmation prompts where the agent needs to confirm an action with the user before proceeding. For example, some actions may have a high risk of being destructive, such as applying an edit, submitting a form, or deleting data. In these cases, the agent might ask for confirmation before proceeding.multipleSelection- Presents the user with multiple options that the user may choose from in a checkbox interface.singleSelection- Presents the user with a list of options in a radio button interface, prompting the user to select a single option from a list.textInput- Prompts the user to enter free-form text before proceeding. This is a flexible input type that can be used for a wide variety of purposes, such as asking the user for more details about a request, requesting specific information needed to complete a task, or allowing the user to provide feedback or additional context.
metadata
Additional data required to render or handle the interrupt. This is typically an array of strings
representing options for selection when the kind is multipleSelection or singleSelection.
For booleanChoice, the options are implicitly "Yes" and "No" and do not need to be provided.
For textInput, options are not applicable and should be omitted.
Services
- Supertypes
- Readonly<{ agentRegistry: AgentRegistry; layerSearch?: LayerSearchService; fieldSearch?: FieldSearchService; layersAndFieldsRegistry?: LayersAndFieldsRegistry; embeddingCache: QueryEmbeddingCache; }>
AgentExecutionContextShape
- Type parameters
- <TState extends SharedState = SharedState>
sharedResources
- Type
- readonly SharedResource[]
The 50 most recent resources created by agents in the conversation.
HITLResponse
id
- Type
- string
agentId
- Type
- string
payload
- Type
- unknown
LayersAndFieldsRegistry
Registry mapping layer IDs to their description and associated field registry.
- Supertypes
- Map<string‚ { layerItem: LayerDescriptionWrapper; fieldRegistry: FieldsRegistry; }>
FieldInfo
name
- Type
- string
alias
- Type
- string
type
- Type
- string
description
- Type
- string
valueType
- Type
- string
statistics
- Type
- FieldStatistics | undefined
domain
- Type
- DomainUnion | undefined
FieldStatistics
summaryStatistics
- Type
- SummaryStatisticsResult | null
uniqueValues
- Type
- UniqueValueCountInfo[] | null