Skip to content

Commit 17fa527

Browse files
committed
Update README
1 parent ad8993e commit 17fa527

File tree

5 files changed

+78
-18
lines changed

5 files changed

+78
-18
lines changed

README.md

Lines changed: 78 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ An open-source framework for building monolithic or distributed agentic systems,
3636
- [x] Sequential
3737
- [x] Parallel
3838
- [x] Dynamic orchestration
39-
- [x] Dynamic Triage
39+
- [x] Triage
4040
- [x] Handoffs (based on async Swarm)
4141
- [x] Support any LLM
4242
- [x] Support [Model Context Protocol][3] ([example](examples/mcp))
@@ -184,9 +184,29 @@ coagent translator -H type:ChatMessage --chat -d '{"role": "user", "content": "
184184

185185
**Augmented LLM** is an LLM enhanced with augmentations such as retrieval, tools, and memory. Our current models can actively use these capabilities—generating their own search queries, selecting appropriate tools, and determining what information to retain.
186186

187-
<p align="center">
188-
<img src="assets/patterns-augmented-llm.png">
189-
</p>
187+
```mermaid
188+
flowchart LR
189+
In([In]) --> ALLM[LLM] --> Out([Out])
190+
191+
subgraph ALLM[LLM]
192+
LLM[LLM]
193+
Retrieval[Retrieval]
194+
Tools[Tools]
195+
Memory[Memory]
196+
end
197+
198+
LLM <-.-> Retrieval
199+
LLM <-.-> Tools
200+
LLM <-.-> Memory
201+
202+
style In fill:#ffb3ba,stroke-width:0px
203+
style Out fill:#ffb3ba,stroke-width:0px
204+
style LLM fill:#baffc9,stroke-width:0px
205+
style Retrieval fill:#ccccff,stroke-width:0px
206+
style Tools fill:#ccccff,stroke-width:0px
207+
style Memory fill:#ccccff,stroke-width:0px
208+
style ALLM fill:#fff,stroke:#000,stroke-width:1px,stroke-dasharray: 2 2
209+
```
190210

191211
**Example** (see [examples/patterns/augmented_llm.py](examples/patterns/augmented_llm.py) for a runnable example):
192212

@@ -212,9 +232,19 @@ assistant = AgentSpec("assistant", new(Assistant))
212232

213233
**Chaining** decomposes a task into a sequence of steps, where each agent processes the output of the previous one.
214234

215-
<p align="center">
216-
<img src="assets/patterns-chaining.png">
217-
</p>
235+
```mermaid
236+
flowchart LR
237+
In([In]) --> Agent1[Agent 1]
238+
Agent1 --> |Out1| Agent2[Agent 2]
239+
Agent2 --> |Out2| Agent3[Agent 3]
240+
Agent3 --> Out([Out])
241+
242+
style In fill:#ffb3ba,stroke-width:0px
243+
style Out fill:#ffb3ba,stroke-width:0px
244+
style Agent1 fill:#baffc9,stroke-width:0px
245+
style Agent2 fill:#baffc9,stroke-width:0px
246+
style Agent3 fill:#baffc9,stroke-width:0px
247+
```
218248

219249
**When to use this workflow:** This workflow is ideal for situations where the task can be easily and cleanly decomposed into fixed subtasks. The main goal is to trade off latency for higher accuracy, by making each agent an easier task.
220250

@@ -295,9 +325,25 @@ chain = AgentSpec(
295325

296326
**Parallelization** distributes independent subtasks across multiple agents for concurrent processing.
297327

298-
<p align="center">
299-
<img src="assets/patterns-parallelization.png">
300-
</p>
328+
```mermaid
329+
flowchart LR
330+
In([In]) --> Agent1[Agent 1]
331+
In --> Agent2[Agent 2]
332+
In --> Agent3[Agent 3]
333+
334+
Agent1 --> Aggregator[Aggregator]
335+
Agent2 --> Aggregator
336+
Agent3 --> Aggregator
337+
338+
Aggregator --> Out([Out])
339+
340+
style In fill:#ffb3ba,stroke-width:0px
341+
style Out fill:#ffb3ba,stroke-width:0px
342+
style Agent1 fill:#baffc9,stroke-width:0px
343+
style Agent2 fill:#baffc9,stroke-width:0px
344+
style Agent3 fill:#baffc9,stroke-width:0px
345+
style Aggregator fill:#ccccff,stroke-width:0px
346+
```
301347

302348
**When to use this workflow:** Parallelization is effective when the divided subtasks can be parallelized for speed, or when multiple perspectives or attempts are needed for higher confidence results.
303349

@@ -385,22 +431,36 @@ parallel = AgentSpec(
385431

386432
**Triaging** classifies an input and directs it to a specialized followup agent. This workflow allows for separation of concerns, and building more specialized agents.
387433

388-
<p align="center">
389-
<img src="assets/patterns-triaging.png">
390-
</p>
434+
```mermaid
435+
flowchart LR
436+
In([In]) --> Triage[Triage]
437+
Triage --> Agent1[Agent 1]
438+
Triage -.-> Agent2[Agent 2]
439+
Triage -.-> Agent3[Agent 3]
440+
Agent1 --> Out([Out])
441+
Agent2 -.-> Out
442+
Agent3 -.-> Out
443+
444+
style In fill:#ffb3ba,stroke-width:0px
445+
style Out fill:#ffb3ba,stroke-width:0px
446+
style Triage fill:#baffc9,stroke-width:0px
447+
style Agent1 fill:#baffc9,stroke-width:0px
448+
style Agent2 fill:#baffc9,stroke-width:0px
449+
style Agent3 fill:#baffc9,stroke-width:0px
450+
```
391451

392452
**When to use this workflow:** This workflow works well for complex tasks where there are distinct categories that are better handled separately, and where classification can be handled accurately, either by an LLM (using Prompting or Function-calling) or a more traditional classification model/algorithm.
393453

394454
**Example** (see [examples/patterns/triaging.py](examples/patterns/triaging.py) for a runnable example):
395455

396456
```python
397-
from coagent.agents import ChatAgent, DynamicTriage, Model
457+
from coagent.agents import ChatAgent, Triage, Model
398458
from coagent.core import AgentSpec, new
399459

400460
model = Model(...)
401461

402462
billing = AgentSpec(
403-
"team.billing", # Under the team namespace
463+
"billing",
404464
new(
405465
ChatAgent,
406466
system="""\
@@ -418,7 +478,7 @@ Keep responses professional but friendly.\
418478
)
419479

420480
account = AgentSpec(
421-
"team.account", # Under the team namespace
481+
"account",
422482
new(
423483
ChatAgent,
424484
system="""\
@@ -438,10 +498,10 @@ Maintain a serious, security-focused tone.\
438498
triage = AgentSpec(
439499
"triage",
440500
new(
441-
DynamicTriage,
501+
Triage,
442502
system="""You are a triage agent who will delegate to sub-agents based on the conversation content.""",
443503
model=model,
444-
namespace="team", # Collect all sub-agents under the team namespace
504+
static_agents=["billing", "account"],
445505
),
446506
)
447507
```

assets/patterns-augmented-llm.png

-46.9 KB
Binary file not shown.

assets/patterns-chaining.png

-30.2 KB
Binary file not shown.
-70.1 KB
Binary file not shown.

assets/patterns-triaging.png

-65.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)