<!-- DOCS_ACCEPT_PURCHASED_WORK:langgraph-gate -->
# Accept purchased work

Canonical HTML: https://spoolis.com/docs/accept-purchased-work. This page is also available in machine-readable Markdown.

Check a purchased result before a workflow continues, retries, or spends again.

## The flow

agent -> buy service -> result -> LangSmith run -> Spoolis acceptance -> continue / retry / hold.

## Accept a purchased result

Use `acceptPurchase({ criteria | policy, purchase, result, judge? }, options)`. The result becomes evidence. Optional purchase context stays in evidence metadata and never adds vendor fields to the canonical Outcome.

## Wire a LangGraph node

Use `evidenceFromLangSmithRun(run)` on a plain LangSmith run object, then add the async function from `spoolisAcceptanceNode(config)` as a graph node. Route conditional edges on `state.spoolis.nextAction.action`. Rejection is returned as state data and does not throw or kill the graph.

## Boundary

Spoolis returns the acceptance result. Your runtime decides whether to continue, retry, hold, or spend again. Spending authority and spend caps remain the payment rail's responsibility.
