agents.session-infra-cost-fetch ​
Return the summed infrastructure cost for an agent session from AgentInfraCostEntry rows
Read-only: return the summed infrastructure cost for a single agent session.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-agents |
| Version | 1.0 |
Triggers ​
| Source | Endpoint / Event | Description |
|---|---|---|
| API | GET /api/agents/sessions/{session_uuid}/infra-cost | Read-only fetch of persisted infra cost for a session |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_uuid | string | No | — | DAG-stamped parent run id (auto-injected by the engine) |
session_uuid | string | Yes | — | — |
organization_uuid | string | Yes | — | — |
provider | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
error | string | No | — | — |
error_type | string | No | — | — |
failed_at | string | No | — | — |
failed_at_state | string | No | — | — |
failed_layer | json | No | — | — |
failed_step | string | No | — | — |
failure_reason | string | No | — | — |
infra_cost_usd | json | No | — | — |
provider_breakdown | json | No | — | — |
session_uuid | json | No | — | — |
workflow_run_uuid | json | No | — | — |
organization_uuid | json | No | — | — |
provider | json | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | — |
run | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | — |
run | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "agents.session-infra-cost-fetch",
"initial_data": {
"session_uuid": "value",
"organization_uuid": "value"
}
}