Skip to content

feat(cookbooks): add live LangGraph e2e recipe through openinference adapter - #4

Merged
lostmartian merged 1 commit into
mainfrom
feat/langgraph-e2e-cookbook
Aug 22, 2026
Merged

lostmartian merged 1 commit into
mainfrom
feat/langgraph-e2e-cookbook

Conversation

@lostmartian

Copy link
Copy Markdown
Collaborator

What

Adds cookbooks/live_langgraph.py: a live, end-to-end LangGraph example. It builds a real ReAct agent (create_react_agent + gpt-4o-mini), instruments it with openinference-instrumentation-langchain, exports genuine OTel spans in-memory, and diffs two real graph executions through the existing openinference adapter — no manual trace reshaping.

Why

Roadmap item J3 — context/ROADMAP.md WS-J: "Real end-to-end examples (LangGraph / CrewAI traces)". LangGraph is the most-adopted agent framework; this proves AgentDiff ingests its telemetry natively and gates regressions on real graph output (verified live).

How

  • Baseline run: single efficient DB lookup. Candidate run: same task across NY/CA/TX → extra tool iterations.
  • Spans sorted chronologically before projection; AGENT/CHAIN → routing, LLM → llm_call, TOOL → tool_call.
  • Live verification (2026-08-22): candidate showed TDI 0.118, 2 loop flags (node-level + tool-level), token delta +99.54%, gate correctly BLOCKED.
  • Also updates cookbooks/README.md table + run commands and adds a CHANGELOG [Unreleased] entry.

Testing

  • Ran the recipe live against the real API: gate blocked as designed (output recorded in context/LIVE-VERIFICATION.md)
  • make lint -> pass; uv run python -m pytest -> 205 passed

Checklist

  • Exactly one logical change in this PR
  • make lint passes
  • uv run python -m pytest is green (205 passed)
  • Docs updated if user-facing
  • CHANGELOG.md entry added under [Unreleased]
  • Conventional title: feat(cookbooks): add live LangGraph e2e recipe through openinference adapter

@lostmartian
lostmartian merged commit 35a31c4 into main Aug 22, 2026
7 checks passed
@lostmartian
lostmartian deleted the feat/langgraph-e2e-cookbook branch August 22, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant