@spendgraph/harness
v0.15.0
Published
Workflows: the shapes an LLM app takes, built on prompts, tools and graphs.
Maintainers
Readme
@spendgraph/harness
Workflows: the shapes an LLM app takes, built on prompts, tools and graphs.
npm install @spendgraph/harnessimport { refine } from "@spendgraph/harness";
const result = await refine({
draft: (ctx) => write(ctx.input),
judge: (draft) => grade(draft),
maxRounds: 3,
});What you get
- Seven shapes, one signature — refine, route, chain, parallel, loop, orchestrate, cascade.
- Every one of them can be watched with
streamed(), tokens and progress both. - Pause for a person and resume days later, with the store, the expiry and the idempotency yours to supply.
- Failure is a result, not an exception, so a run that fell over is still a run you can read.
Docs
| | | | --- | --- | | Overview | What a workflow is, and what they all owe you | | Choosing one | Seven shapes, and which fits | | refine | Draft, judge, revise | | route | Classify, then dispatch | | chain | Steps in sequence, with gates | | parallel | Sectioning, and voting | | orchestrate | A lead decomposes and delegates | | loop | Tools until it stops asking | | cascade | Cheap first, escalate on rejection | | Human in the loop | Pause for a person, resume days later | | Streaming a run | Tokens as they arrive |
License
Apache-2.0
