# ◆ Workflows Agent orchestration intelligence

All Sessions
Active Only
Completed
▼ Select Session to Drill In
3.2
Avg Agent Depth
▲ 0.4 this week
5.8
Avg Subagents / Session
▲ 1.2 this week
87%
Agent Success Rate
▼ 2% this week
R→E→B
Most Common Flow
Read → Edit → Bash
2.1
Avg Compactions
▲ 0.3 this week
4m 32s
Avg Session Duration
▼ 18s this week

## 1 Agent Orchestration Graph ?

Aggregate spawning patterns across all sessions · Click a node to filter page
Origin
● Session Start (142)
Main Agent
■ Main Agent (142)
Subagent Types
◆ Explore (89)
◆ code-reviewer (67)
◆ general-purpose (54)
◆ Plan (43)
◆ tdd-assistant (38)
◆ +5 more...
Nested (Depth 2+)
◆ debugger (12)
◆ security-auditor (8)
◆ compaction (23)
Outcomes
✓ Completed (298)
✗ Error (18)
⚠ Abandoned (7)
Session root
Main agent
Subagent type
High frequency
Low frequency
💡 Interactive: Nodes are clickable. Selecting a node filters Sections 2-5 to only show data involving that agent type. Edge thickness represents spawn frequency. Hover shows detailed metrics.

## 2 Tool Execution Flow ?

How tools chain together · Sankey-style directed flow
All Agents
Explore
code-reviewer
general-purpose
Read 42%
Bash 18%
Grep 14%
Glob 10%
Flow bands connect
source → target tools
Band width = transition frequency
Edit 28%
Write 22%
Bash 18%
Read 16%
Agent 10%
💡 Sankey diagram: left column = source tool, right column = next tool in sequence. Band width shows how often one tool follows another. Filterable by agent type tabs above.

## 3 Subagent Effectiveness

Performance per agent type
Explore
92%
89
Sessions
1.2m
Avg Tokens
code-reviewer
85%
67
Sessions
2.8m
Avg Tokens
general-purpose
80%
54
Sessions
3.4m
Avg Tokens
tdd-assistant
75%
38
Sessions
1.8m
Avg Tokens

## 4 Detected Workflow Patterns

Common agent orchestration sequences
🚀
Explore
→
Plan
→
code-reviewer
34x
24% of sessions
🔧
Explore
→
general-purpose
→
tdd-assistant
28x
20% of sessions
🛡
code-reviewer
→
security-auditor
19x
13% of sessions
🐞
Explore
→
debugger
→
tdd-assistant
15x
11% of sessions
📑
Solo main
→
No subagents
22x
15% of sessions
💡 Patterns detected by analyzing subagent spawn sequences within sessions. Click a pattern to highlight it in the DAG above.

## 5 Model Delegation Flow

How models route through agent hierarchies
Opus 4.6
78% of main agents
$4.82 avg cost
delegates to
62%
Sonnet 4.6
48% of subagents
$1.24 avg cost
Haiku 4.5
14% of subagents
$0.18 avg cost

## 6 Error Propagation Map

Where errors cluster in agent hierarchy depth
3
Depth 0
Main agent
11
Depth 1
Direct subagent
4
Depth 2
Nested
1
Depth 3+
Deep nested
Top error-prone types:
general-purpose (6) · tdd-assistant (5) · debugger (4)

## 7 Agent Concurrency Timeline ?

Parallel agent execution patterns · Shows how agents overlap in time
Aggregate (avg across sessions)
Selected Session
Main Agent
Explore
Plan
code-reviewer
tdd-assistant
security-auditor
compaction
0% — Start
25%
50%
75%
100% — End
Working
Error
Compaction event

## 8 Session Complexity Scatter

Duration vs agent count vs tokens · Bubble size = token usage
Agent Count ↑
Duration →
Completed
Error
Active
Abandoned

## 9 Compaction Impact Analysis

Context compression events and token recovery
47
Total Compactions
38.2M
Tokens Recovered
Session start Session end
Token growth
Compaction trigger
Post-compaction baseline

## 10 Session Drill-In ?

Select a session from the dropdown above or click a scatter dot to see its full execution graph
◆
No session selected
Select a session to see its specific agent hierarchy tree, tool call timeline, and execution flow as a horizontal node graph.
◆ Agent Tree
⚙ Tool Timeline
☰ Event Sequence
💡 When a session is selected: shows the actual horizontal agent spawn tree for that session (like the DAG above but for one session), a tool-call swim-lane timeline, and a scrollable event sequence. All three sub-views in tabs.

### ✍ Design Notes

UX Principles

- Cross-filtering: clicking nodes in DAG filters all other sections
- Progressive disclosure: aggregate by default, drill into specifics
- Consistent dark theme matching existing app (Tailwind surface levels)
- Responsive: 2-col layouts collapse to single column on narrow screens
- Tooltips on every metric for raw values and context

Technical Approach

- New `/api/workflows` endpoint with aggregation queries
- D3.js or React Flow for DAG and Sankey rendering
- WebSocket updates for real-time active session changes
- No new database tables — all derived from existing schema
- Server-side computation for patterns and aggregates