#![allow(clippy::unwrap_used, clippy::expect_used)]
pub(crate) fn triage_json() -> String {
serde_json::json!({
"schemaVersion": 1,
"entry": "agent",
"nodes": [
{"id": "agent", "kind": "agent", "systemPrompt": "You triage.", "model": "gpt-4o-mini", "tools": []},
{"id": "lookup", "kind": "tool", "toolName": "kb.search"},
{"id": "router", "kind": "router", "maxIterations": 3},
{"id": "respond", "kind": "respond"}
],
"edges": [
{"from": "agent", "to": "lookup"},
{"from": "lookup", "to": "router"},
{"from": "router", "to": "agent", "branch": "loop"},
{"from": "router", "to": "respond", "branch": "resolved"}
]
})
.to_string()
}
pub(crate) fn supervisor_json() -> String {
serde_json::json!({
"schemaVersion": 2,
"entry": "sup",
"nodes": [
{
"id": "sup",
"kind": "supervisor",
"systemPrompt": "Route the request to the correct specialist.",
"model": "gpt-4o-mini",
"routes": [
{"branch": "billing", "description": "Billing and payment questions"},
{"branch": "tech", "description": "Technical support issues"}
]
},
{
"id": "agent_billing",
"kind": "agent",
"systemPrompt": "You handle billing questions.",
"model": "gpt-4o-mini",
"tools": []
},
{
"id": "router_billing",
"kind": "router",
"maxIterations": 2
},
{
"id": "agent_tech",
"kind": "agent",
"systemPrompt": "You handle technical issues.",
"model": "gpt-4o-mini",
"tools": []
},
{
"id": "router_tech",
"kind": "router",
"maxIterations": 2
},
{
"id": "respond",
"kind": "respond"
}
],
"edges": [
{"from": "sup", "to": "agent_billing", "branch": "billing"},
{"from": "sup", "to": "agent_tech", "branch": "tech"},
{"from": "agent_billing", "to": "router_billing"},
{"from": "router_billing","to": "agent_billing", "branch": "loop"},
{"from": "router_billing","to": "respond", "branch": "resolved"},
{"from": "agent_tech", "to": "router_tech"},
{"from": "router_tech", "to": "agent_tech", "branch": "loop"},
{"from": "router_tech", "to": "respond", "branch": "resolved"}
]
})
.to_string()
}
pub(crate) fn parallel_json() -> String {
serde_json::json!({
"schemaVersion": 2,
"entry": "entry",
"nodes": [
{
"id": "entry",
"kind": "agent",
"systemPrompt": "Kick off the parallel workflow.",
"model": "gpt-4o-mini",
"tools": []
},
{"id": "fan", "kind": "parallel"},
{
"id": "agent_a",
"kind": "agent",
"systemPrompt": "Branch A specialist.",
"model": "gpt-4o-mini",
"tools": []
},
{
"id": "tool_b",
"kind": "tool",
"toolName": "branch_b.process"
},
{"id": "meet", "kind": "join"},
{"id": "respond", "kind": "respond"}
],
"edges": [
{"from": "entry", "to": "fan"},
{"from": "fan", "to": "agent_a", "branch": "a"},
{"from": "fan", "to": "tool_b", "branch": "b"},
{"from": "agent_a", "to": "meet"},
{"from": "tool_b", "to": "meet"},
{"from": "meet", "to": "respond"}
]
})
.to_string()
}