Skip to main content
A resource budget is a set of hard limits that govern how much work a Praxa mission is allowed to perform. Every CreateMissionRequest must include a resourceBudget, and the Integration Gateway enforces those limits server-side throughout the lifetime of the run. Budgets give you predictable cost, latency, and risk profiles for every mission you submit — regardless of how ambitious the agent’s reasoning might become.

Budget Parameters

The ResourceBudget type from @praxa/sdk exposes four required fields. All four must be set; there are no optional budget fields.
Each field has a server-side minimum enforced by the gateway (e.g. maximumSteps must be at least 1). The gateway may also apply tenant-level ceilings that are lower than what you specify — see your gateway configuration for authoritative limits.

Example Budget

The following budget is a reasonable starting point for a moderately complex research or summarisation task:
This budget allows the agent up to 12 reasoning steps, 8 tool calls, 2 minutes of wall time, and 2 concurrent branches. Adjust values based on the complexity and latency requirements of your specific workload.

What Happens When a Budget Is Exceeded

If the agent hits any budget limit before the mission reaches a natural end, the Integration Gateway transitions the mission to the failed status with a budget-exceeded reason recorded in the mission projection and its trace. The specific limit that was breached (steps, tool calls, elapsed time, or parallelism) is reflected in the failure detail so you can diagnose and tune your budget for the next attempt.
Budget enforcement is not a penalty — it is a safety boundary. Any work the agent completed before the limit was reached is preserved in the mission’s step history and trace, so partial results are not lost.

Tuning Your Budget

Different workloads call for different budget shapes. Use the following guidance as a starting point and refine values based on observed mission traces from your own data. Quick, focused tasks — e.g. classifying a single document, answering a narrow factual question, or formatting a structured output:
Multi-step research or synthesis — e.g. surveying multiple data sources, comparing options, and producing a written report:
Long-running automation — e.g. processing a backlog of items, running a nightly workflow, or iterating over a large dataset:
When a mission repeatedly fails with budget-exceeded errors, increase the specific dimension that is being exhausted — for example, raise maximumElapsedMs if the agent is running out of time while still within its step count. When a mission succeeds but finishes well under all limits, you can safely reduce the budget to tighten your cost and risk envelope.
Start with conservative budgets and increase them based on observed mission traces. The trace returned by client.getTrace(traceId) shows exactly how many steps and tool calls a completed mission consumed, giving you a precise baseline for calibrating future budgets.