Use Cases + Implementation

How do you reduce the cost of workflow automation with model routing?

Workflow automation should pay for judgement only. Keep deterministic steps — formatting, validation, routing on explicit rules — in code, and send only ambiguous decisions to models on cheap tiers, escalating exceptions to stronger ones. Cap retries per run, cache stable context, and measure cost per completed run rather than per model call.

Key facts

Router modelplugsky-fusion escalates per decision across tiers (live)
JSON modeLive for structured decisions and field extraction
Function callingLive for workflow actions with strict schemas
Models30+ models; routing and classification on cheap tiers, exceptions escalated
Retry controlCap attempts per step in your orchestrator
PricingFlat monthly self-serve plans with no per-token charges on self-serve
Free tierplugsky-micro and plugsky-lite on the free plan, no card required
RoadmapThe batch endpoint is coming soon for offline workflow steps

TL;DR

  • Only judgement steps deserve model calls; everything else is code.
  • Route decisions cheap and escalate exceptions, not whole workflows.
  • Cap retries per step; a third attempt rarely succeeds.
  • Cache stable context so runs do not re-pay for unchanged data.
  • Measure cost per completed run, including exceptions.

How it works, step by step

  1. Map the workflow and mark each step as deterministic or judgement-based.
  2. Keep deterministic steps in code and expose only real decisions to models.
  3. Define JSON schemas for decisions and validate before executing anything.
  4. Route routine decisions to cheap tiers and exceptions to strong models.
  5. Cap retry attempts per step and escalate after the second failure.
  6. Cache stable inputs and reference data for the run instead of resending them.
  7. Track cost per completed run, exception rate and human intervention rate.
1Map the workflowand mark each stepas deterministic or2Keep deterministicsteps in code andexpose only real3Define JSON schemasfor decisions andvalidate before4Route routinedecisions to cheaptiers and5Cap retry attemptsper step andescalate after the6Cache stable inputsand reference datafor the run instead

Try it yourself

Open the automation savings calculator →

Not every step needs a model

The most common source of automation overspend is calling a model where code would do. Formatting a date, validating an account code, applying a threshold rule, merging documents — all deterministic, all cheaper and more reliable in code. Models earn their place only where ambiguity exists: classifying an unstructured request, choosing between policies, drafting a message, resolving an exception.

Write the boundary down before building. A workflow that sends every step through a model is slower, less predictable and more expensive than one that uses models sparingly and deliberately.

Routing inside the workflow

For the steps that do need judgement, route by stakes and ambiguity:

  • Cheap tier: classification, extraction, normalisation, templated drafting.
  • Mid tier: multi-field decisions and summarisation of case context.
  • Strong tier: exception handling, policy interpretation and anything that triggers irreversible actions.
  • Human gate: decisions above risk thresholds, always.

Validate every decision against a schema and your own business rules before executing. The model proposes; the workflow authorises.

Retries, caching and measurement

Retries are where automation budgets leak. A step that fails twice on the same input usually fails a third time; the right response is to change the tier, change the context or hand off to a human. Cap attempts per step in the orchestrator and log every failure with its input so patterns emerge.

Cache stable context — reference data, templates, customer records — for the duration of a run, and never resend data that did not change. Measure cost per completed run including exceptions and human interventions, plus exception rate by step. Those two numbers tell you where routing policy or prompts need work. Start on the free plan with plugsky-micro and plugsky-lite, then evaluate strong models for exception steps during the 14-day full-access trial; plans are on the live pricing page.

Honest comparison

Workflow choiceRouted automationModel on every stepRules-only automation
Deterministic stepsCode, no model costFrontier price for arithmeticCode
Ambiguous decisionsCheap tier, validatedExpensive and unchangedManual handling
ExceptionsEscalated by ruleSame tier as routineBreaks the flow
RetriesCapped, then escalateOften unboundedNot applicable
EvidenceCost per completed runCost per callCost per run, no model spend

Frequently asked questions

Which workflow steps should use a model?

Only judgement steps: classifying unstructured input, choosing between policies, drafting messages or resolving exceptions. Everything deterministic belongs in code, where it is cheaper and more reliable.

Should every workflow decision use a strong model?

No. Classification and extraction run well on cheap tiers. Escalate exception handling and policy interpretation, and gate irreversible actions behind approval regardless of tier.

How do I limit retries?

Cap attempts per step, log failures with inputs, and escalate to a higher tier or a human after the second failure. Repeated identical attempts rarely succeed and always cost.

Can I cache workflow context?

Yes. Cache reference data, templates and records for the duration of a run, and resend nothing that has not changed. Stable context should never be paid for twice.

How do I validate model decisions?

Define a JSON schema for each decision point and validate types, enums and required fields before execution. Reject unknown actions and route them to review.

Is the batch endpoint available for offline steps?

Not yet — the batch endpoint is coming soon. Run offline steps with bounded-concurrency workers and a durable queue today.

What metric shows automation health?

Cost per completed run and exception rate by step. Rising exceptions with flat completion points to prompt, context or routing problems.

Can I build the first workflow for free?

Yes. plugsky-micro and plugsky-lite are on the free plan with no card, and the 14-day full-access trial covers strong models for exception handling.