Add comprehensive tracing and evaluation system with reproducible runs and golden task harness#11
Open
Add comprehensive tracing and evaluation system with reproducible runs and golden task harness#11
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: hoangsonww <124531104+hoangsonww@users.noreply.github.com>
…ner, scorer, and pytest integration Co-authored-by: hoangsonww <124531104+hoangsonww@users.noreply.github.com>
…prehensive documentation Co-authored-by: hoangsonww <124531104+hoangsonww@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Tracing + Evals: Reproducible Runs, LangGraph Traces, and Golden-Task Harness
Add comprehensive tracing and evaluation system with reproducible runs and golden task harness
Sep 9, 2025
hoangsonww
approved these changes
Sep 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a complete observability and evaluation framework that makes every agent run traceable, reproducible, and measurable. The implementation addresses the need for debugging LangGraph behavior, catching regressions, and comparing model/provider performance.
Key Features
🔍 Tracing System
data/traces/{chat_id}/{run_id}.jsonlformat🔄 Reproducible Runs
--executeflag✅ Golden Task Evaluation
Usage Examples
Implementation Details
The system is built with four core components:
src/agentic_ai/infra/trace.py): Context manager with JSONL writer, hooks into LangGraph nodessrc/agentic_ai/infra/replay.py): Mock tool execution from recorded responsesevals/): YAML task definitions, runner, scorer with comprehensive assertionssrc/agentic_ai/cli.py): Commands for chat, tracing, replay, and comparisonExample trace output:
{"event_type": "node_start", "timestamp": 1694123456.790, "node_name": "planner", "data": {"input": {"user_message": "Hello"}}} {"event_type": "tool_request", "timestamp": 1694123456.850, "node_name": "tools", "data": {"tool_name": "calculator", "args": {"expression": "2+2"}, "args_hash": "abc12345"}} {"event_type": "tool_response", "timestamp": 1694123456.920, "node_name": "tools", "data": {"tool_name": "calculator", "result": "4"}, "duration_ms": 70}Security & Privacy
ENABLE_TRACING=falseby default)The system provides complete observability for debugging agent behavior, reproducible evaluation for catching regressions, and measurable quality metrics through golden tasks - enabling faster development and more reliable AI agents.
Fixes #10.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
us.i.posthog.compython -m agentic_ai.cli chat Hello, tell me about AI --trace(dns block)python -m agentic_ai.cli list-traces(dns block)python test_eval_system.py(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.