Appearance
Core Concepts
AgenTree enables building AI agents that solve complex problems by dividing them into subtasks, with each agent focused on a specific goal. Here are the key concepts with detailed explanatory diagrams.
1. Hierarchy: Agents as a Tree Structure
Principle
The system starts with a root agent (Agent 0) that receives the main task. Each agent can create child agents for subtasks, forming a tree structure that enables clear delegation and specialization. Once a child is finished, it can return results to its parent.
Diagram: Hierarchical Structure
βββββββββββββββ
β USER β
β β
ββββββββ¬βββββββ
β task
βΌ
βββββββββββββββββββββββ
β Agent 0 β
β "Analyze tech β
β market" β
ββββββββββββ¬βββββββββββ
β
ββββββββββββββββΌβββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββββ βββββββββββββββ ββββββββββββββββββββ
β Agent 1 β β Agent 2 β β Agent 3 β
β "Research β β "Analyze β β "Synthesize β
β trends" β β competition"β β results" β
βββββββββββ¬ββββββββββ ββββββββ¬βββββββ ββββββββββ¬ββββββββββ
β β β
βββββββ΄ββββββ β βββββββ΄ββββββ
βΌ βΌ βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ βββββββββββ βββββββββββ
βAgent 1.1β βAgent 1.2β βAgent 2.1β βAgent 3.1β βAgent 3.2β
β"Gen AI" β β"Crypto" β β"Startupsβ β"Charts" β β"Report" β
βββββββββββ βββββββββββ βββββββββββ βββββββββββ βββββββββββ
Tree structure properties:
- Each agent knows only its own task and children
- Sibling agents can work in parallel (not implemented yet)
2. Task Decomposition: Divide and Conquer
Principle
AgenTree agents recursively break down complex tasks into smaller, manageable subtasks. Each subtask is assigned to a new agent, which can itself decompose further if needed.
Diagram: Decomposition Process
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MAIN TASK β
β "Build e-commerce application" β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββ ββββββββββββββ βββββββββββββββββββ
β SUBTASK 1 β β SUBTASK 2 β β SUBTASK 3 β
β "Backend API" β β "Frontend" β β "Deployment" β
ββββ¬βββββββββββββ ββββββββ¬ββββββ βββββββββββββββββ¬ββ
β β β
ββββββ΄βββββββ βββββ΄ββββββββ βββββ΄βββββββββ
βΌ βΌ βΌ βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ βββββββββββ βββββββββββ ββββββββββββ
βAuth API β βShop API β βReact UI β βCart UI β βDocker β βAWS Configβ
β(Agent A)β β(Agent B)β β(Agent C)β β(Agent D)β β(Agent E)β β(Agent F) β
βββββββββββ βββββββββββ βββββββββββ βββββββββββ βββββββββββ ββββββββββββ
Decomposition flow:
1. Agent receives task β Analyzes complexity
β
2. If complex β Decomposes into subtasks
β
3. Creates child agents β Assigns subtasks
β
4. Each child β Repeats process if necessary
3. Tools: Capabilities Controlled by Parents
Principle
Each agent can only use the tools (functions, MCPs, etc.) that its parent assigns. This ensures controlled access and appropriate specialization.
Diagram: Tool Assignment
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PARENT AGENT β
β "Data analyzer" β
β β
β Available tools: β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β readFile β β writeFile β β sqlQuery β β
β β httpRequest β β bashCommand β β pythonCode β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β SELECTIVELY DELEGATES
βββββββββββββββββΌββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββ βββββββββββββββββββ
β CHILD AGENT β β CHILD AGENT β β CHILD AGENT β
β "Read data" β β"Process SQL"β β"Generate report"β
β β β β β β
β Assigned tools: β β Assigned: β β Assigned tools: β
β βββββββββββββββ β βββββββββββββ β β βββββββββββββββ β
β β readFile β β ββsqlQuery β β β β writeFile β β
β β httpRequest β β ββpythonCodeβ β β β pythonCode β β
β βββββββββββββββ β βββββββββββββ β β βββββββββββββββ β
βββββββββββββββββββ βββββββββββββββ βββββββββββββββββββ
Tool Control Matrix:
Tool β Parent β Child 1 β Child 2 β Child 3
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
readFile β β
β β
β β β β
writeFile β β
β β β β β β
sqlQuery β β
β β β β
β β
httpRequest β β
β β
β β β β
pythonCode β β
β β β β
β β
bashCommand β β
β β β β β β
4. System Prompt & Instructions: Context from Parents
Principle
Each agent receives a system prompt and instructions from its parent, defining its role and approach. This mechanism ensures specialization and alignment with the overall strategy.
Diagram: Context Transmission
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PARENT AGENT β
β "AI Project Manager" β
β β
β Global configuration: β
β β’ Objective: Develop chatbot β
β β’ Budget: $50k β
β β’ Timeline: 3 months β
β β’ Stack: Python + FastAPI β
βββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β TRANSMITS SPECIALIZED CONTEXT
βββββββββββββββββΌββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CHILD AGENT 1 β
β "Backend Developer" β
β β
β Received system prompt: β
β "You are a backend developer expert in Python. β
β Your mission: create REST API for the chatbot. β
β Allocated budget: $20k. Timeline: 6 weeks. β
β Use FastAPI, PostgreSQL, and Docker." β
β β
β Specific instructions: β
β β’ Implement JWT authentication β
β β’ Create message endpoints β
β β’ Integrate with AI model β
β β’ Document with OpenAPI β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CHILD AGENT 2 β
β "UX/UI Designer" β
β β
β Received system prompt: β
β "You are a UX/UI designer specialized in conversational β
β interfaces. Your mission: create the chatbot interface. β
β Budget: $15k. Timeline: 4 weeks." β
β β
β Specific instructions: β
β β’ Create wireframes and mockups β
β β’ Follow WCAG 2.1 accessibility β
β β’ Responsive design (mobile-first) β
β β’ Prototype interactions with Figma β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
5. Events & Monitoring: Transparent Execution
Events & Monitoring: Transparent Execution
Principle
Events are emitted step by step as agents and their children work. This enables real-time monitoring and debugging capabilities.
Main Agent (0)
β
ββ agentCreated
ββ taskStarted
β
ββ childCreated β Agent 1
β β
β ββ agentCreated
β ββ toolCallStarted (searchAPI)
β ββ toolCallCompleted (200 results)
β ββ agentCompleted β
β
ββ childCreated β Agent 2
β β
β ββ agentCreated
β ββ toolCallStarted (webScraping)
β ββ toolCallError (403 Forbidden) β
β ββ toolCallStarted (retry with headers)
β ββ toolCallCompleted (data retrieved) β
β ββ agentCompleted β
β
ββ agentCompleted β
(full success)
Timeline View
Time Agent 0 Agent 1 Agent 2
---- ------- ------- -------
T0 agentCreated
T1 taskStarted
T2 childCreated
T3 agentCreated
T4 childCreated
T5 toolCallStarted
T6 agentCreated
T7 toolCallCompleted
T8 toolCallStarted
T9 agentCompleted
T10 toolCallError
T11 toolCallStarted (retry)
T12 toolCallCompleted
T13 agentCompleted
T14 agentCompleted
6. Output: Structured Results
Principle
All results, logs, and reports are saved in a folder tree structure that mirrors the agent hierarchy, making it easy to review and analyze what happened at each level.
Diagram: Output File Structure
.agentree/
βββ π main-agent/ β Root agent (Agent 0)
β βββ π agent-report.md β Main report
β βββ π execution-log.json β Detailed log
β βββ π task-summary.md β Task summary
β βββ π tools-output/ β Tool outputs
β β βββ π search-results.json
β β βββ π api-responses.json
β β
β βββ π research-agent/ β Child agent 1
β β βββ π agent-report.md
β β βββ π execution-log.json
β β βββ π ai-trends-agent/ β Grandchild agent 1.1
β β β βββ π agent-report.md
β β β βββ π trends-data.csv
β β β βββ π analysis-charts.png
β β β
β β βββ π crypto-trends-agent/ β Grandchild agent 1.2
β β βββ π agent-report.md
β β βββ π crypto-analysis.json
β β
β βββ π competitor-agent/ β Child agent 2
β β βββ π agent-report.md
β β βββ π execution-log.json
β β βββ π error-log.txt β Encountered errors
β β βββ π startup-analysis-agent/ β Grandchild agent 2.1
β β βββ π agent-report.md
β β βββ π startup-data.json
β β
β βββ π synthesis-agent/ β Child agent 3
β βββ π agent-report.md
β βββ π execution-log.json
β βββ π chart-generator-agent/ β Grandchild agent 3.1
β β βββ π agent-report.md
β β βββ π market-charts.html
β β
β βββ π report-writer-agent/ β Grandchild agent 3.2
β βββ π agent-report.md
β βββ π final-market-report.pdf β Final deliverable