amplifier-tool-leverage-patterns
Amplifier Tool Leverage Levels
The Pattern
Problem: You've built a workflow/automation tool on Amplifier. Different consumers want to use it different ways — an attractor pipeline wants to compose it, a web app wants to import it, an agent wants to call it as a tool, a human wants a CLI. You don't want four copies of the logic.
Approach: Pick ONE home for the logic, then expose up to four leverage levels as thin adapters over that home. Build only the levels a real consumer demands.
| Level | Surface | Consumer | What it is |
|---|---|---|---|
| L1 | .dot attractor pipelines |
Other pipelines / Resolve | One .dot per command + a shared subgraph (folder-shape), run on the loop-pipeline engine (amplifier-bundle-attractor) |
| L2 | Python lib | Other codebases | Each command an importable method; clean public API in __init__.py |
| L3 | Amplifier tool modules | Agents | bundle.md + modules/tool-<name>/ wrapping each command as an agent-callable tool |
| L4 | CLI | Humans / scripts | Thin click/argparse wrapper over the lib |
The four levels, concretely
L1 — Standalone .dot attractor pipelines. One .dot per command, plus a shared subgraph factored out via a folder-shape node. Runs on the loop-pipeline engine anywhere — including inside the Amplifier Resolve dot-graph resolver: register a <name>.dot + <name>.resolver.yaml in the resolver's pipelines/ dir. Inside the graph, parallelogram nodes shell out to the tool's CLI (deterministic steps); box nodes are full LLM agents (synthesis steps). This is the level that lets your tool compose into larger attractor flows.