agents._infra-cost-sync.persist ​
Sum persisted AgentInfraCostEntry rows and update AgentSession infra_cost_usd
Update AgentSession.infra_cost_usd from persisted AgentInfraCostEntry rows.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-agents |
| Version | 1.0 |
Triggers ​
| Source | Endpoint / Event | Description |
|---|---|---|
| INTERNAL | dag.step | Internal step — invoked by the agents.infra-cost-sync DAG |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_uuid | string | No | — | DAG-stamped parent run id (auto-injected by the engine) |
workflow_run_id | string | No | — | — |
organization_uuid | string | Yes | — | — |
sessions | list | No | — | — |
aws_costs_fetched | integer | No | — | — |
gcp_costs_fetched | integer | No | — | — |
do_costs_fetched | integer | 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 | — | — |
sessions_updated | json | No | — | — |
total_infra_costs_persisted | json | No | — | — |
delivery_costs_recorded | json | No | — | — |
delivery_costs_failed | json | No | — | — |
workflow_run_uuid | json | No | — | — |
workflow_run_id | string | No | — | — |
organization_uuid | json | No | — | — |
sessions | json | No | — | — |
aws_costs_fetched | json | No | — | — |
gcp_costs_fetched | json | No | — | — |
do_costs_fetched | 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._infra-cost-sync.persist",
"initial_data": {
"organization_uuid": "value"
}
}