Runnable examples for context analysis harness workflows.
PYTHONPATH=src uv run context-profiler formats list --jsonA real 63-step coding agent trajectory from nebius/SWE-agent-trajectories (CC-BY-4.0). See swe_agent/README.md for details.
PYTHONPATH=src uv run context-profiler analyze examples/swe_agent/session.jsonl --format openai --html /tmp/swe-agent-report.html
PYTHONPATH=src uv run context-profiler diagnose examples/swe_agent/session.jsonl --format openai --jsonFindings: 26.9% content duplication, artifact churn on reproduce.py, monotonic context growth from 2.1K to 27.1K tokens.
PYTHONPATH=src uv run context-profiler diagnose tests/fixtures/repeated_tool_calls.json --format openai --json
PYTHONPATH=src uv run context-profiler analyze tests/fixtures/repeated_tool_calls.json --format openai --html /tmp/context-profiler-openai.htmlFindings: TOOL_USE_DOMINATES_CONTEXT, TOP_TOOL_CONTEXT_HOTSPOT, REPEATED_CONTENT_BLOCK.
A multi-step MBPP trajectory from pagarsky/agent-trace:
PYTHONPATH=src uv run context-profiler analyze examples/agent-trace/sample.json --format agent-trace --html /tmp/agent-trace-report.htmlcontext-profiler validate trace.json --format langfuse --json
context-profiler diagnose trace.json --format langfuse --json
context-profiler analyze trace.json --format langfuse --html /tmp/langfuse-report.htmlPYTHONPATH=src uv run context-profiler analyze tests/fixtures/cursor_transcript.jsonl --format cursor-jsonl --html /tmp/cursor-report.html
PYTHONPATH=src uv run context-profiler analyze tests/fixtures/claude_code_transcript.jsonl --format claude-code-jsonl --html /tmp/claude-report.htmlAnalysis is partial — transcripts may omit hidden prompts, tool definitions, and provider compaction.
For datasets not natively supported, write a conversion script in examples/<dataset>/convert.py that outputs OpenAI-format JSONL. See examples/swe_agent/convert.py as a reference.
Candidate datasets for future examples:
- T1 (CapitalOne) — multi-domain tool planning
- tau-bench (Sierra) — retail/airline agent conversations
- neulab/agent-data-collection — 18 environments, standardized format