@ema.co/mcp-toolkit 2026.2.13 → 2026.2.23
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.
Potentially problematic release.
This version of @ema.co/mcp-toolkit might be problematic. Click here for more details.
- package/.context/public/guides/ema-user-guide.md +12 -16
- package/.context/public/guides/mcp-tools-guide.md +203 -334
- package/dist/cli/index.js +2 -2
- package/dist/mcp/domain/loop-detection.js +89 -0
- package/dist/mcp/domain/sanitizer.js +1 -1
- package/dist/mcp/domain/structural-rules.js +4 -5
- package/dist/mcp/domain/validation-rules.js +5 -5
- package/dist/mcp/domain/workflow-graph.js +3 -5
- package/dist/mcp/domain/workflow-path-enumerator.js +7 -4
- package/dist/mcp/guidance.js +62 -29
- package/dist/mcp/handlers/debug/adapter.js +15 -0
- package/dist/mcp/handlers/debug/formatters.js +282 -0
- package/dist/mcp/handlers/debug/index.js +133 -0
- package/dist/mcp/handlers/demo/adapter.js +180 -0
- package/dist/mcp/handlers/env/config.js +2 -2
- package/dist/mcp/handlers/feedback/index.js +1 -1
- package/dist/mcp/handlers/index.js +0 -1
- package/dist/mcp/handlers/persona/adapter.js +135 -0
- package/dist/mcp/handlers/persona/index.js +237 -8
- package/dist/mcp/handlers/persona/schema.js +27 -0
- package/dist/mcp/handlers/reference/index.js +6 -4
- package/dist/mcp/handlers/sync/adapter.js +200 -0
- package/dist/mcp/handlers/workflow/adapter.js +174 -0
- package/dist/mcp/handlers/workflow/fix.js +11 -12
- package/dist/mcp/handlers/workflow/index.js +12 -40
- package/dist/mcp/handlers/workflow/validation.js +1 -1
- package/dist/mcp/knowledge-guidance-topics.js +615 -0
- package/dist/mcp/knowledge-types.js +7 -0
- package/dist/mcp/knowledge.js +75 -1403
- package/dist/mcp/resources-dynamic.js +2395 -0
- package/dist/mcp/resources-validation.js +408 -0
- package/dist/mcp/resources.js +72 -2508
- package/dist/mcp/server.js +69 -2825
- package/dist/mcp/tools.js +106 -5
- package/dist/sdk/client-adapter.js +265 -24
- package/dist/sdk/ema-client.js +100 -9
- package/dist/sdk/generated/agent-catalog.js +615 -0
- package/dist/sdk/generated/well-known-types.js +99 -0
- package/dist/sdk/generated/widget-catalog.js +60 -0
- package/dist/sdk/grpc-client.js +115 -1
- package/dist/sync/sdk.js +2 -2
- package/dist/sync.js +4 -3
- package/docs/README.md +17 -9
- package/package.json +3 -2
- package/.context/public/guides/dashboard-operations.md +0 -349
- package/.context/public/guides/email-patterns.md +0 -125
- package/.context/public/guides/workflow-builder-patterns.md +0 -708
- package/dist/mcp/domain/intent-architect.js +0 -914
- package/dist/mcp/domain/quality-gates.js +0 -110
- package/dist/mcp/domain/workflow-execution-analyzer.js +0 -412
- package/dist/mcp/domain/workflow-intent.js +0 -1806
- package/dist/mcp/domain/workflow-merge.js +0 -449
- package/dist/mcp/domain/workflow-tracer.js +0 -648
- package/dist/mcp/domain/workflow-transformer.js +0 -742
- package/dist/mcp/handlers/knowledge/index.js +0 -54
- package/dist/mcp/handlers/persona/intent.js +0 -141
- package/dist/mcp/handlers/workflow/analyze.js +0 -119
- package/dist/mcp/handlers/workflow/compare.js +0 -70
- package/dist/mcp/handlers/workflow/generate.js +0 -384
- package/dist/mcp/handlers-consolidated.js +0 -333
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Catalog — Auto-Generated API Fallback
|
|
3
|
+
*
|
|
4
|
+
* This is the AGENT_CATALOG array extracted from knowledge.ts.
|
|
5
|
+
* Used as a fallback when the API is unavailable.
|
|
6
|
+
*
|
|
7
|
+
* Generated from source repos via scheduled workflows.
|
|
8
|
+
* See: .context/core/guides/source-repos.md for full architecture
|
|
9
|
+
*/
|
|
10
|
+
export const AGENT_CATALOG = [
|
|
11
|
+
// Triggers
|
|
12
|
+
{
|
|
13
|
+
actionName: "chat_trigger",
|
|
14
|
+
displayName: "Chat Trigger",
|
|
15
|
+
category: "trigger",
|
|
16
|
+
description: "Entry point for chat-based interactions. Outputs both conversation history and current query.",
|
|
17
|
+
inputs: [],
|
|
18
|
+
outputs: [
|
|
19
|
+
{ name: "chat_conversation", type: "WELL_KNOWN_TYPE_CHAT_CONVERSATION", description: "Full conversation history from start" },
|
|
20
|
+
{ name: "user_query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Current user message only" },
|
|
21
|
+
],
|
|
22
|
+
whenToUse: "Starting point for any chat or voice AI workflow",
|
|
23
|
+
criticalRules: [
|
|
24
|
+
"Each user message triggers a NEW workflow execution",
|
|
25
|
+
"chat_conversation accumulates; user_query is current message only",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
actionName: "document_trigger",
|
|
30
|
+
displayName: "Document Trigger",
|
|
31
|
+
category: "trigger",
|
|
32
|
+
description: "Entry point for document processing workflows triggered by file upload.",
|
|
33
|
+
inputs: [],
|
|
34
|
+
outputs: [
|
|
35
|
+
{ name: "user_query", type: "WELL_KNOWN_TYPE_DOCUMENT", description: "Uploaded document(s)" },
|
|
36
|
+
],
|
|
37
|
+
whenToUse: "When workflow is triggered by document upload for processing/extraction",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
actionName: "voice_trigger",
|
|
41
|
+
displayName: "Voice Trigger",
|
|
42
|
+
category: "trigger",
|
|
43
|
+
description: "Entry point for voice/phone call interactions.",
|
|
44
|
+
inputs: [],
|
|
45
|
+
outputs: [
|
|
46
|
+
{ name: "chat_conversation", type: "WELL_KNOWN_TYPE_CHAT_CONVERSATION", description: "Voice conversation history" },
|
|
47
|
+
{ name: "user_query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Current utterance" },
|
|
48
|
+
],
|
|
49
|
+
whenToUse: "Voice AI employees handling phone calls",
|
|
50
|
+
},
|
|
51
|
+
// Routing / Classification
|
|
52
|
+
{
|
|
53
|
+
actionName: "chat_categorizer",
|
|
54
|
+
displayName: "Intent Classifier",
|
|
55
|
+
category: "routing",
|
|
56
|
+
description: "Classifies user intent into predefined categories for routing. First routing node after trigger.",
|
|
57
|
+
inputs: [
|
|
58
|
+
{ name: "conversation", type: "WELL_KNOWN_TYPE_CHAT_CONVERSATION", required: true, description: "Chat conversation to classify" },
|
|
59
|
+
],
|
|
60
|
+
outputs: [
|
|
61
|
+
{ name: "category", type: "WELL_KNOWN_TYPE_ENUM", description: "Outputs the matched category enum value (e.g., 'Client_Update', 'Fallback')" },
|
|
62
|
+
],
|
|
63
|
+
criticalRules: [
|
|
64
|
+
"MUST have at least one outgoing edge",
|
|
65
|
+
"runIf condition: compare 'output: category' to 'enumValue: <CategoryName>' (NOT category_<name> format)",
|
|
66
|
+
"Handler nodes use runIf conditions to route by category",
|
|
67
|
+
"ALWAYS include a Fallback category",
|
|
68
|
+
"Create a runIf condition for EACH category or routing fails",
|
|
69
|
+
"You MUST create a handler for EACH category",
|
|
70
|
+
],
|
|
71
|
+
whenToUse: "When you need to route chat conversations to different processing paths based on intent",
|
|
72
|
+
whenNotToUse: "Simple single-path workflows that don't need routing",
|
|
73
|
+
example: "Categories: [Market_Impact, Client_Lookup, Compliance_Check, Fallback]",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
actionName: "text_categorizer",
|
|
77
|
+
displayName: "Text Categorizer",
|
|
78
|
+
category: "routing",
|
|
79
|
+
description: "Classifies text content (not conversation) into categories.",
|
|
80
|
+
inputs: [
|
|
81
|
+
{ name: "text", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Text to classify" },
|
|
82
|
+
],
|
|
83
|
+
outputs: [
|
|
84
|
+
{ name: "category", type: "WELL_KNOWN_TYPE_ENUM", description: "Classification result" },
|
|
85
|
+
],
|
|
86
|
+
criticalRules: [
|
|
87
|
+
"Same rules as chat_categorizer: must have Fallback, edges for each category",
|
|
88
|
+
],
|
|
89
|
+
whenToUse: "When routing based on text content rather than full conversation history",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
actionName: "document_categorizer",
|
|
93
|
+
displayName: "Document Categorizer",
|
|
94
|
+
category: "routing",
|
|
95
|
+
description: "Classifies documents into categories for routing.",
|
|
96
|
+
inputs: [
|
|
97
|
+
{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Documents to classify" },
|
|
98
|
+
],
|
|
99
|
+
outputs: [
|
|
100
|
+
{ name: "category", type: "WELL_KNOWN_TYPE_ENUM", description: "Document classification" },
|
|
101
|
+
],
|
|
102
|
+
whenToUse: "When routing based on document type or content",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
actionName: "conversation_to_search_query",
|
|
106
|
+
displayName: "Conversation Summarizer",
|
|
107
|
+
category: "routing",
|
|
108
|
+
description: "Converts conversation history to a search query. Configurable turn count.",
|
|
109
|
+
inputs: [
|
|
110
|
+
{ name: "conversation", type: "WELL_KNOWN_TYPE_CHAT_CONVERSATION", required: true, description: "Conversation to summarize" },
|
|
111
|
+
],
|
|
112
|
+
outputs: [
|
|
113
|
+
{ name: "summarized_conversation", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Distilled search query" },
|
|
114
|
+
],
|
|
115
|
+
whenToUse: "Before search nodes when you have chat_conversation but need TEXT_WITH_SOURCES. Also for managing long conversation context windows.",
|
|
116
|
+
whenNotToUse: "When trigger.user_query is sufficient for simple queries",
|
|
117
|
+
criticalRules: [
|
|
118
|
+
"May still be needed WITH chat_conversation for downstream agents requiring specific format",
|
|
119
|
+
"Use to reduce conversation size due to LLM context window limits",
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
// Search & Retrieval
|
|
123
|
+
{
|
|
124
|
+
actionName: "search",
|
|
125
|
+
displayName: "File Search / Knowledge Search",
|
|
126
|
+
category: "search",
|
|
127
|
+
description: "Searches uploaded documents/knowledge base using hybrid search (keyword + vector). Use version v2 (search/v2) which requires datastore_configs input. search/v0 is deprecated.",
|
|
128
|
+
inputs: [
|
|
129
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Search query" },
|
|
130
|
+
{ name: "datastore_configs", type: "WELL_KNOWN_TYPE_ANY", required: false, description: "Datastore configuration (v2). Wired from persona widget config." },
|
|
131
|
+
],
|
|
132
|
+
outputs: [
|
|
133
|
+
{ name: "search_results", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", description: "Matching passages with sources and citations" },
|
|
134
|
+
],
|
|
135
|
+
whenToUse: "When searching static uploaded documents or internal knowledge base. Always use search/v2 (not deprecated search/v0).",
|
|
136
|
+
whenNotToUse: "For real-time web content — use live_web_search or ai_web_search instead",
|
|
137
|
+
example: "FAQ lookup, policy search, documentation assistant",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
actionName: "live_web_search",
|
|
141
|
+
displayName: "Live Web Search / Deep Web Search",
|
|
142
|
+
category: "search",
|
|
143
|
+
description: "Real-time web search for external information not in knowledge base.",
|
|
144
|
+
inputs: [
|
|
145
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Search query" },
|
|
146
|
+
],
|
|
147
|
+
outputs: [
|
|
148
|
+
{ name: "web_search_results", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", description: "Web search results" },
|
|
149
|
+
],
|
|
150
|
+
whenToUse: "When you need real-time external information not in the knowledge base",
|
|
151
|
+
example: "Current events, live data, external research",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
actionName: "combine_search_results",
|
|
155
|
+
displayName: "Combine Search Results",
|
|
156
|
+
category: "search",
|
|
157
|
+
description: "Merges results from multiple search sources with deduplication.",
|
|
158
|
+
inputs: [
|
|
159
|
+
{ name: "search_results_1", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", required: true, description: "First result set" },
|
|
160
|
+
{ name: "search_results_2", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", required: true, description: "Second result set" },
|
|
161
|
+
],
|
|
162
|
+
outputs: [
|
|
163
|
+
{ name: "combined_results", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", description: "Merged, deduplicated results" },
|
|
164
|
+
],
|
|
165
|
+
criticalRules: [
|
|
166
|
+
"AVOID using unless necessary - prefer combine_and_rerank_search_results or call_llm with named_inputs",
|
|
167
|
+
"combine_and_rerank_search_results provides intelligent relevance ranking",
|
|
168
|
+
"call_llm with named_inputs allows prompt-based ranking control",
|
|
169
|
+
],
|
|
170
|
+
whenToUse: "When combining local + web search, or multiple knowledge bases",
|
|
171
|
+
whenNotToUse: "When you need intelligent ranking - use combine_and_rerank_search_results instead",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
actionName: "combine_and_rerank_search_results",
|
|
175
|
+
displayName: "Rerank Search Results",
|
|
176
|
+
category: "search",
|
|
177
|
+
description: "Combines and reranks search results by relevance.",
|
|
178
|
+
inputs: [
|
|
179
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Original query for relevance scoring" },
|
|
180
|
+
{ name: "search_results_lists", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", required: true, description: "Results to rerank" },
|
|
181
|
+
],
|
|
182
|
+
outputs: [
|
|
183
|
+
{ name: "reranked_results", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", description: "Reranked results" },
|
|
184
|
+
],
|
|
185
|
+
whenToUse: "When you need to prioritize results by relevance after combining multiple sources",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
actionName: "document_metasearch",
|
|
189
|
+
displayName: "Document Metasearch",
|
|
190
|
+
category: "search",
|
|
191
|
+
description: "Searches across document metadata.",
|
|
192
|
+
inputs: [
|
|
193
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Metadata query" },
|
|
194
|
+
{ name: "template", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Search template" },
|
|
195
|
+
],
|
|
196
|
+
outputs: [
|
|
197
|
+
{ name: "document_metasearch_results", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", description: "Metadata search results" },
|
|
198
|
+
],
|
|
199
|
+
whenToUse: "When searching by document metadata rather than content",
|
|
200
|
+
},
|
|
201
|
+
// Generation & Response
|
|
202
|
+
{
|
|
203
|
+
actionName: "call_llm",
|
|
204
|
+
displayName: "Respond",
|
|
205
|
+
category: "generation",
|
|
206
|
+
description: "Generates response using LLM with custom instructions. Accepts ANY type via named_inputs. Also used for LLM templating.",
|
|
207
|
+
inputs: [
|
|
208
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "User query" },
|
|
209
|
+
{ name: "named_inputs", type: "WELL_KNOWN_TYPE_ANY", required: false, description: "Additional context (use named_inputs_<Name> suffix)" },
|
|
210
|
+
],
|
|
211
|
+
outputs: [
|
|
212
|
+
{ name: "response_with_sources", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Generated response" },
|
|
213
|
+
],
|
|
214
|
+
whenToUse: "When you need custom response generation, content synthesis, or LLM templating for documents",
|
|
215
|
+
whenNotToUse: "For strict regulatory formats requiring pixel-perfect layouts - use template engine instead",
|
|
216
|
+
criticalRules: [
|
|
217
|
+
"named_inputs accepts ANY type - use for tool results, search results, etc.",
|
|
218
|
+
"Use suffix pattern: named_inputs_<Descriptive_Name>",
|
|
219
|
+
"LLM TEMPLATING: Include structured section headers (## Section) in prompt - let LLM determine appropriate sections based on content",
|
|
220
|
+
"For document generation: Set temperature 0.3-0.5 for consistent formatting",
|
|
221
|
+
"Use structured prompts with clear formatting rules and examples",
|
|
222
|
+
],
|
|
223
|
+
example: "named_inputs_Market_Context, named_inputs_Client_Data | " +
|
|
224
|
+
"LLM Template prompt: 'Generate structured content with clear ## section headers, organized by themes'",
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
actionName: "generate_document",
|
|
228
|
+
displayName: "Generate Document",
|
|
229
|
+
category: "generation",
|
|
230
|
+
description: "Converts markdown content to formatted document (.docx). Use after call_llm for document generation workflows.",
|
|
231
|
+
inputs: [
|
|
232
|
+
{ name: "markdown_file_contents", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Well-structured markdown to convert" },
|
|
233
|
+
{ name: "template", type: "WELL_KNOWN_TYPE_DOCUMENT", required: false, description: "Optional template from data source for styling" },
|
|
234
|
+
],
|
|
235
|
+
outputs: [
|
|
236
|
+
{ name: "document_link", type: "WELL_KNOWN_TYPE_DOCUMENT", description: "Link to generated document" },
|
|
237
|
+
],
|
|
238
|
+
whenToUse: "When converting LLM-generated markdown to professional document format",
|
|
239
|
+
criticalRules: [
|
|
240
|
+
"Ensure input markdown has clear headers (## Section) and structure",
|
|
241
|
+
"For email attachment: use named_inputs (not attachment_links) due to DOCUMENT type",
|
|
242
|
+
"Chain pattern: call_llm (content generation) → generate_document → send_email (via named_inputs)",
|
|
243
|
+
"Optional: Add CSS/styling in markdown for professional formatting",
|
|
244
|
+
],
|
|
245
|
+
example: "detailed_content (call_llm) → generate_doc → send_email.named_inputs_Attachment",
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
actionName: "respond_with_sources",
|
|
249
|
+
displayName: "Respond using Search Results",
|
|
250
|
+
category: "generation",
|
|
251
|
+
description: "Generates response grounded in search results with citations.",
|
|
252
|
+
inputs: [
|
|
253
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "User query" },
|
|
254
|
+
{ name: "search_results", type: "WELL_KNOWN_TYPE_SEARCH_RESULT", required: true, description: "Search results to ground response" },
|
|
255
|
+
],
|
|
256
|
+
outputs: [
|
|
257
|
+
{ name: "response_with_sources", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Response with citations" },
|
|
258
|
+
],
|
|
259
|
+
whenToUse: "When you want responses grounded in specific search results with source citations",
|
|
260
|
+
criticalRules: [
|
|
261
|
+
"Enable use_citation_based_filtering for trust",
|
|
262
|
+
"Implement confidence thresholds for quality control",
|
|
263
|
+
],
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
actionName: "respond_for_external_actions",
|
|
267
|
+
displayName: "Respond using Tool Result",
|
|
268
|
+
category: "generation",
|
|
269
|
+
description: "Generates response explaining external tool/action results.",
|
|
270
|
+
inputs: [
|
|
271
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Original query" },
|
|
272
|
+
{ name: "external_action_result", type: "WELL_KNOWN_TYPE_ANY", required: true, description: "Tool execution result" },
|
|
273
|
+
],
|
|
274
|
+
outputs: [
|
|
275
|
+
{ name: "response", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Human-friendly explanation" },
|
|
276
|
+
],
|
|
277
|
+
whenToUse: "After external_action_caller to explain results to user",
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
actionName: "fixed_response",
|
|
281
|
+
displayName: "Fixed Response",
|
|
282
|
+
category: "generation",
|
|
283
|
+
description: "Returns a static/template response with {{variable}} substitution. No LLM call.",
|
|
284
|
+
inputs: [
|
|
285
|
+
{ name: "named_inputs", type: "WELL_KNOWN_TYPE_ANY", required: false, description: "Variables to substitute into template (use named_inputs_<Variable_Name>)" },
|
|
286
|
+
{ name: "extracted_variables", type: "WELL_KNOWN_TYPE_ANY", required: false, description: "JSON key-value pairs for variable substitution" },
|
|
287
|
+
{ name: "fixed_response", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Template with {{variable_name}} placeholders" },
|
|
288
|
+
],
|
|
289
|
+
outputs: [
|
|
290
|
+
{ name: "fixed_response_with_sources", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Response with variables substituted" },
|
|
291
|
+
],
|
|
292
|
+
whenToUse: "For short, structured messages with variables: confirmations, acknowledgments, simple notifications",
|
|
293
|
+
whenNotToUse: "For complex templates - use data source templates with generate_document or fill_document_template instead",
|
|
294
|
+
criticalRules: [
|
|
295
|
+
"Use {{variable_name}} syntax for dynamic content (case-sensitive)",
|
|
296
|
+
"named_inputs takes precedence over extracted_variables when same variable name exists",
|
|
297
|
+
"Keep templates SHORT - for long emails/documents use data source templates",
|
|
298
|
+
"Variables must match exactly including case",
|
|
299
|
+
],
|
|
300
|
+
example: "Template: 'Dear {{Customer_Name}}, your order {{Order_ID}} has been {{Status}}.' " +
|
|
301
|
+
"→ Connect entity_extraction.customer_name to named_inputs_Customer_Name",
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
actionName: "send_email_agent",
|
|
305
|
+
displayName: "Send Email",
|
|
306
|
+
category: "external",
|
|
307
|
+
description: "Sends email via configured email provider.",
|
|
308
|
+
inputs: [
|
|
309
|
+
{ name: "email_to", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Recipient email address - use fixed_response with {{email}} template" },
|
|
310
|
+
{ name: "email_subject", type: "WELL_KNOWN_TYPE_ANY", required: false, description: "Email subject line" },
|
|
311
|
+
{ name: "email_body", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Email body content" },
|
|
312
|
+
{ name: "attachment_links", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: false, description: "Document links to attach (use named_inputs for DOCUMENT type)" },
|
|
313
|
+
],
|
|
314
|
+
outputs: [
|
|
315
|
+
{ name: "send_status", type: "WELL_KNOWN_TYPE_ANY", description: "Send confirmation" },
|
|
316
|
+
],
|
|
317
|
+
whenToUse: "When you need to send email after user confirmation",
|
|
318
|
+
criticalRules: [
|
|
319
|
+
"email_to requires TEXT_WITH_SOURCES type - use fixed_response with {{email}} template populated from entity_extraction",
|
|
320
|
+
"ALWAYS use HITL confirmation before sending (runIf: 'HITL Success')",
|
|
321
|
+
"For attachments with DOCUMENT type, use named_inputs instead of attachment_links",
|
|
322
|
+
"Never connect summarized_conversation or search_results directly to email_to",
|
|
323
|
+
],
|
|
324
|
+
example: "entity_extraction → fixed_response('{{email}}') → send_email.email_to (CORRECT pattern)",
|
|
325
|
+
},
|
|
326
|
+
// External Actions
|
|
327
|
+
{
|
|
328
|
+
actionName: "external_action_caller",
|
|
329
|
+
displayName: "External Tool Caller / Intelligent Actions",
|
|
330
|
+
category: "external",
|
|
331
|
+
description: "Calls external APIs/tools (ServiceNow, Salesforce, Workday, etc.).",
|
|
332
|
+
inputs: [
|
|
333
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Context for tool call" },
|
|
334
|
+
{ name: "conversation", type: "WELL_KNOWN_TYPE_CHAT_CONVERSATION", required: false, description: "Conversation history" },
|
|
335
|
+
],
|
|
336
|
+
outputs: [
|
|
337
|
+
{ name: "tool_execution_result", type: "WELL_KNOWN_TYPE_ANY", description: "Tool execution result" },
|
|
338
|
+
],
|
|
339
|
+
whenToUse: "When you need to call external systems (create ticket, send email, lookup CRM, update records)",
|
|
340
|
+
criticalRules: [
|
|
341
|
+
"Check conversation history before creating records to avoid duplicates",
|
|
342
|
+
"external_action_caller does NOT support HITL — only send_email_agent and entity_extraction_with_documents do",
|
|
343
|
+
],
|
|
344
|
+
example: "ServiceNow ticket creation, Salesforce record update, Email sending",
|
|
345
|
+
},
|
|
346
|
+
// Entity & Rule Processing
|
|
347
|
+
{
|
|
348
|
+
actionName: "entity_extraction_with_documents",
|
|
349
|
+
displayName: "Entity Extraction",
|
|
350
|
+
category: "entity",
|
|
351
|
+
description: "Extracts structured entities from documents for cross-document linking or API calls.",
|
|
352
|
+
inputs: [
|
|
353
|
+
{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Documents to extract from" },
|
|
354
|
+
{ name: "extraction_columns", type: "WELL_KNOWN_TYPE_ANY", required: true, description: "Schema defining what to extract" },
|
|
355
|
+
],
|
|
356
|
+
outputs: [
|
|
357
|
+
{ name: "extraction_columns", type: "WELL_KNOWN_TYPE_ANY", description: "Extracted structured data" },
|
|
358
|
+
],
|
|
359
|
+
criticalRules: [
|
|
360
|
+
"Works on DOCUMENTS, not text",
|
|
361
|
+
"Requires schema definition for extraction columns",
|
|
362
|
+
],
|
|
363
|
+
whenToUse: "When you need structured data extraction for cross-document linking, API calls, or audit trails with citations",
|
|
364
|
+
whenNotToUse: "For simple conversational queries—use LLM resolution instead",
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
actionName: "rule_validation_with_documents",
|
|
368
|
+
displayName: "Rule Validation",
|
|
369
|
+
category: "validation",
|
|
370
|
+
description: "Validates extracted data against business rules. Rules are configured through the node's settings panel (UI), not via workflow_def inputs. Each rule has a name and description. Output mode is Pass/Fail per rule.",
|
|
371
|
+
inputs: [
|
|
372
|
+
{ name: "primary_docs", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Primary documents to validate against" },
|
|
373
|
+
{ name: "map_of_extracted_columns", type: "WELL_KNOWN_TYPE_ANY", required: true, description: "Extracted data from entity_extraction to validate" },
|
|
374
|
+
],
|
|
375
|
+
outputs: [
|
|
376
|
+
{ name: "ruleset_output", type: "WELL_KNOWN_TYPE_ANY", description: "Pass/Fail results per rule with explanations" },
|
|
377
|
+
],
|
|
378
|
+
whenToUse: "For compliance checks, business rule validation, threshold checking. Rules (e.g., 'Required Fields', 'Data Variance') are defined in the node's UI settings — the LLM only needs to wire inputs/outputs correctly.",
|
|
379
|
+
},
|
|
380
|
+
// Human Collaboration
|
|
381
|
+
// NOTE: general_hitl is NOT a deployable node — it appears in catalogs but cannot be deployed.
|
|
382
|
+
// HITL is implemented as a FLAG on specific agents: entity_extraction_with_documents and send_email_agent.
|
|
383
|
+
// Kept here for reference when analyzing existing workflows that may use it.
|
|
384
|
+
{
|
|
385
|
+
actionName: "general_hitl",
|
|
386
|
+
displayName: "Human Collaboration (NOT RECOMMENDED — use agent flags instead)",
|
|
387
|
+
category: "collaboration",
|
|
388
|
+
description: "NOT DEPLOYABLE — general_hitl appears in catalogs but cannot be deployed. HITL approval is a flag on entity_extraction_with_documents and send_email_agent only. Do NOT add general_hitl nodes to workflows.",
|
|
389
|
+
inputs: [
|
|
390
|
+
{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Context for review" },
|
|
391
|
+
],
|
|
392
|
+
outputs: [
|
|
393
|
+
{ name: "hitl_status_HITL Success", type: "WELL_KNOWN_TYPE_ANY", description: "Human approved path" },
|
|
394
|
+
{ name: "hitl_status_HITL Failure", type: "WELL_KNOWN_TYPE_ANY", description: "Human rejected path" },
|
|
395
|
+
],
|
|
396
|
+
criticalRules: [
|
|
397
|
+
"general_hitl is NOT deployable — do NOT add it to any workflow",
|
|
398
|
+
"If user asks for approval: enable the HITL flag on entity_extraction_with_documents or send_email_agent (only nodes that support HITL)",
|
|
399
|
+
"external_action_caller does NOT support HITL despite appearing in older guidance",
|
|
400
|
+
"If you encounter general_hitl in an existing workflow: it may not function correctly",
|
|
401
|
+
],
|
|
402
|
+
whenToUse: "DO NOT USE — general_hitl is not deployable. HITL is a flag on entity_extraction_with_documents and send_email_agent only.",
|
|
403
|
+
example: "For approval: enable HITL flag on send_email_agent (disable_human_interaction: false)",
|
|
404
|
+
},
|
|
405
|
+
// Validation & Guardrails
|
|
406
|
+
{
|
|
407
|
+
actionName: "response_validator",
|
|
408
|
+
displayName: "Response Validator",
|
|
409
|
+
category: "validation",
|
|
410
|
+
description: "Validates LLM output against criteria. Guardrail for response quality.",
|
|
411
|
+
inputs: [
|
|
412
|
+
{ name: "reference_query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Original query" },
|
|
413
|
+
{ name: "response_to_validate", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Response to check" },
|
|
414
|
+
],
|
|
415
|
+
outputs: [
|
|
416
|
+
{ name: "abstain_reason", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Reason if validation fails" },
|
|
417
|
+
],
|
|
418
|
+
whenToUse: "For guardrails, compliance checking on generated responses, quality control",
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
actionName: "abstain_action",
|
|
422
|
+
displayName: "Abstain from Answering",
|
|
423
|
+
category: "validation",
|
|
424
|
+
description: "Declines to answer when appropriate. Graceful handling of out-of-scope queries.",
|
|
425
|
+
inputs: [
|
|
426
|
+
{ name: "abstain_reason", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Why abstaining" },
|
|
427
|
+
],
|
|
428
|
+
outputs: [
|
|
429
|
+
{ name: "abstain_reason", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Abstention message" },
|
|
430
|
+
],
|
|
431
|
+
whenToUse: "When the AI should explicitly decline to answer or redirect",
|
|
432
|
+
},
|
|
433
|
+
// Sentiment & Analysis
|
|
434
|
+
{
|
|
435
|
+
actionName: "sentiment_analyzer",
|
|
436
|
+
displayName: "Sentiment Analyzer",
|
|
437
|
+
category: "analytics",
|
|
438
|
+
description: "Analyzes sentiment/emotion in user input.",
|
|
439
|
+
inputs: [
|
|
440
|
+
{ name: "text", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Text to analyze" },
|
|
441
|
+
],
|
|
442
|
+
outputs: [
|
|
443
|
+
{ name: "sentiment", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Sentiment analysis" },
|
|
444
|
+
],
|
|
445
|
+
whenToUse: "When you need to gauge user emotion for routing or response tone adjustment",
|
|
446
|
+
},
|
|
447
|
+
// Domain Agents - Finance
|
|
448
|
+
{
|
|
449
|
+
actionName: "financial_risk_assessor",
|
|
450
|
+
displayName: "Financial Risk Assessor",
|
|
451
|
+
category: "finance",
|
|
452
|
+
description: "Analyzes financial risk factors for investment/credit decisions.",
|
|
453
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Risk query" }],
|
|
454
|
+
outputs: [{ name: "risk_assessment", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Risk analysis" }],
|
|
455
|
+
whenToUse: "Financial services: portfolio risk, credit assessment, exposure analysis",
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
actionName: "financial_statement_analyzer",
|
|
459
|
+
displayName: "Financial Statement Analyzer",
|
|
460
|
+
category: "finance",
|
|
461
|
+
description: "Analyzes financial statements and reports.",
|
|
462
|
+
inputs: [{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Financial documents" }],
|
|
463
|
+
outputs: [{ name: "analysis", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Financial analysis" }],
|
|
464
|
+
whenToUse: "Analyzing P&L, balance sheets, annual reports",
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
actionName: "tax_advisor",
|
|
468
|
+
displayName: "Tax Advisor",
|
|
469
|
+
category: "finance",
|
|
470
|
+
description: "Provides tax-related guidance and analysis.",
|
|
471
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Tax question" }],
|
|
472
|
+
outputs: [{ name: "tax_advice", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Tax guidance" }],
|
|
473
|
+
whenToUse: "Tax planning, compliance questions, deduction analysis",
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
actionName: "audit_evidence_verifier",
|
|
477
|
+
displayName: "Audit Evidence Verifier",
|
|
478
|
+
category: "finance",
|
|
479
|
+
description: "Verifies audit evidence and documentation.",
|
|
480
|
+
inputs: [{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Audit documents" }],
|
|
481
|
+
outputs: [{ name: "verification", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Verification results" }],
|
|
482
|
+
whenToUse: "Audit support, evidence verification, compliance documentation",
|
|
483
|
+
},
|
|
484
|
+
// Domain Agents - Healthcare
|
|
485
|
+
{
|
|
486
|
+
actionName: "medical_record_summarizer",
|
|
487
|
+
displayName: "Medical Record Summarizer",
|
|
488
|
+
category: "healthcare",
|
|
489
|
+
description: "Summarizes medical records and patient history.",
|
|
490
|
+
inputs: [{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Medical records" }],
|
|
491
|
+
outputs: [{ name: "summary", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Record summary" }],
|
|
492
|
+
whenToUse: "Healthcare: summarizing patient records, medical history, clinical notes",
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
actionName: "medical_research_assistant",
|
|
496
|
+
displayName: "Medical Research Assistant",
|
|
497
|
+
category: "healthcare",
|
|
498
|
+
description: "Assists with medical research queries.",
|
|
499
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Research query" }],
|
|
500
|
+
outputs: [{ name: "research", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Research findings" }],
|
|
501
|
+
whenToUse: "Medical research, literature review, clinical guidance",
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
actionName: "insurance_claim_summarizer",
|
|
505
|
+
displayName: "Insurance Claim Summarizer",
|
|
506
|
+
category: "healthcare",
|
|
507
|
+
description: "Summarizes insurance claims and documentation.",
|
|
508
|
+
inputs: [{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Claim documents" }],
|
|
509
|
+
outputs: [{ name: "summary", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Claim summary" }],
|
|
510
|
+
whenToUse: "Insurance processing, claim analysis",
|
|
511
|
+
},
|
|
512
|
+
// Domain Agents - Legal
|
|
513
|
+
{
|
|
514
|
+
actionName: "compliance_document_analyzer",
|
|
515
|
+
displayName: "Compliance Document Analyzer",
|
|
516
|
+
category: "legal",
|
|
517
|
+
description: "Analyzes documents for compliance issues.",
|
|
518
|
+
inputs: [{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Documents to analyze" }],
|
|
519
|
+
outputs: [{ name: "compliance_findings", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Compliance analysis" }],
|
|
520
|
+
whenToUse: "Regulatory compliance, contract review, policy compliance",
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
actionName: "legal_expert",
|
|
524
|
+
displayName: "Legal Expert",
|
|
525
|
+
category: "legal",
|
|
526
|
+
description: "Provides legal analysis and guidance.",
|
|
527
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Legal question" }],
|
|
528
|
+
outputs: [{ name: "legal_analysis", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Legal guidance" }],
|
|
529
|
+
whenToUse: "Legal research, contract analysis, regulatory questions",
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
actionName: "information_redacter",
|
|
533
|
+
displayName: "Information Redacter",
|
|
534
|
+
category: "legal",
|
|
535
|
+
description: "Redacts sensitive information from documents.",
|
|
536
|
+
inputs: [{ name: "documents", type: "WELL_KNOWN_TYPE_DOCUMENT", required: true, description: "Documents to redact" }],
|
|
537
|
+
outputs: [{ name: "redacted", type: "WELL_KNOWN_TYPE_DOCUMENT", description: "Redacted documents" }],
|
|
538
|
+
whenToUse: "Privacy compliance, document sanitization",
|
|
539
|
+
},
|
|
540
|
+
// Domain Agents - IT/Security
|
|
541
|
+
{
|
|
542
|
+
actionName: "phishing_email_detector",
|
|
543
|
+
displayName: "Phishing Email Detector",
|
|
544
|
+
category: "it_security",
|
|
545
|
+
description: "Detects phishing attempts in emails.",
|
|
546
|
+
inputs: [{ name: "email_content", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Email to analyze" }],
|
|
547
|
+
outputs: [{ name: "detection_result", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Phishing analysis" }],
|
|
548
|
+
whenToUse: "Email security, security operations",
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
actionName: "cybersecurity_expert",
|
|
552
|
+
displayName: "Cybersecurity Expert",
|
|
553
|
+
category: "it_security",
|
|
554
|
+
description: "Provides cybersecurity analysis and guidance.",
|
|
555
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Security query" }],
|
|
556
|
+
outputs: [{ name: "security_analysis", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Security guidance" }],
|
|
557
|
+
whenToUse: "Security incident analysis, vulnerability assessment",
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
actionName: "technical_support",
|
|
561
|
+
displayName: "Technical Support",
|
|
562
|
+
category: "it_security",
|
|
563
|
+
description: "Provides IT technical support guidance.",
|
|
564
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Support query" }],
|
|
565
|
+
outputs: [{ name: "support_response", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Technical guidance" }],
|
|
566
|
+
whenToUse: "IT helpdesk, troubleshooting, technical guidance",
|
|
567
|
+
},
|
|
568
|
+
// Domain Agents - Sales
|
|
569
|
+
{
|
|
570
|
+
actionName: "sales_intelligence",
|
|
571
|
+
displayName: "Sales Intelligence",
|
|
572
|
+
category: "sales",
|
|
573
|
+
description: "Provides sales insights and account intelligence.",
|
|
574
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Sales query" }],
|
|
575
|
+
outputs: [{ name: "intelligence", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Sales insights" }],
|
|
576
|
+
whenToUse: "Account research, competitive analysis, opportunity assessment",
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
actionName: "email_writer",
|
|
580
|
+
displayName: "Email Writer",
|
|
581
|
+
category: "sales",
|
|
582
|
+
description: "Generates professional email content.",
|
|
583
|
+
inputs: [{ name: "query", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Email context" }],
|
|
584
|
+
outputs: [{ name: "email", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Generated email" }],
|
|
585
|
+
whenToUse: "Sales outreach, customer communication, follow-ups",
|
|
586
|
+
},
|
|
587
|
+
// Formatting Agents
|
|
588
|
+
{
|
|
589
|
+
actionName: "json_formatter",
|
|
590
|
+
displayName: "JSON Formatter",
|
|
591
|
+
category: "formatting",
|
|
592
|
+
description: "Formats output as JSON.",
|
|
593
|
+
inputs: [{ name: "content", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Content to format" }],
|
|
594
|
+
outputs: [{ name: "json", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "JSON formatted output" }],
|
|
595
|
+
whenToUse: "When structured JSON output is required",
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
actionName: "json_extractor",
|
|
599
|
+
displayName: "JSON Extractor",
|
|
600
|
+
category: "formatting",
|
|
601
|
+
description: "Extracts JSON from LLM output.",
|
|
602
|
+
inputs: [{ name: "content", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Content containing JSON" }],
|
|
603
|
+
outputs: [{ name: "extracted_json", type: "WELL_KNOWN_TYPE_ANY", description: "Extracted JSON object" }],
|
|
604
|
+
whenToUse: "When you need to parse JSON from LLM responses",
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
actionName: "markdown_formatter",
|
|
608
|
+
displayName: "Markdown Formatter",
|
|
609
|
+
category: "formatting",
|
|
610
|
+
description: "Formats output as Markdown.",
|
|
611
|
+
inputs: [{ name: "content", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", required: true, description: "Content to format" }],
|
|
612
|
+
outputs: [{ name: "markdown", type: "WELL_KNOWN_TYPE_TEXT_WITH_SOURCES", description: "Markdown formatted output" }],
|
|
613
|
+
whenToUse: "When rich text formatting is needed",
|
|
614
|
+
},
|
|
615
|
+
];
|