Skip to content

feat(AIC-3211): record each graph node as its own tracking event - #114

Open
jeffdupont wants to merge 2 commits into
mainfrom
jdupont/AIC-3211/per-node-graph-events
Open

jeffdupont wants to merge 2 commits into
mainfrom
jdupont/AIC-3211/per-node-graph-events

Conversation

@jeffdupont

Copy link
Copy Markdown
Contributor

Summary

  • Emit $ld:ai:graph:node when each graph node is entered, with nodeKey, a 0-based index, and metric value 1, so a traversal can be rebuilt from the events instead of splitting a concatenated path string.
  • Apply the same event to graph().invoke(), graph().stream(), and the OpenAI, Claude, and LangChain native adapters. Stop sending $ld:ai:graph:path.
  • A node that throws, and a stream abandoned after the first chunk, still record the nodes that started. The public invoke result and stream done event still omit path and nodes. Native adapters still set launchdarkly.graph.path on the graph span.

Test plan

  • pytest for the client graph, graph stream, and the three native-graph suites (127 passed)
  • mypy on the changed packages
  • Confirm $ld:ai:graph:node events show up in order for a multi-node graph invoke and stream

Made with Cursor

jeffdupont and others added 2 commits September 28, 2026 09:21
… event

The concatenated path event had to be split apart to see which nodes ran. Emitting $ld:ai:graph:node on entry lets invoke, stream, and the native adapters rebuild the traversal from the events themselves.

Co-authored-by: Cursor <cursoragent@cursor.com>
The lint job rejects the comprehension and signature lines that were left over the formatter width.
@andrewklatzke
andrewklatzke self-requested a review September 28, 2026 18:38
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.

2 participants