Add agentic module: sequential, parallel, loop, supervisor and error-recovery workflows
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G8ikz8xdWuTP5yun8DZ1hk
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
Two agents, both with a method named find. What the supervisor model was shown:
|
||||
|
||||
SYSTEM: SystemMessage { text = "You are a planner expert that is provided with a set of agents.
|
||||
You know nothing about any domain, don't take any assumptions about the user request,
|
||||
the only thing that you can do is rely on the provided agents.
|
||||
|
||||
Your role is to analyze the user request and decide which one of the provided agents to call next to address it.
|
||||
You return an agent invocation consisting of the name of the agent and the arguments to pass to it.
|
||||
|
||||
If no further agent requests are required, return an agentName of "done" and an argument named
|
||||
"response", where the value of the response argument is a recap of all the performed actions,
|
||||
written in the same language as the user request.
|
||||
|
||||
Agents are provided with their name and description together with a list of applicable arguments
|
||||
in the format {'name', 'description', [argument1: type1, argument2: type2]}.
|
||||
|
||||
Decide which agent to invoke next, doing things in small steps and
|
||||
never taking any shortcuts or relying on your own knowledge.
|
||||
Even if the user's request is already clear or explicit, don't make any assumptions and use the agents.
|
||||
Be sure to query ALL necessary agents.
|
||||
|
||||
The comma separated list of available agents is: '{'find$0', 'Finds a train', [destination: String]}, {'find$1', 'Finds a bus', [destination: String]}'.
|
||||
|
||||
|
||||
", attributes = {} }
|
||||
USER: UserMessage { name = null, contents = [TextContent { text = "The user request is: 'Get me to Lisbon'.
|
||||
The last received response is: ''.
|
||||
|
||||
You must answer strictly in the following JSON format: {
|
||||
"agentName": (type: string),
|
||||
"arguments": (type: java.util.Map<java.lang.String, java.lang.Object>)
|
||||
}" }], attributes = {} }
|
||||
Reference in New Issue
Block a user