AI workflow orchestration in Rust. Write your pipeline as a DOT directed graph, point it at an LLM, and run it.
Based on attractor by strongDM, reimplemented from scratch in Rust. The original attractor defined the idea of DOT-graph-driven AI pipelines; smasher takes that concept and rebuilds it with a layered crate architecture, multi-provider LLM support, and a web dashboard.
Five crates, bottom to top:
| Crate | What it does |
|---|---|
smasher-llm |
Talks to OpenAI, Anthropic, and Gemini through one client. Handles streaming, retries, the usual. |
smasher-agent |
Agent loop with tools (read, write, edit, shell, grep, glob). Steering rules, subagents, sandboxed execution. |
smasher-attractor |
The graph engine. Parses DOT, resolves node types from shapes, dispatches handlers, runs the pipeline. |
smasher-cli |
smasher complete, smasher chat, smasher run, smasher serve, smasher resume, smasher render, smasher ingest, smasher archive, smasher lint. |
smasher-web |
HTMX dashboard on port 21541. Live event stream, graph visualization, human Q&A. |
You need Rust 1.85+ and at least one API key.
git clone https://github.com/2389-ai/smasher.git
cd smasher
cargo build --releaseSet a provider key (any one works, or set all three):
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
export GEMINI_API_KEY=...Or drop them in a .env file at the repo root.
smasher complete "explain quicksort in three sentences"
smasher complete "explain quicksort" --json # full response objectsmasher chatThe chat REPL gives the agent all six tools (read, write, edit, shell, grep, glob), so it can work on files in the current directory.
smasher run examples/old-examples/hello-world.dot
smasher run examples/old-examples/conditional.dot --var route=yes
smasher run examples/old-examples/multi-step.dot --var model=claude-sonnet-4-20250514Pipelines are standard DOT digraphs. Node shapes tell the engine what each node does:
circle/point= startdoublecircle= exitbox/rectangle= codergen (runs an LLM agent)diamond= conditional (branches on variables)oval/ellipse= interviewer (asks a human, captures response)house= manager (human approval gate)parallelogram= parallel fan-outhexagon= toolcomponent= sub-pipeline (nested DOT file)
See examples/ for working pipelines and docs/dot-reference.md for the full spec.
smasher serve
# opens on http://127.0.0.1:21541Submit pipelines from the browser, watch events arrive over SSE, answer human gate questions through the web UI.
cargo check --workspace
cargo test --workspace # ~2,700 tests
cargo clippy --workspaceThere's a Makefile with shortcuts if you prefer that.
crates/
smasher-llm/ # LLM client, provider catalog, types
smasher-agent/ # Agent loop, tools, steering, events
smasher-attractor/ # DOT parser, graph engine, handlers
smasher-cli/ # CLI binary
smasher-web/ # Web dashboard (axum + askama + HTMX)
docs/ # Reference docs, quickstart guide
examples/ # Sample DOT pipelines
scripts/ # CI helpers
See LICENSE for details.