Reporting and analytics for task-graph-mcp - generate progress reports, analyze metrics, track costs and velocity across projects
Generate progress reports, analyze metrics, track costs and velocity across task-graph projects.
Prerequisite: Understand task-graph-basics for tool reference.
# Connect (reporting doesn't need special tags)
connect(name="reporter", tags=["reporting"])
ā agent_id
# Get project overview
list_tasks(format="markdown")
# Analyze specific task tree
get(task=root_task_id, children=true, format="markdown")
# Check agent activity
list_agents(format="markdown")
Quick overview of project state:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā STATUS REPORT ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Query: list_tasks(format="markdown") ā
ā ā
ā Metrics to extract: ā
ā ⢠Total tasks by status ā
ā ⢠Blocked tasks and blockers ā
ā ⢠Active agents and their tasks ā
ā ⢠Ready tasks (available work) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Track completion over time:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā PROGRESS REPORT ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Queries: ā
ā ⢠list_tasks(status="completed") ā
ā ⢠list_tasks(status="working") ā
ā ⢠list_tasks(status="pending") ā
ā ā
ā Calculate: ā
ā ⢠Completion rate (completed/total) ā
ā ⢠Points completed vs remaining ā
ā ⢠Time actual vs estimated ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Analyze resource consumption:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā COST REPORT ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Query: get(task=root, children=true) ā
ā ā
ā Aggregate across tasks: ā
ā ⢠tokens_in, tokens_out, tokens_cached ā
ā ⢠tokens_thinking, tokens_image/audio ā
ā ⢠cost_usd total and per-task ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Measure team throughput:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā VELOCITY REPORT ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Queries: ā
ā ⢠list_tasks(status="completed") ā
ā ⢠get_state_history(task=task_id) ā
ā ā
ā Calculate: ā
ā ⢠Points completed per time period ā
ā ⢠Average time per point ā
ā ⢠Agent productivity comparison ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Analyze agent activity:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā AGENT REPORT ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Query: list_agents(format="markdown") ā
ā ā
ā Per agent: ā
ā ⢠Current claims ā
ā ⢠Tasks completed ā
ā ⢠Time since last heartbeat ā
ā ⢠Tags (capabilities) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
| Field | Type | Description |
|---|---|---|
status |
string | Current state |
priority |
string | low/medium/high/critical |
points |
int | Story points estimate |
time_estimate_ms |
int | Estimated duration |
time_actual_ms |
int | Actual duration (auto-tracked) |
started_at |
timestamp | When work began |
completed_at |
timestamp | When finished |
| Field | Type | Description |
|---|---|---|
tokens_in |
int | Input tokens |
tokens_out |
int | Output tokens |
tokens_cached |
int | Cache hit tokens |
tokens_thinking |
int | Reasoning tokens |
tokens_image |
int | Image tokens |
tokens_audio |
int | Audio tokens |
cost_usd |
float | Total USD cost |
| Field | Type | Description |
|---|---|---|
registered_at |
timestamp | When connected |
last_heartbeat |
timestamp | Last activity |
tags |
array | Capabilities |
max_claims |
int | Claim limit (not enforced) |
# All completed
list_tasks(status="completed")
# Multiple statuses
list_tasks(status=["pending", "working"])
# Only ready (unclaimed, unblocked)
list_tasks(ready=true)
# Only blocked
list_tasks(blocked=true)
# Root tasks only
list_tasks(parent="null")
# Children of specific task
list_tasks(parent=task_id)
# Full tree
get(task=root_id, children=true)
# Specific agent's tasks
list_tasks(owner=agent_id)
# Unclaimed only
list_tasks(owner="null", status="pending")
# Get state transitions for a task
get_state_history(task=task_id)
# Returns:
# - Each state entered and exited
# - Duration in each state
# - Agent who made transitions
# Project Status: {project_name}
Generated: {timestamp}
## Overview
- **Total Tasks:** {total}
- **Completed:** {completed} ({percent}%)
- **In Progress:** {working}
- **Blocked:** {blocked}
## Velocity
- **Points Completed:** {points_done} / {points_total}
- **Avg Time per Point:** {avg_time}
## Cost
- **Total Cost:** ${total_cost}
- **Cost per Point:** ${cost_per_point}
## Active Agents
| Agent | Tasks | Last Active |
|-------|-------|-------------|
{agent_rows}
## Blockers
{blocked_tasks_list}
# Query completed tasks over time
# Plot: remaining points vs time
Day 1: {total_points}
Day 2: {total_points - completed_day_2}
Day 3: {total_points - completed_day_3}
...
# Cost Report: {project_name}
## By Task
| Task | Tokens In | Tokens Out | Cost |
|------|-----------|------------|------|
{task_rows}
## By Agent
| Agent | Tasks Done | Total Cost |
|-------|------------|------------|
{agent_rows}
## Totals
- **Total Tokens:** {sum_tokens}
- **Total Cost:** ${sum_cost}
1. list_tasks(blocked=true)
2. For each blocked task, identify blocker
3. Group by blocker ā find most-blocking tasks
4. Priority = blocked_count Ć blocked_priority
1. list_tasks(status="completed")
2. For each: accuracy = time_actual / time_estimate
3. Calculate mean, median, std deviation
4. Flag tasks with accuracy < 0.5 or > 2.0
1. list_agents()
2. For each agent:
- Current claims = active work count
- Time since last_heartbeat = idle_time
3. Flag: utilization 0 or idle_time > threshold
# 1. Connect
connect(name="reporter") ā agent_id
# 2. Gather data
tasks = list_tasks(format="markdown")
agents = list_agents(format="markdown")
# 3. For cost data, traverse tree
root = get(task=root_id, children=true)
# 4. Aggregate and format
# (Calculate totals, percentages, etc.)
# Store report as attachment on root task
attach(
task=root_id,
name="weekly-report",
content=report_markdown,
mime="text/markdown"
)
| Report Type | Frequency |
|---|---|
| Status | On demand, start of meetings |
| Progress | Daily or per-sprint |
| Cost | Weekly or per-milestone |
| Velocity | Per sprint/iteration |
| Agent | When debugging issues |
| Skill | When to Use |
|---|---|
task-graph-basics |
Tool reference, task trees, query patterns |
task-graph-repair |
Fix data issues before reporting |