agents.metrics-tool-record ​
Append a tool call record to a session and emit a Lumen tool span
Record a single tool call within a session step.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-agents |
| Version | 1.0 |
Triggers ​
| Source | Endpoint / Event | Description |
|---|---|---|
| INTERNAL | internal.invocation | Internal — called by the runner agent to record execution metrics |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
session_uuid | string | Yes | — | — |
organization_uuid | string | No | — | — |
step_metric_uuid | string | No | — | — |
tool_name | string | Yes | — | — |
success | boolean | Yes | — | — |
latency_ms | integer | No | — | — |
error_category | string | No | — | — |
error_message | string | No | — | — |
input_size_chars | integer | No | — | — |
output_size_chars | integer | No | — | — |
tool_call_ref | string | No | — | — |
tool_source | string | No | — | — |
mcp_server_uuid | string | No | — | — |
skill_uuid | string | No | — | — |
workflow_type | string | No | — | — |
workflow_run_uuid | string | No | — | — |
round_index | integer | No | — | — |
policy_decision | string | No | — | — |
approval_uuid | string | No | — | — |
arguments_hash | string | No | — | — |
result_hash | 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 | — | — |
tool_call_uuid | json | No | — | — |
session_uuid | json | No | — | — |
organization_uuid | json | No | — | — |
step_metric_uuid | json | No | — | — |
tool_name | json | No | — | — |
success | json | No | — | — |
latency_ms | json | No | — | — |
error_category | json | No | — | — |
error_message | json | No | — | — |
input_size_chars | json | No | — | — |
output_size_chars | json | No | — | — |
tool_call_ref | json | No | — | — |
tool_source | json | No | — | — |
mcp_server_uuid | json | No | — | — |
skill_uuid | json | No | — | — |
workflow_type | json | No | — | — |
workflow_run_uuid | json | No | — | — |
round_index | json | No | — | — |
policy_decision | json | No | — | — |
approval_uuid | json | No | — | — |
arguments_hash | string | No | — | — |
result_hash | string | 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.metrics-tool-record",
"initial_data": {
"session_uuid": "value",
"tool_name": "value",
"success": true
}
}