Skip to content

Commit 9872dd3

Browse files
author
jovanSAPFIONEER
committed
docs: update README and examples/README for v3.3.5 -- demo source now live
1 parent a9eb3f4 commit 9872dd3

2 files changed

Lines changed: 36 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ That's it. No config files, no setup wizards. Add more agents, swap frameworks,
6868

6969
> The demo shows a code review swarm, but Network-AI is not a code review tool. The same orchestration pattern works for research pipelines, data processing, content moderation, customer support routing, document analysis, financial workflows — any task where multiple agents need to coordinate without stepping on each other.
7070
71-
> **Live demo source coming soon:** The full source for `04-live-swarm.ts` and `05-code-review-swarm.ts` will be added to the repo with a `.env.example` so you can run them against your own API keys. In the meantime, examples `01``03` cover all core framework features — atomic blackboard, FSM governance, parallel dispatch — with no API key or external dependency required.
71+
> **Run the demo yourself:** `05-code-review-swarm.ts` is in the repo. Copy `.env.example` to `.env`, add your `OPENAI_API_KEY`, then run `npx ts-node examples/05-code-review-swarm.ts`. Supports 4 modes: built-in code review, paste your own code, system design document, or custom role for any content type (proposals, policies, job descriptions, emails). Examples `01``03` cover all core framework features with no API key required. `04-live-swarm.ts` (live AI research swarm) is coming soon.
7272
7373
## Why This Exists -- The Multi-Agent Race Condition Problem
7474

examples/README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# network-ai · Examples
22

3-
Runnable demos that show the core features in under five minutes.
4-
All three examples work without an API key.
3+
Runnable demos that show the core features in under five minutes.
54

65
```
76
examples/
8-
01-hello-swarm.ts ← three agents passing work through a blackboard
9-
02-fsm-pipeline.ts ← FSM governance (state-based access control)
10-
03-parallel-agents.ts ← parallel agents + four synthesis strategies
7+
01-hello-swarm.ts ← three agents passing work through a blackboard (no API key)
8+
02-fsm-pipeline.ts ← FSM governance (state-based access control) (no API key)
9+
03-parallel-agents.ts ← parallel agents + four synthesis strategies (no API key)
10+
05-code-review-swarm.ts ← 5-agent AI code review swarm, 4 modes (OPENAI_API_KEY required)
1111
```
1212

13+
Examples `01``03` run without any API key. `05` calls the OpenAI API — copy `.env.example` to `.env` and add your key before running it.
14+
1315
## Prerequisites
1416

1517
```bash
@@ -79,10 +81,38 @@ npx ts-node examples/03-parallel-agents.ts
7981
npx ts-node examples/01-hello-swarm.ts
8082
npx ts-node examples/02-fsm-pipeline.ts
8183
npx ts-node examples/03-parallel-agents.ts
84+
85+
# 05 requires OPENAI_API_KEY in .env
86+
npx ts-node examples/05-code-review-swarm.ts
8287
```
8388

8489
---
8590

91+
## 05 · Code Review Swarm
92+
93+
A 5-agent swarm (Security, Performance, Reliability, Testing, Architecture) reviews code or documents in parallel, then a coordinator synthesizes the findings and a fixer agent applies them. Requires `OPENAI_API_KEY`.
94+
95+
```bash
96+
# Setup (one time)
97+
cp .env.example .env # then add your key inside .env
98+
99+
# Run
100+
npx ts-node examples/05-code-review-swarm.ts
101+
```
102+
103+
**4 modes at launch:**
104+
105+
| Mode | Prompt | Output |
106+
|------|--------|--------|
107+
| `[1]` Built-in | Reviews the bundled `auth-service.ts` | Fixed `.ts` file |
108+
| `[2]` Paste code | Paste your own source (ends with `end`) | Fixed `.ts` file |
109+
| `[3]` System design | Paste a design/architecture doc | Revised `.md` file |
110+
| `[4]` Custom role | Define your own reviewers for any content | Revised `.md` file |
111+
112+
Output files are saved to `examples/output/`. See the [YouTube demo](https://youtu.be/UyMsNhaw9lU) for a walkthrough.
113+
114+
---
115+
86116
## Next steps
87117

88118
| Goal | Starting point |

0 commit comments

Comments
 (0)