effect-agents
Five hero examples of effectful AI agents built on Effect v4 (beta). Pure Effect programs; one local entrypoint per example; one Cloudflare Worker hosts all five.
Live demo: https://effect-agents.coey.dev — the same Worker that runs the gallery.
git clone https://github.com/acoyfellow/effect-agents
cd effect-agents
bun install
bun run smoke # all 5 examples green — no API key required
The gallery
| # | Example | Effect hero |
|---|---|---|
| 01 | parallel-research | concurrency + Schedule.exponential + generateObject |
| 02 | streaming-tools | Stream + Scope interruption |
| 03 | approval-gated | Tool.make({ needsApproval }) |
| 04 | typed-errors | Effect.catchTag over AiError |
| 05 | mcp-from-toolkit | McpServer.layerHttp reuses your Toolkit |
Run one against a real LLM
export OPENROUTER_API_KEY=sk-or-... # or OPENAI_API_KEY, or CLOUDFLARE_*
bun examples/01-parallel-research/agent.ts "What is LoRA?"
Docs
Organised by user need (Diátaxis):
- Tutorials — learning by doing
- How-to guides — goal-oriented recipes
- Reference — facts you look up
- Explanation — why the repo is shaped this way
- ARCHITECTURE.md — contributors' map
Versions
Pinned to [email protected] + @effect/[email protected]. v4 is beta; expect churn until 4.0.0 final.
License
MIT
No comments yet
Be the first to share your take.