Summary
CortexON currently lacks a unified execution tracing mechanism across agent runs. This makes debugging, observability, and future replay difficult.
This issue proposes adding:
- A
run_id per user request
- A
step_id per agent/tool execution
- Structured logs correlated via these IDs
- Integration with Pydantic Logfire
Motivation
- Debugging multi-agent workflows
- Observability in production
- Agent behavior introspection
- Foundation for future replay & analytics
Proposed Design
TraceContext
A lightweight context object containing:
- run_id
- agent_name
- step_id
- tool_name (optional)
Logging
- Structured JSON logs
- Every log includes
run_id and step_id
- Configurable via ENV
Scope (Initial)
- Backend only
- No persistence (in-memory / logs only)
- No breaking changes
Acceptance Criteria
- Each request generates a run_id
- Each agent action generates a step_id
- Logs are structured and correlated
- Minimal performance impact
Future Work
- Trace persistence
- Frontend visualization
- Execution replay
Summary
CortexON currently lacks a unified execution tracing mechanism across agent runs. This makes debugging, observability, and future replay difficult.
This issue proposes adding:
run_idper user requeststep_idper agent/tool executionMotivation
Proposed Design
TraceContext
A lightweight context object containing:
Logging
run_idandstep_idScope (Initial)
Acceptance Criteria
Future Work