Skip to main content
Nexus includes helper methods to inspect stored events after they are persisted.

Fetch events

You can pass a specific trace_id:
This prints a terminal tree grouped by parent_run_id relationships and colorized by event category.

Build tree data programmatically

Use this when you want custom rendering or downstream processing.

Get an LLM-friendly tree string

This returns a structured text representation designed for agent or LLM consumption.

Notes

  • Tree methods rely on persisted rows in agent_logs.
  • Call flush() before tree inspection when using manual spans.