Skip to content

Commit 70df8a2

Browse files
committed
udpate readme, add swe agent
1 parent 2eeae0d commit 70df8a2

File tree

10 files changed

+594
-80
lines changed

10 files changed

+594
-80
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,31 @@ The book is organized across 4 parts, taking you from theory to production:
3333
| -------- | -------------------------------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------- |
3434
| **Ch 1** | Understanding Multi-Agent Systems | Poet/critic example, references [`yc_analysis/`](examples/workflows/yc_analysis/) | Understand when multi-agent systems are needed |
3535
| **Ch 2** | Multi-Agent Patterns | - | Master coordination strategies (workflows vs autonomous) |
36-
| **Ch 3** | UX Design Principles for Multi-Agent Systems | - | Build intuitive agent interfaces |
36+
| **Ch 3** | UX Design Principles for Multi-Agent Systems | - | Principles for building intuitive agent interfaces |
3737

3838
### Part II: Building Multi-Agent Systems from Scratch
3939

4040
| Chapter | Title | Code | Learning Outcome |
4141
| -------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
42-
| **Ch 4** | Building Your First Agent | [`agents/_agent.py`](picoagents/src/picoagents/agents/_agent.py), [`basic-agent.py`](examples/agents/basic-agent.py), [`memory.py`](examples/agents/memory.py), [`middleware.py`](examples/agents/middleware.py) <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/victordibia/designing-multiagent-systems/blob/main/examples/notebooks/01_basic_agent.ipynb) | Build agents with tools, memory, streaming, and middleware |
42+
| **Ch 4** | Building Your First Agent | [`agents/_agent.py`](picoagents/src/picoagents/agents/_agent.py), [`basic-agent.py`](examples/agents/basic-agent.py), [`memory.py`](examples/agents/memory.py), [`middleware.py`](examples/agents/middleware.py) <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/victordibia/designing-multiagent-systems/blob/main/examples/notebooks/01_basic_agent.ipynb) | Build agents with tools, memory, streaming, and middleware |
4343
| **Ch 5** | Computer Use Agents | [`agents/_computer_use/`](picoagents/src/picoagents/agents/_computer_use/), [`computer_use.py`](examples/agents/computer_use.py) | Build browser automation agents with multimodal reasoning |
44-
| **Ch 5** | Building Multi-Agent Workflows | [`workflow/`](picoagents/src/picoagents/workflow/), [`data_visualization/`](examples/workflows/data_visualization/) | Build type-safe workflows with streaming observability |
45-
| **Ch 6** | Autonomous Multi-Agent Orchestration | [`orchestration/`](picoagents/src/picoagents/orchestration/), [`round-robin.py`](examples/orchestration/round-robin.py), [`ai-driven.py`](examples/orchestration/ai-driven.py), [`plan-based.py`](examples/orchestration/plan-based.py) | Implement GroupChat, LLM-driven, and plan-based orchestration (Magentic One patterns) |
46-
| **Ch 6** | Building Modern Agent UX Applications | [`webui/`](picoagents/src/picoagents/webui/), CLI tools | Build interactive agent applications with web UI, auto-discovery, and real-time streaming |
47-
| **Ch 6** | Multi-Agent Frameworks | - | Evaluate and choose the right multi-agent framework |
44+
| **Ch 6** | Building Multi-Agent Workflows | [`workflow/`](picoagents/src/picoagents/workflow/), [`workflows/`](examples/workflows/) | Build type-safe workflows with streaming observability |
45+
| **Ch 7** | Autonomous Multi-Agent Orchestration | [`orchestration/`](picoagents/src/picoagents/orchestration/), [`round-robin.py`](examples/orchestration/round-robin.py), [`ai-driven.py`](examples/orchestration/ai-driven.py), [`plan-based.py`](examples/orchestration/plan-based.py) | Implement GroupChat, LLM-driven, and plan-based orchestration (Magentic One patterns) |
46+
| **Ch 8** | Building Modern Agent UX Applications | [`webui/`](picoagents/src/picoagents/webui/), CLI tools | Build interactive agent applications with web UI, auto-discovery, and real-time streaming |
47+
| **Ch 9** | Multi-Agent Frameworks | - | Evaluate and choose the right multi-agent framework |
4848

4949
### Part III: Evaluating and Optimizing Multi-Agent Systems
5050

51-
| Chapter | Title | Code | Learning Outcome |
52-
| -------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- |
53-
| **Ch 8** | Evaluating Multi-Agent Systems | [`eval/`](picoagents/src/picoagents/eval/), [`agent-evaluation.py`](examples/evaluation/agent-evaluation.py) | Build evaluation frameworks with LLM-as-judge and metrics |
51+
| Chapter | Title | Code | Learning Outcome |
52+
| --------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- |
53+
| **Ch 10** | Evaluating Multi-Agent Systems | [`eval/`](picoagents/src/picoagents/eval/), [`agent-evaluation.py`](examples/evaluation/agent-evaluation.py) | Build evaluation frameworks with LLM-as-judge and metrics |
5454

5555
### Part IV: Real-World Applications
5656

5757
| Chapter | Title | Code | Learning Outcome |
5858
| --------- | ----------------------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------- |
59-
| **Ch 13** | Business Questions from Unstructured Data | [`yc_analysis/`](examples/workflows/yc_analysis/) | Production case study: Analyze 5,000+ companies with cost optimization and checkpointing |
59+
| **Ch 16** | Business Questions from Unstructured Data | [`yc_analysis/`](examples/workflows/yc_analysis/) | Production case study: Analyze 5,000+ companies with cost optimization and checkpointing |
60+
| **Ch 17** | Software Engineering Agent | [`swe_agent/`](examples/agents/swe_agent/) | Build a complete software engineering agent with coding tools and workspace management |
6061

6162
## Getting Started
6263

examples/agents/software_engineer_agent.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from picoagents.llm import AzureOpenAIChatCompletionClient
2424
from picoagents.tools import (
2525
MemoryTool,
26+
TaskStatusTool,
2627
ThinkTool,
2728
create_coding_tools,
2829
)
@@ -112,6 +113,32 @@ async def main():
112113
- Document: what the problem was, your solution, why it works
113114
3. Update /memories/current_task.md with completion status
114115
116+
## PHASE 5: TASK COMPLETION (CRITICAL - ALWAYS DO THIS)
117+
Before finishing, ALWAYS call task_status tool to formally evaluate completion:
118+
119+
If ALL requirements are satisfied:
120+
task_status(
121+
status="complete",
122+
rationale="Detailed explanation of how each requirement was met with evidence",
123+
requirements_met=["List each requirement satisfied"]
124+
)
125+
126+
If unable to complete (blocked, need input, hit limits):
127+
task_status(
128+
status="incomplete",
129+
rationale="Explain the blocker, what was tried, why stopping now",
130+
requirements_pending=["List what remains"]
131+
)
132+
133+
Example complete rationale:
134+
"✓ Requirement 1 (4 functions): Created add, subtract, multiply, divide in calculator.py
135+
✓ Requirement 2 (error handling): divide() raises ValueError for zero divisor
136+
✓ Requirement 3 (tests): Created test_calculator.py with 12 tests, all passed
137+
✓ Requirement 4 (documentation): Added comprehensive docstrings to all functions
138+
All requirements verified and complete."
139+
140+
NEVER finish without calling task_status. This documents WHY you're stopping.
141+
115142
## MEMORY ORGANIZATION
116143
- /memories/patterns/: Reusable solutions, code patterns, common bugs
117144
- /memories/decisions/: Why we chose specific approaches (dated logs)
@@ -122,6 +149,7 @@ async def main():
122149
- ALWAYS check memory before starting a task
123150
- ALWAYS test code changes when possible
124151
- ALWAYS log important decisions
152+
- ALWAYS call task_status before finishing
125153
- Use 'think' tool for complex reasoning
126154
- Keep memory organized and searchable
127155
- Write clear, concise documentation
@@ -131,13 +159,15 @@ async def main():
131159
- If a command fails, analyze the error and try alternative approaches
132160
- Log failures and solutions to help future tasks
133161
- Don't give up after first failure - iterate
162+
- If blocked after retries, call task_status with incomplete and explain
134163
135164
Remember: Your memory persists across sessions. Build up knowledge!
136165
""",
137166
model_client=client,
138167
tools=[
139168
memory_tool,
140169
ThinkTool(),
170+
TaskStatusTool(),
141171
*create_coding_tools(workspace=workspace, bash_timeout=60),
142172
],
143173
max_iterations=50, # Allow longer execution for complex tasks

0 commit comments

Comments
 (0)