mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-05 09:58:45 +00:00
Specialists inherited an instruction to always delegate specialist work, which could relay the same assignment through several identical agents. Include the caller's current profile in delegation guidance and direct it to handle matching work itself. Reserve same-profile delegation for distinct bounded subtasks and independent reviews, preserving profile discovery and existing child lifecycle behavior. Validation: 157 focused tests passed. Four Default/gpt-6.1-terra live checks confirmed single-hop root coding delegation, direct specialist execution, and two independent same-profile reviewers.
2.0 KiB
2.0 KiB
call_subordinate
{{if current_profile}}
your current profile: {{current_profile}}
{{endif}}
delegate specialized work outside your own profile; do work matching your profile yourself
same-profile agents only for distinct bounded subtasks or independent reviews, never to pass on your whole task
when a request calls for independent perspectives, challenges, or workstreams, delegate them to separate subordinates instead of performing them all with parent tools
args: message, optional profile, name, reset, context_id, attachments
profile: optional prompt profile key for the subordinate; when provided, it must exactly match an available profile; leave empty for the default profilename: optional label for the child context, shown in listings; defaults to a short task label for new children; when continuing a child, a non-empty name updates its labelreset: use json booleantrueto create a fresh child; usefalseto continue the default child or the suppliedcontext_idcontext_id: stable child ID returned by an earlier direct or parallel call; use it withreset: falseto continue that exact childattachments: optional list of file paths/URIs passed to the subordinate's task message so it can read them directlymessage: define role, goal, and the concrete task each caller creates its next agent level: A0 creates A1 children, A1 creates A2 children, and so on after the subordinate returns, answer from its result directly when it satisfies the user request do not repeat the same solving work or call extra tools after a sufficient subordinate result example:
{
"thoughts": ["Need focused external research before I continue."],
"headline": "Delegating research subtask",
"tool_name": "call_subordinate",
"tool_args": {
"profile": "researcher",
"message": "Research Italy AI trends and return key findings.",
"reset": true
}
}
reuse long subordinate output with §§include(path) instead of rewriting it
{{if agent_profiles}}
available profiles:
{{agent_profiles}}
{{endif}}