Summary
A standalone Tkinter log viewer (zero dependencies, same as OpenLoop) for browsing OpenLoop run logs by individual agent-run sections instead of scrolling through one monolithic file.
The current single-file log (openloop-run-*.log) concatenates all agent output sequentially with banner separators, making it easy to lose your place when scrolling through long runs. This tool solves that by parsing the log into discrete, navigable sections.
Log Format Improvements
The existing banner format already contains all metadata needed to build a table of contents:
`
2026-07-24 00:16:26 | Agent: amala | Phase: loop | Iteration: 1 | Run ID: 20260723-220937Z-b79523
`
To make parsing unambiguous, the engine should additionally emit machine-readable markers:
##! BEGIN_AGENT_RUN agent="amala" phase="loop" iteration=1 run_id="20260723-220937Z-b79523" ... ##! END_AGENT_RUN
Sections:
| Section |
Content |
| HEAD |
Everything before the first agent run (engine startup, config load, [OpenLoop] messages) |
| Agent Run |
Full stdout/stderr + [OpenLoop] State updated within one run |
| TAIL |
Everything after the last END_AGENT_RUN (shutdown messages) |
Proposed UI (Tkinter)
The window is split into two panes via ttk.PanedWindow:
- Left sidebar: A tk.Treeview showing the TOC hierarchy.
- Right pane: A read-only Text widget showing only the selected section.
- "All" checkbox: When checked, shows the entire log file as a single continuous document.
- Sash: Resizable split.
TOC Hierarchy
HEAD Phase: preparation +- Agent: prepper1 +- Agent: prepper2 Phase: loop +- Iteration 1 | +- Agent: amala | +- Agent: vera +- Iteration 2 | +- Agent: amala | +- Agent: vera +- ... Phase: finalization +- Agent: final1 +- Agent: final2 TAIL
Preparation and finalization phases list each agent directly (no iteration nesting). The loop phase groups agents under iterations.
Name
Suggestion: LoopLog (short, descriptive). Alternative: TraceLoop, OpenLoog (playful). Open to discussion.
Future Considerations (not required for MVP)
- Tail mode: Live-update the viewer while a workflow is running (poll log file for changes).
- Bookmarks/Annotations: Sidecar .looplog.json storing bookmarks, notes, and tags keyed by (run_id, phase, iteration, agent_name).
- CLI mode: Terminal-based viewer with the same section parsing.
- Per-run export: Extract a single agent run as plain text.
Files Involved
- New: ools/looplog.py -- standalone Tkinter viewer (no new dependencies).
- Modified: core/engine.py -- add ##! marker emission to _write_banner() and around agent execution in _execute_agent().
Questions for Review
- Should the viewer also be callable as a CLI tool (python tools/looplog.py ), or is GUI-only sufficient for MVP?
- Tail mode -- poll on a timer or use file change notification (latter adds a dependency)?
- Is (run_id, phase, iteration, agent_name) a sufficient composite key for a potential annotation sidecar?
Summary
A standalone Tkinter log viewer (zero dependencies, same as OpenLoop) for browsing OpenLoop run logs by individual agent-run sections instead of scrolling through one monolithic file.
The current single-file log (openloop-run-*.log) concatenates all agent output sequentially with banner separators, making it easy to lose your place when scrolling through long runs. This tool solves that by parsing the log into discrete, navigable sections.
Log Format Improvements
The existing banner format already contains all metadata needed to build a table of contents:
`
2026-07-24 00:16:26 | Agent: amala | Phase: loop | Iteration: 1 | Run ID: 20260723-220937Z-b79523
`
To make parsing unambiguous, the engine should additionally emit machine-readable markers:
##! BEGIN_AGENT_RUN agent="amala" phase="loop" iteration=1 run_id="20260723-220937Z-b79523" ... ##! END_AGENT_RUNSections:
Proposed UI (Tkinter)
The window is split into two panes via ttk.PanedWindow:
TOC Hierarchy
HEAD Phase: preparation +- Agent: prepper1 +- Agent: prepper2 Phase: loop +- Iteration 1 | +- Agent: amala | +- Agent: vera +- Iteration 2 | +- Agent: amala | +- Agent: vera +- ... Phase: finalization +- Agent: final1 +- Agent: final2 TAILPreparation and finalization phases list each agent directly (no iteration nesting). The loop phase groups agents under iterations.
Name
Suggestion: LoopLog (short, descriptive). Alternative: TraceLoop, OpenLoog (playful). Open to discussion.
Future Considerations (not required for MVP)
Files Involved
Questions for Review