@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.
- package/dist/agents/help/graph/helpGraph.d.ts +8 -0
- package/dist/agents/help/index.d.ts +1 -0
- package/dist/agents/help/nodes/helpLLM.d.ts +3 -0
- package/dist/agents/help/nodes/requireHelpServices.d.ts +7 -0
- package/dist/agents/help/state/helpState.d.ts +6 -0
- package/dist/agents/help/types/types.d.ts +0 -0
- package/dist/help_prompt-wgcBcna5.js +43 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +677 -589
- package/dist/summarize_query_response_prompt-CeugxjZK.js +32 -0
- package/package.json +2 -2
|
@@ -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,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
|
+
};
|