cos_metric_record
Record agent performance metrics after task completion, capturing outcome and agent type along with optional task, model, and duration details for observability.
Instructions
Record a single agent performance metric after task completion.
Args: agent_type: Type of agent (e.g. "general", "planner", "code-reviewer"). outcome: Result — one of: success, rework, partial, blocked. task_id: Task identifier (e.g. "TASK-143"). Optional. model: Model used (e.g. "sonnet", "opus"). Optional. duration_ms: Duration in milliseconds. Optional. domain: Task domain (e.g. "BACKEND", "FRONTEND", "INFRA"). Optional. complexity: Cynefin classification (e.g. "CLEAR", "COMPLICATED"). Optional.
Returns: str: JSON with inserted row id and status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| domain | No | ||
| outcome | Yes | ||
| task_id | No | ||
| agent_type | Yes | ||
| complexity | No | ||
| duration_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |