File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -128,3 +128,39 @@ LIST KNOWLEDGE BASES IN Module;
128128LIST CONSUMED MCP SERVICES IN Module;
129129LIST AGENTS IN Module;
130130```
131+
132+ ## Calling Agents from Microflows
133+
134+ Dedicated ` CALL AGENT ` MDL syntax is ** not yet implemented** . Use ` CALL JAVA ACTION ` with the AgentCommons Java actions instead:
135+
136+ ``` sql
137+ -- Single-call (Task) agent — no chat history
138+ $Response = CALL JAVA ACTION AgentCommons .Agent_Call_WithoutHistory (
139+ Agent = $Agent,
140+ UserMessage = $UserInput
141+ );
142+
143+ -- Conversational agent — with chat history
144+ $Response = CALL JAVA ACTION AgentCommons .Agent_Call_WithHistory (
145+ Agent = $Agent,
146+ ChatContext = $ChatContext,
147+ UserMessage = $UserInput
148+ );
149+
150+ -- Create a ChatContext wired to an agent (for ConversationalUI)
151+ $ChatContext = CALL JAVA ACTION AgentCommons .ChatContext_Create_ForAgent (
152+ Agent = $Agent,
153+ ActionMicroflow = Module .HandleToolCall ,
154+ Context = $ContextObject
155+ );
156+ ```
157+
158+ Retrieve the ` AgentCommons.Agent ` entity by qualified name before calling:
159+
160+ ``` sql
161+ RETRIEVE $Agent FROM DATABASE AgentCommons .Agent
162+ WHERE AgentCommons .Agent / QualifiedName = ' Module.MyAgent'
163+ LIMIT 1 ;
164+ ```
165+
166+ The ` AgentCommons.Agent ` entity is populated at runtime by ` ASU_AgentEditor ` from the agent documents you create with ` CREATE AGENT ` .
You can’t perform that action at this time.
0 commit comments