Skip to content
Proud to collaborate with Microsoft for Startups

agents.budget-check ​

Check cumulative session cost against the budget and enforce limits

Check cumulative LLM cost for a session against its configured budget.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-agents
Version1.0

Triggers ​

SourceEndpoint / EventDescription
INTERNALinternal.invocationInternal — called by the runner agent during a session

Input Schema ​

FieldTypeRequiredDefaultDescription
session_uuidstringYes——
organization_uuidstringYes——

Output Schema ​

FieldTypeRequiredDefaultDescription
budget_usdjsonNo——
checkedjsonNo——
current_costjsonNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——
failed_at_statestringNo——
failed_layerjsonNo——
failed_stepstringNo——
failure_reasonstringNo——
pctjsonNo——
reasonjsonNo——
session_uuidjsonNo——
organization_uuidjsonNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—run—
runNoNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
initiatedrunrun—
runcompletecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "agents.budget-check",
  "initial_data": {
    "session_uuid": "value",
    "organization_uuid": "value"
  }
}