Skip to content
Proud to collaborate with Microsoft for Startups

agents._infra-cost-sync.resolve-sessions ​

Resolve completed billable agent sessions for the requested date range

Find completed AgentSession rows for the org within the requested date range.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-agents
Version1.0

Triggers ​

SourceEndpoint / EventDescription
INTERNALdag.stepInternal step — invoked by the agents.infra-cost-sync DAG

Input Schema ​

FieldTypeRequiredDefaultDescription
workflow_run_uuidstringNo—DAG-stamped parent run id (auto-injected by the engine)
workflow_run_idstringNo——
organization_uuidstringYes——
session_uuidstringNo——
date_fromstringNo——
date_tostringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
date_fromjsonNo——
date_tojsonNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——
failed_at_statestringNo——
failed_layerjsonNo——
failed_stepstringNo——
failure_reasonstringNo——
sessionsjsonNo——
session_uuidjsonNo——
total_sessionsjsonNo——
workflow_run_uuidjsonNo——
workflow_run_idstringNo——
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._infra-cost-sync.resolve-sessions",
  "initial_data": {
    "organization_uuid": "value"
  }
}