@arcgis/ai-agents 5.0.0-next.140 → 5.0.0-next.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ import { StateGraph } from '@langchain/langgraph/web';
2
+ import { HelpGraphStateType } from '../state/helpState';
3
+ import { AgentRegistration } from '@arcgis/ai-orchestrator';
4
+ /**
5
+ * Builds the Help Agent graph (intent classification + tool execution).
6
+ */
7
+ export declare const createHelpAgentGraph: () => StateGraph<HelpGraphStateType>;
8
+ export declare const HelpAgent: AgentRegistration;
@@ -0,0 +1 @@
1
+ export { HelpAgent } from './graph/helpGraph';
@@ -0,0 +1,3 @@
1
+ import { RunnableConfig } from '@langchain/core/runnables';
2
+ import { HelpGraphStateType } from '../state/helpState';
3
+ export declare function helpLLM(state: HelpGraphStateType, config?: RunnableConfig): Promise<HelpGraphStateType>;
@@ -0,0 +1,7 @@
1
+ import { RunnableConfig } from '@langchain/core/runnables';
2
+ import { HelpGraphStateType } from '../state/helpState';
3
+ /**
4
+ * Entry guard for Help Agent.
5
+ * Ensures agentRegistry services are available.
6
+ */
7
+ export declare const requireHelpServices: (state: HelpGraphStateType, config?: RunnableConfig) => typeof state;
@@ -0,0 +1,6 @@
1
+ import { ChatHistory } from '@arcgis/ai-orchestrator';
2
+ export declare const HelpState: import('@langchain/langgraph/web').AnnotationRoot<{
3
+ messages: import('@langchain/langgraph/web').BinaryOperatorAggregate<ChatHistory, ChatHistory>;
4
+ outputMessage: import('@langchain/langgraph/web').BinaryOperatorAggregate<string, string>;
5
+ }>;
6
+ export type HelpGraphStateType = typeof HelpState.State;
File without changes
@@ -0,0 +1,43 @@
1
+ const e = `## Map Query Gate
2
+
3
+ Look at the **latest** user message from the chat history.
4
+
5
+ ### Map Context
6
+
7
+ {layerSummary}
8
+
9
+ ## Available agents (capabilities)
10
+
11
+ {agents}
12
+
13
+ ### Rules
14
+
15
+ - "What layers are in this map?" → List the layer names
16
+ - "What fields are in this layer?" → List the field names for that layer
17
+ - "What can you do?" / "What can I ask?" → Suggest specific queries using EXACT layer and field names from the context above
18
+ - "Tell me about this map" → Summarize layers and capabilities
19
+ - "Create a chart of all wells ans their depth" → If a question is map related but not supported by available capabilities, say so. Add that support for this might be added in the future.
20
+ - Questions completely unrelated to maps/GIS → Politely explain you only help with the map |
21
+
22
+ ### Response Guidelines
23
+
24
+ When suggesting what users can ask, be SPECIFIC using actual layer names:
25
+
26
+ - "Show me water sources with elevation above 500"
27
+ - "Filter Protected Areas in Panama by protection level"
28
+ - "Zoom to Watershed Boundaries"
29
+
30
+ For "what can I ask" responses, provide 3-5 specific example queries using fields from the context.
31
+
32
+ For off-topic questions:
33
+ "I can only help with this map. Try asking me to filter [LayerName] by [FieldName], or zoom to a location."
34
+
35
+ Rules:
36
+
37
+ - Keep responses concise
38
+ - Use bullet points for lists
39
+ - Use new lines (\\n) and appropriate formatting in your response
40
+ `;
41
+ export {
42
+ e as default
43
+ };
package/dist/index.d.ts CHANGED
@@ -3,4 +3,5 @@ export * from './agents/dataExploration';
3
3
  export * from './agents/layerFilter';
4
4
  export * from './agents/layerQuery';
5
5
  export * from './agents/layerStyling';
6
+ export * from './agents/help';
6
7
  export * from './agents/linkChart';