Usage Type
10-Second overview
Usage type is a configuration property set at API key creation. It determines how Flow execution is governed: whether the session expects explicit lifecycle control or continuous agent-driven execution.
API key (provisioning)
↓
usage_type: workflow | agent
↓
Flow session governance
- Usage type is fixed on the API key at creation and governs Flow execution behavior.
- Workflow usage favors explicit termination and optional stateless runs; agent usage favors persistent, multi-step agent-driven sessions with automatic finalization.
Two usage types
Workflow
Default. Supports explicit termination via workflowEnd. Supports stateless flag. Session lifecycle is developer-controlled.
Agent
Designed for continuous multi-step execution driven by external agents. workflowEnd is blocked. stateless is blocked. Sessions persist across calls and accumulate state. Session finalization happens automatically after approximately two hours of inactivity. The runtime injects workflowEnd, generates the Authority Report, and terminates the session safely.
Where it is set
Usage type is selected during provisioning and stored on the API key. It cannot be changed without re-provisioning. It applies only to Flow mode. For Pulse execution and session rules, see Execution Authority.
Enforcement rules
| usage_type | workflowEnd | stateless |
|---|---|---|
| workflow | allowed | allowed |
| agent | blocked | blocked |
Automatic session finalization
Agent sessions that go inactive for approximately two hours are finalized automatically by the runtime. The runtime injects workflowEnd, the Authority Report is generated, and the session is terminated. The Authority Report is stored and available for 30 days.
Related runtime documentation
How executions are admitted, validated, and executed within the runtime boundary.
External MCP execution, send_message, and how workflowEnd and stateless apply by usage type.
Session-scoped reports generated when Flow workflows terminate, including after automatic agent-session finalization.
How to install and configure Context Layer for your environment.