agora.observe.export

Standalone HTML report generation from the Matrix event graph.

Position: the terminal read-side sink of the observer layer — it consumes the same event stream kanban and timeline project over and writes a single self-contained HTML file. Standalone by design: it takes an event iterable + a ReportContext, so a report can be regenerated from the JSONL/event log after a run without a live Matrix connection.

Functions

render_report(context, events[, ...])

Produce a standalone HTML document summarising the project.

write_report(path, context, events[, ...])

Render the report and write it to path as UTF-8, creating parent dirs.

Classes

ReportContext

Run-level header facts for a report — identity, phase, wall-clock span, and per-model token totals — that the event stream itself doesn't carry.

class agora.observe.export.ReportContext[source]

Bases: object

Run-level header facts for a report — identity, phase, wall-clock span, and per-model token totals — that the event stream itself doesn’t carry. Supplied by the caller so render_report() stays a pure function of (context, events).

project_name: str
project_id: str
phase: str
started_at: str
ended_at: str
total_tokens: dict[str, int]
duration_seconds: float
agents: list[str]
__init__(project_name, project_id, phase, started_at, ended_at, total_tokens, duration_seconds, agents)
agora.observe.export.render_report(context, events, learnings_by_agent=None)[source]

Produce a standalone HTML document summarising the project.

agora.observe.export.write_report(path, context, events, learnings_by_agent=None)[source]

Render the report and write it to path as UTF-8, creating parent dirs. Returns the rendered HTML string. Thin IO wrapper over render_report() (the pure renderer) so callers can either write-to-disk or render-in-memory.