Skip to content

Project the agent graph and per-agent traces #21

Description

@Dillpickleschmidt

Part of #1

Question

Derive mindwalk's AgentGraph and per-lens Trace server-side from T3's event store, and serve them as the analogues of mindwalk's getSessionAgents / getAgentTrace.

Decided in Close the agent-lenses data gap; this ticket builds it.

The graph is built from launch items alone. Every collab_agent_tool_call in the thread becomes an AgentNode, whether or not its interior is attributed:

  • label / role / instructionPreview from the launch item's persisted data — raw subagent_type and description, not the pre-baked "type: label" summary string. The full data is available server-side; the whitelist only applies at the wire.
  • launchSeq from sequence; launchCallId is the parent id; depth and parentId fall out of the recursive edge (a launch item may itself carry a parentToolCallId).
  • traceAvailability: available when attributed children exist, missing for a Claude thread recorded before the edge shipped, unavailable for a provider with no linkage.
  • linkQuality is exact by construction — mindwalk grades uncertainty it has because it reverse-engineers files; we are handed the id.

A lens trace is the main-trace projection restricted to items whose parentToolCallId chain roots at that launch — same Event shape, same Stats, same code path as Project T3's activity stream onto mindwalk's Trace model.

Cursor and Grok need no special case: zero launch items → stats.subagents is 0 → mindwalk's own stats.subagents > 0 guard hides the HUD button and the panel shows only Main.

Decide here: endpoint shape and whether the graph is computed on demand or cached — the same invalidation question the trace projection faces, and it should be answered the same way.

Not in scope: the AgentsPanel UI port itself, which rides with the rest of mindwalk's ui/ restyle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions