@arcgis/ai-components 5.2.0-next.1 → 5.2.0-next.11
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/agent-utils/FunctionAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.js +22 -22
- package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
- package/dist/agent-utils/index.d.ts +99 -0
- package/dist/agent-utils/index.js +148 -0
- package/dist/agent-utils/middlewares/trace.js +25 -33
- package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
- package/dist/agent-utils/types.d.ts +30 -1
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
- package/dist/cdn/{V2P4AIGG.js → 24QNMEFG.js} +1 -1
- package/dist/cdn/{NAUXSHIE.js → 34SG44C3.js} +2 -2
- package/dist/cdn/3JGWGKT6.js +2 -0
- package/dist/cdn/3NBDVZ2I.js +2 -0
- package/dist/cdn/3VOQD2MR.js +2 -0
- package/dist/cdn/434TAA3J.js +2 -0
- package/dist/cdn/53NTYC4I.js +2 -0
- package/dist/cdn/{4HU7735A.js → 5CV7R5IS.js} +6 -4
- package/dist/cdn/{AMP6IALT.js → 5W7S2RS4.js} +1 -1
- package/dist/cdn/{FL4W4VYN.js → 6ZW7Z36F.js} +16 -0
- package/dist/cdn/7CYGX4F4.js +2 -0
- package/dist/cdn/{DHOVCT6R.js → AZGGTNA3.js} +1 -1
- package/dist/cdn/B7WJFBOZ.js +2 -0
- package/dist/cdn/BX7FSMUU.js +56 -0
- package/dist/cdn/CHPQM77M.js +181 -0
- package/dist/cdn/DHKUXLU3.js +179 -0
- package/dist/cdn/DQSEBKOX.js +2 -0
- package/dist/cdn/DXVU45KM.js +2 -0
- package/dist/cdn/{P6OPJQMC.js → DZ2QWNUA.js} +1 -1
- package/dist/cdn/EBISDZ5H.js +2 -0
- package/dist/cdn/{MDVYQQUG.js → ERL2CB2Y.js} +5 -5
- package/dist/cdn/F6QHMKF5.js +2 -0
- package/dist/cdn/FUIGPHBH.js +2 -0
- package/dist/cdn/{AO7BQHKC.js → H2CHHGGH.js} +1 -1
- package/dist/cdn/{OH64RMOR.js → HWKDNS4K.js} +2 -2
- package/dist/cdn/IMQ4TVHF.js +16 -0
- package/dist/cdn/IOD3GDA7.js +2 -0
- package/dist/cdn/IR7PTESF.js +2 -0
- package/dist/cdn/IRZDTYO2.js +2 -0
- package/dist/cdn/JIWK6QK6.js +2 -0
- package/dist/cdn/{S6W6HV4T.js → JLKGS6Y5.js} +12 -12
- package/dist/cdn/K3JCH4XW.js +2 -0
- package/dist/cdn/KHXUWZHB.js +2 -0
- package/dist/cdn/LIFK3QSD.js +2 -0
- package/dist/cdn/NXKKG5TK.js +2 -0
- package/dist/cdn/{FX5JFRDL.js → O3EN27N5.js} +1 -1
- package/dist/cdn/O3RFFPU3.js +6 -0
- package/dist/cdn/P7DG5T3Z.js +9 -0
- package/dist/cdn/PBO6FZN6.js +2 -0
- package/dist/cdn/Q3ZW4FYA.js +3 -0
- package/dist/cdn/Q6LRANX6.js +2 -0
- package/dist/cdn/Q7TL5Q5N.js +2 -0
- package/dist/cdn/QCSN44H4.js +2 -0
- package/dist/cdn/R56X6ZKR.js +161 -0
- package/dist/cdn/{HB5A5R2E.js → RUURNLTP.js} +1 -1
- package/dist/cdn/T43LEBBE.js +47 -0
- package/dist/cdn/{ZLXN7NMF.js → T537PKP4.js} +9 -7
- package/dist/cdn/TR4GFL7X.js +2 -0
- package/dist/cdn/{3PKJWIC3.js → UPEEHMSY.js} +1 -1
- package/dist/cdn/WAIFKDR3.js +2 -0
- package/dist/cdn/WNS5ZUF5.js +2 -0
- package/dist/cdn/X4XY5HIE.js +2 -0
- package/dist/cdn/XOH56EQ2.js +2 -0
- package/dist/cdn/XON27U6U.js +2 -0
- package/dist/cdn/{H7422XUG.js → YLN2BZ5J.js} +1 -1
- package/dist/cdn/{2AXF774U.js → YUKR4AZW.js} +1 -1
- package/dist/cdn/{JY6LLOUJ.js → Z2G7MP5L.js} +3 -3
- package/dist/cdn/ZEYIBYSF.js +66 -0
- package/dist/cdn/agent-utils/index.js +2 -0
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/adapter.js +1390 -1323
- package/dist/chunks/arcgisKnowledgeGraph.js +109 -72
- package/dist/chunks/dataExplorationGraph.js +108 -96
- package/dist/chunks/generateLayerDescriptions.js +206 -168
- package/dist/chunks/helpGraph.js +16 -13
- package/dist/chunks/index.js +11 -0
- package/dist/chunks/intent_prompt.js +16 -0
- package/dist/chunks/layerStylingGraph.js +23 -20
- package/dist/chunks/navigationGraph.js +34 -30
- package/dist/chunks/orchestrator.js +241 -201
- package/dist/chunks/slottableRequestUtils.js +3 -7
- package/dist/chunks/summarize_query_response_prompt.js +9 -7
- package/dist/chunks/toolCallResponse.js +5 -3
- package/dist/components/arcgis-assistant/customElement.d.ts +15 -0
- package/dist/components/arcgis-assistant/customElement.js +228 -127
- package/dist/components/arcgis-assistant/index.js +2 -3
- package/dist/components/arcgis-assistant/types.d.ts +14 -1
- package/dist/components/arcgis-assistant-chat/customElement.d.ts +8 -2
- package/dist/components/arcgis-assistant-chat/customElement.js +7 -7
- package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +25 -18
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +13 -9
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +20 -0
- package/dist/components/arcgis-assistant-interrupt-preview/index.js +2 -0
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-message/customElement.d.ts +23 -0
- package/dist/components/arcgis-assistant-message/customElement.js +28 -26
- package/dist/components/arcgis-assistant-message/index.d.ts +1 -0
- package/dist/components/arcgis-assistant-message/index.js +2 -0
- package/dist/components/arcgis-assistant-message-block/customElement.d.ts +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +18 -11
- package/dist/components/arcgis-assistant-message-block/index.js +1 -0
- package/dist/components/arcgis-assistant-message-feedback/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +8 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +8 -8
- package/dist/components/arcgis-assistant-message-loading/index.js +1 -0
- package/dist/components/arcgis-assistant-message-log/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -0
- package/dist/components/arcgis-assistant-speech-input/customElement.d.ts +6 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +8 -8
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +4 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/loader.js +6 -5
- package/dist/orchestrator/registry/agentRegistry.d.ts +33 -0
- package/dist/types/lumina.d.ts +10 -4
- package/dist/types/preact.d.ts +11 -4
- package/dist/types/react.d.ts +12 -4
- package/dist/types/stencil.d.ts +10 -4
- package/dist/utils/index.d.ts +87 -43
- package/dist/utils/index.js +54 -49
- package/package.json +8 -7
- package/dist/cdn/462JBSEV.js +0 -422
- package/dist/cdn/7BCR6TUO.js +0 -2
- package/dist/cdn/7GH7VSB2.js +0 -2
- package/dist/cdn/7PLV4QH6.js +0 -2
- package/dist/cdn/DDLZOMUY.js +0 -2
- package/dist/cdn/FHVXO2WG.js +0 -166
- package/dist/cdn/GSEPHN3A.js +0 -106
- package/dist/cdn/MH5RPXHM.js +0 -2
- package/dist/cdn/NVI3I46B.js +0 -2
- package/dist/cdn/OAVEHGB6.js +0 -2
- package/dist/cdn/ON2V5XI2.js +0 -3
- package/dist/cdn/QR54T33D.js +0 -2
- package/dist/cdn/RVOAPUBN.js +0 -2
- package/dist/cdn/SXDLXCIM.js +0 -2
- package/dist/cdn/USMDJUFS.js +0 -2
- package/dist/cdn/V5YEZSRY.js +0 -16
- package/dist/cdn/Y333DGV6.js +0 -2
- package/dist/cdn/YY2SBO3V.js +0 -2
|
@@ -1,130 +1,167 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { StateGraph as
|
|
3
|
-
import { a as
|
|
2
|
+
import { StateGraph as f, START as x, END as h, Command as k } from "@langchain/langgraph/web";
|
|
3
|
+
import { a as b, c as _, b as K, d as A, e as T, s as v, q as S, g as u, h as q, t as c, r as M, i as C, G as E, j as m } from "./adapter.js";
|
|
4
4
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
5
|
import "@arcgis/core/portal/Portal.js";
|
|
6
|
-
import {
|
|
7
|
-
import { AIMessage as
|
|
6
|
+
import { h as G, e as N } from "./generateLayerDescriptions.js";
|
|
7
|
+
import { AIMessage as R } from "@langchain/core/messages";
|
|
8
8
|
import "@langchain/core/callbacks/dispatch/web";
|
|
9
9
|
import "@langchain/openai";
|
|
10
|
+
import "@arcgis/core/config.js";
|
|
10
11
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
11
12
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
12
13
|
import "@arcgis/core/request.js";
|
|
13
|
-
import { ToolNode as
|
|
14
|
+
import { ToolNode as L } from "@langchain/langgraph/prebuilt";
|
|
15
|
+
import { s as p, a as D } from "./index.js";
|
|
14
16
|
import "@langchain/core/prompts";
|
|
15
|
-
const
|
|
16
|
-
f,
|
|
17
|
-
x,
|
|
18
|
-
k,
|
|
19
|
-
_,
|
|
17
|
+
const w = [
|
|
20
18
|
b,
|
|
19
|
+
_,
|
|
21
20
|
K,
|
|
22
|
-
|
|
21
|
+
A,
|
|
22
|
+
T,
|
|
23
|
+
v,
|
|
24
|
+
S
|
|
23
25
|
];
|
|
24
|
-
async function
|
|
25
|
-
const
|
|
26
|
+
async function z(e, a) {
|
|
27
|
+
const i = await u("arcgis_knowledge_tool_prompt"), o = q(a), n = {
|
|
26
28
|
assignedTask: e.agentExecutionContext.assignedTask,
|
|
27
29
|
userRequest: e.agentExecutionContext.userRequest,
|
|
28
30
|
priorSteps: e.agentExecutionContext.priorSteps,
|
|
29
|
-
contextType:
|
|
30
|
-
},
|
|
31
|
-
promptText:
|
|
31
|
+
contextType: o
|
|
32
|
+
}, s = await G({
|
|
33
|
+
promptText: i,
|
|
32
34
|
messages: e.arcgisKnowledgeMessages,
|
|
33
|
-
inputVariables:
|
|
34
|
-
tools:
|
|
35
|
-
}),
|
|
36
|
-
return !
|
|
35
|
+
inputVariables: n,
|
|
36
|
+
tools: w
|
|
37
|
+
}), l = (s.tool_calls?.length ?? 0) > 0, t = typeof s.text == "string" ? s.text.trim() : "", r = t.length > 0, d = s.content.toString();
|
|
38
|
+
return !l && (o === "map" || o === "knowledgeGraph") ? {
|
|
37
39
|
...e,
|
|
38
|
-
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages,
|
|
39
|
-
outputMessage:
|
|
40
|
+
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, s],
|
|
41
|
+
outputMessage: o === "map" ? "No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries." : "No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",
|
|
40
42
|
status: "success"
|
|
41
43
|
} : {
|
|
42
44
|
...e,
|
|
43
|
-
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages,
|
|
44
|
-
outputMessage:
|
|
45
|
-
status:
|
|
46
|
-
summary: d ?
|
|
45
|
+
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, s],
|
|
46
|
+
outputMessage: l ? d : t,
|
|
47
|
+
status: l ? e.status : r ? "success" : "failed",
|
|
48
|
+
summary: d ? c(d) : "ArcGIS Knowledge Agent tool executed."
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const y = {
|
|
52
|
+
generateCypher: "generated-cypher-query",
|
|
53
|
+
queryGraphData: "graph-query-result",
|
|
54
|
+
searchGraphData: "graph-search-result",
|
|
55
|
+
addRecords: "added-records",
|
|
56
|
+
applyLayout: "applied-layout",
|
|
57
|
+
changeNonspatialVisibility: "changed-nonspatial-visibility",
|
|
58
|
+
createLinkChart: "created-link-chart"
|
|
59
|
+
};
|
|
60
|
+
function F(e) {
|
|
61
|
+
return !!e && e.status === "success" && !!y[e.toolName];
|
|
62
|
+
}
|
|
63
|
+
function $(e) {
|
|
64
|
+
return {
|
|
65
|
+
type: y[e.toolName],
|
|
66
|
+
data: e.details
|
|
47
67
|
};
|
|
48
68
|
}
|
|
49
|
-
async function
|
|
50
|
-
const
|
|
69
|
+
async function I(e, a) {
|
|
70
|
+
const i = new L(w, { handleToolErrors: !1 });
|
|
51
71
|
try {
|
|
52
|
-
const
|
|
72
|
+
const o = await i.invoke(
|
|
53
73
|
{
|
|
54
74
|
messages: e.arcgisKnowledgeMessages
|
|
55
75
|
},
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
for (const t of
|
|
59
|
-
let
|
|
76
|
+
a
|
|
77
|
+
), n = [];
|
|
78
|
+
for (const t of o.messages) {
|
|
79
|
+
let r;
|
|
60
80
|
if (typeof t.content != "string")
|
|
61
81
|
throw new Error(`Unexpected tool message content type: ${typeof t.content}. Expected string.`);
|
|
62
82
|
try {
|
|
63
|
-
|
|
83
|
+
r = JSON.parse(t.content);
|
|
64
84
|
} catch {
|
|
65
|
-
throw new Error(
|
|
85
|
+
throw new Error(
|
|
86
|
+
`Failed to parse tool message content as JSON. Tool: ${t.name ?? "unknown"}.
|
|
87
|
+
|
|
88
|
+
Original Content: ${t.content}`
|
|
89
|
+
);
|
|
66
90
|
}
|
|
67
|
-
if (!
|
|
91
|
+
if (!r || typeof r != "object" || !("toolName" in r))
|
|
68
92
|
throw new Error(
|
|
69
|
-
`Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(
|
|
93
|
+
`Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(r)}`
|
|
70
94
|
);
|
|
71
|
-
|
|
95
|
+
n.push(r);
|
|
72
96
|
}
|
|
73
|
-
await
|
|
97
|
+
await p(
|
|
74
98
|
{
|
|
75
|
-
text: `Finished executing ArcGIS Knowledge Agent tools: ${
|
|
99
|
+
text: `Finished executing ArcGIS Knowledge Agent tools: ${o.messages.filter((t) => t.name).map((t) => t.name).join(", ")}`
|
|
76
100
|
},
|
|
77
|
-
|
|
101
|
+
a
|
|
78
102
|
);
|
|
79
|
-
const
|
|
80
|
-
return {
|
|
103
|
+
const s = n.filter((t) => typeof t != "string").map((t) => `- Called Tool: ${t.toolName}, Status: ${t.status}`), l = n[0];
|
|
104
|
+
return l && F(l) && await D($(l), a), {
|
|
81
105
|
...e,
|
|
82
|
-
outputMessage:
|
|
106
|
+
outputMessage: s.join(`
|
|
83
107
|
`),
|
|
84
|
-
summary:
|
|
108
|
+
summary: s.length ? c(s.join(`
|
|
85
109
|
`)) : "ArcGIS Knowledge Agent did not execute any tools or return any results.",
|
|
86
|
-
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, ...
|
|
87
|
-
arcgisKnowledgeToolResult:
|
|
110
|
+
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, ...o.messages],
|
|
111
|
+
arcgisKnowledgeToolResult: n
|
|
88
112
|
};
|
|
89
|
-
} catch (
|
|
90
|
-
const
|
|
91
|
-
return await
|
|
113
|
+
} catch (o) {
|
|
114
|
+
const n = o instanceof Error ? o.message : String(o);
|
|
115
|
+
return await p(
|
|
116
|
+
{ text: `ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}` },
|
|
117
|
+
a
|
|
118
|
+
), {
|
|
92
119
|
...e,
|
|
93
|
-
outputMessage: `ArcGIS Knowledge Agent tool execution failed: ${
|
|
120
|
+
outputMessage: `ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`,
|
|
94
121
|
status: "failed",
|
|
95
|
-
summary: `ArcGIS Knowledge Agent tool execution failed: ${
|
|
122
|
+
summary: c(`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`),
|
|
96
123
|
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages]
|
|
97
124
|
};
|
|
98
125
|
}
|
|
99
126
|
}
|
|
100
|
-
const
|
|
127
|
+
const V = (e, a) => (
|
|
101
128
|
//agent services (ex: embeddingsWorker) would go in the array below, if required.
|
|
102
|
-
M([], "ArcgisKnowledge Agent")(e,
|
|
129
|
+
M([], "ArcgisKnowledge Agent")(e, a)
|
|
103
130
|
);
|
|
104
|
-
async function
|
|
105
|
-
const
|
|
131
|
+
async function j(e, a) {
|
|
132
|
+
const o = (e.arcgisKnowledgeToolResult ?? []).map((d) => ({
|
|
106
133
|
...d,
|
|
107
134
|
details: void 0
|
|
108
135
|
// Remove details to avoid overwhelming the LLM with too much info
|
|
109
|
-
})), { knowledgeGraph:
|
|
136
|
+
})), { knowledgeGraph: n } = await C(a), s = E.getDataModelTypesSummary(n.dataModel), l = {
|
|
110
137
|
assignedTask: e.agentExecutionContext.assignedTask,
|
|
111
138
|
userRequest: e.agentExecutionContext.userRequest,
|
|
112
|
-
toolResult:
|
|
113
|
-
dataModelSummary:
|
|
114
|
-
},
|
|
115
|
-
promptText: await
|
|
139
|
+
toolResult: o,
|
|
140
|
+
dataModelSummary: s
|
|
141
|
+
}, t = await N({
|
|
142
|
+
promptText: await u("arcgis_knowledge_summarize_result_prompt"),
|
|
116
143
|
modelTier: "default",
|
|
117
|
-
inputVariables:
|
|
118
|
-
}),
|
|
144
|
+
inputVariables: l
|
|
145
|
+
}), r = typeof t == "string" ? t : t.content;
|
|
119
146
|
return {
|
|
120
147
|
...e,
|
|
121
|
-
outputMessage:
|
|
148
|
+
outputMessage: r,
|
|
122
149
|
status: "success",
|
|
123
|
-
summary:
|
|
124
|
-
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, new
|
|
150
|
+
summary: c(r),
|
|
151
|
+
arcgisKnowledgeMessages: [...e.arcgisKnowledgeMessages, new R(r)]
|
|
125
152
|
};
|
|
126
153
|
}
|
|
127
|
-
|
|
154
|
+
function g(e) {
|
|
155
|
+
return async (a, i) => i?.configurable?.abortSignal?.aborted ? (await p({ text: "Knowledge Agent execution cancelled" }, i), new k({
|
|
156
|
+
goto: h,
|
|
157
|
+
update: {
|
|
158
|
+
outputMessage: "Knowledge Agent execution cancelled",
|
|
159
|
+
summary: "Knowledge Agent execution cancelled",
|
|
160
|
+
status: "failed"
|
|
161
|
+
}
|
|
162
|
+
})) : await e(a, i);
|
|
163
|
+
}
|
|
164
|
+
const O = () => new f(m).addNode("requireArcgisKnowledgeServices", V).addNode("agent", g(z)).addNode("tools", g(I)).addNode("summarizationLLM", g(j)).addEdge(x, "requireArcgisKnowledgeServices").addEdge("requireArcgisKnowledgeServices", "agent").addConditionalEdges("agent", (a) => (a.arcgisKnowledgeMessages[a.arcgisKnowledgeMessages.length - 1]?.tool_calls?.length ?? 0) > 0 ? "tools" : h).addConditionalEdges("tools", (a) => a.status === "failed" ? h : "summarizationLLM").addEdge("summarizationLLM", h), P = String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
|
|
128
165
|
This agent has two categories of skills: those that work with an active link chart visualization of a subset of the data in the knowledge graph, and those that work with the knowledge graph data more generally against the entire dataset in the service and database.
|
|
129
166
|
For link charts, the agent enables users to interact with a link chart by adding new entities (also called nodes) or relationships (also called edges), removing existing entities or relationships,
|
|
130
167
|
expanding the graph from particular entities, finding relationships between specified entities on the link chart and adding them to the link chart, finding all relationships
|
|
@@ -162,13 +199,13 @@ _example: "Discover and add all the relationships originating at 'Entity E' to t
|
|
|
162
199
|
_example: "Show me all entities with a name similar to 'Smith' and add them to the link chart"_
|
|
163
200
|
_example: "Find reports in my graph that have a title similar to 'Quarterly Earnings'"_
|
|
164
201
|
_example: "Find John Smith and all people he has made phone calls to in the last year"_
|
|
165
|
-
_example: "What is the average age of all people who work for Esri?"_`,
|
|
202
|
+
_example: "What is the average age of all people who work for Esri?"_`, re = {
|
|
166
203
|
id: "arcgisKnowledge",
|
|
167
204
|
name: "ArcgisKnowledge Agent",
|
|
168
|
-
description:
|
|
169
|
-
createGraph:
|
|
170
|
-
workspace:
|
|
205
|
+
description: P,
|
|
206
|
+
createGraph: O,
|
|
207
|
+
workspace: m
|
|
171
208
|
};
|
|
172
209
|
export {
|
|
173
|
-
|
|
210
|
+
re as A
|
|
174
211
|
};
|