Skip to content

Commit 026e526

Browse files
SimplyLizclaude
andcommitted
Update README with all features, docs index, and correct stats
Added to README: - Fan-Out pattern section - SSE Streaming section with server + client examples - Plugin System section with definePlugin example - Documentation index table linking all 8 docs - Fixed ANCS repo link Updated: - Project stats: 86 modules, 34 test files, 299 tests, 8 docs - Architecture diagram (already current) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c6dcb9c commit 026e526

1 file changed

Lines changed: 86 additions & 2 deletions

File tree

README.md

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Multi-agent orchestration library for TypeScript.** Budget-first. Library, not framework.
44

5-
Coordinate LLM agents through typed, composable patterns — with hard cost limits, conflict resolution, and adaptive routing. Works standalone or with [ANCS](https://github.com/swarmwire/ancs) as its memory backend.
5+
Coordinate LLM agents through typed, composable patterns — with hard cost limits, conflict resolution, and adaptive routing. Works standalone or with [ANCS](https://github.com/SimplyLiz/ancs) as its memory backend.
66

77
---
88

@@ -127,6 +127,19 @@ await runBlackboard(task, {
127127
}, providers, budget)
128128
```
129129

130+
### Fan-Out
131+
Same input, N agents, all parallel. Promise.allSettled for agents.
132+
```typescript
133+
import { runFanOut } from 'swarmwire'
134+
135+
const result = await runFanOut(task, {
136+
agents: [reviewer1, reviewer2, reviewer3],
137+
input: codeToReview,
138+
optional: true, // individual failures don't kill the batch
139+
}, providers, budget)
140+
// result.output = [output1, output2, output3]
141+
```
142+
130143
### Evolving Orchestration
131144
Adaptive agent sequencing that learns from execution traces.
132145
```typescript
@@ -358,6 +371,33 @@ console.log(explainExecution(result))
358371
// Full report: steps, cost breakdown, trace, conflicts
359372
```
360373

374+
### SSE Streaming (Web)
375+
376+
Pipe agent execution to HTTP clients via Server-Sent Events. Works with Express, Fastify, Next.js, or native http. See [docs/sse-streaming.md](./docs/sse-streaming.md) for full recipes.
377+
378+
```typescript
379+
import { sseHeaders, pipeToSSE } from 'swarmwire/transport'
380+
381+
app.get('/api/run', async (req, res) => {
382+
sseHeaders(res)
383+
const result = await pipeToSSE(swarm.stream('Analyze codebase'), res)
384+
res.end()
385+
})
386+
```
387+
388+
```javascript
389+
// Client
390+
const source = new EventSource('/api/run')
391+
source.addEventListener('step:complete', (e) => {
392+
const { agentName, costCents } = JSON.parse(e.data)
393+
console.log(`${agentName} done: ${costCents}c`)
394+
})
395+
source.addEventListener('result', (e) => {
396+
console.log('Output:', JSON.parse(e.data).output)
397+
source.close()
398+
})
399+
```
400+
361401
---
362402

363403
## MessageBoard (Inter-Agent Communication)
@@ -709,6 +749,35 @@ const agent = swarm.agent({
709749

710750
---
711751

752+
## Plugin System
753+
754+
Extend SwarmWire with third-party providers, agents, guardrails, evals, tools, and middleware. See [docs/plugins.md](./docs/plugins.md) for full guide.
755+
756+
```typescript
757+
import { Swarm, definePlugin, piiGuardrail, noHallucination } from 'swarmwire'
758+
759+
const securityPlugin = definePlugin({
760+
name: '@myco/security',
761+
version: '1.0.0',
762+
guardrails: {
763+
input: [piiGuardrail()],
764+
output: [contentFilter(['internal-only'], 'block')],
765+
},
766+
evals: [noHallucination()],
767+
middleware: {
768+
async beforeExecute(agentName, input) {
769+
console.log(`[audit] ${agentName} starting`)
770+
return input
771+
},
772+
},
773+
})
774+
775+
const swarm = new Swarm({ providers })
776+
await swarm.use(securityPlugin)
777+
```
778+
779+
---
780+
712781
## Architecture
713782

714783
```
@@ -742,7 +811,22 @@ User Code
742811

743812
## Project Stats
744813

745-
81 modules | 29 test files | 265 tests | 7 agent templates
814+
86 modules | 34 test files | 299 tests | 7 agent templates | 8 docs
815+
816+
---
817+
818+
## Documentation
819+
820+
| Guide | What it covers |
821+
|-------|---------------|
822+
| [Routing Stack](./docs/routing.md) | 5-layer cost optimization, cascade routing, semantic cache, OTEL export |
823+
| [Eval Workflow](./docs/eval-workflow.md) | Record → Replay → Eval → CI pipeline |
824+
| [SSE Streaming](./docs/sse-streaming.md) | Express, Fastify, Next.js, React recipes |
825+
| [Conflict Resolution](./docs/conflict-resolution.md) | Detection algorithms, resolution strategies |
826+
| [Persistence](./docs/persistence.md) | Checkpoint/resume, differential execution, state management |
827+
| [Adapters](./docs/adapters.md) | Claude Agent SDK, FileBoard, CognitiveVault |
828+
| [Plugins](./docs/plugins.md) | Plugin interface, middleware, publishing |
829+
| [CognitiveVault](./docs/cognitive-vault-integration.md) | CV-backed inter-agent messaging |
746830

747831
---
748832

0 commit comments

Comments
 (0)