Skip to Content
Docs are being rebuilt — start at Introduction → How it works.
AgentsBest practicesCost-aware agent design

Cost-aware agent design

Every agent run consumes credits, and a few design choices drive most of the cost: the model you pick, how much it’s allowed to write, how big the prompt is, and how often the agent runs. Designing with cost in mind keeps quality high without surprises on the bill.

Pick the right-sized model

The model is the biggest cost lever.

  • Start with the smallest model that meets the quality bar. Move up only when a real task fails, not preemptively.
  • Reserve reasoning models for genuinely hard work. They cost more per turn; use them where step-by-step reasoning actually changes the answer.
  • Choose the model in Picking provider & model.

Cap output and trim the prompt

Output and input tokens both cost money on every turn.

  • Set a sensible max-tokens. A cap discourages rambling and bounds the cost of a single response. Tune it in Tuning parameters.
  • Keep instructions lean. A long system prompt is paid for on every message. Cut anything the model already does by default.
  • Attach only the knowledge bases the agent needs. More sources mean more retrieved tokens per turn — see Knowledge base hygiene.

Enable only the capabilities you use

Each enabled tool and capability adds surface area, latency, and chances for extra model turns.

  • Turn on a capability when the agent’s job requires it, not “just in case.”
  • Reuse behavior with a skill instead of duplicating long instructions across agents.

Watch how often it runs

A cheap agent that runs constantly can cost more than an expensive one that runs rarely.

  • For scheduled runs, pick the longest cadence that still does the job — daily instead of hourly when the data only changes daily.
  • Set an end condition on recurring jobs so they don’t run forever.

Monitor and adjust

Check workspace usage and billing regularly, and revisit the most-run agents first — that’s where small changes save the most. See Usage & Billing.