Open
Conversation
packages/ai-providers/server-ai-openai/src/ldai_openai/openai_agent_graph_runner.py
Outdated
Show resolved
Hide resolved
packages/ai-providers/server-ai-openai/src/ldai_openai/openai_agent_graph_runner.py
Show resolved
Hide resolved
226dfdf to
e57a147
Compare
886e3b7 to
a183f12
Compare
Base automatically changed from
jb/aic-1664/graph-tracking-improvements
to
main
March 26, 2026 18:51
…aphRunner Implements PR 5 — ManagedAgentGraph + create_agent_graph(): ldai: - managed_agent_graph.py: ManagedAgentGraph wrapper holding AgentGraphRunner + AIGraphTracker; exposes run(), get_agent_graph_runner(), get_tracker() - LDAIClient.create_agent_graph(key, context, tools): resolves graph via agent_graph(), delegates to RunnerFactory, returns ManagedAgentGraph - Exports ManagedAgentGraph from top-level ldai package ldai_openai: - OpenAIAgentGraphRunner(AgentGraphRunner): builds agents via reverse_traverse using the openai-agents SDK; auto-tracks path, tool calls, handoffs, latency, invocation success/failure - OpenAIRunnerFactory.create_agent_graph(graph_def, tools) -> OpenAIAgentGraphRunner ldai_langchain: - LangGraphAgentGraphRunner(AgentGraphRunner): builds a LangGraph StateGraph via traverse(); auto-tracks latency and invocation success/failure - LangChainRunnerFactory.create_agent_graph(graph_def, tools) -> LangGraphAgentGraphRunner Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n rollup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e57a147 to
be26d6d
Compare
packages/ai-providers/server-ai-langchain/src/ldai_langchain/langgraph_agent_graph_runner.py
Outdated
Show resolved
Hide resolved
packages/ai-providers/server-ai-langchain/src/ldai_langchain/langgraph_agent_graph_runner.py
Outdated
Show resolved
Hide resolved
packages/ai-providers/server-ai-openai/src/ldai_openai/openai_agent_graph_runner.py
Outdated
Show resolved
Hide resolved
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
packages/ai-providers/server-ai-langchain/src/ldai_langchain/langgraph_agent_graph_runner.py
Outdated
Show resolved
Hide resolved
packages/ai-providers/server-ai-openai/src/ldai_openai/openai_agent_graph_runner.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
packages/ai-providers/server-ai-openai/src/ldai_openai/openai_agent_graph_runner.py
Outdated
Show resolved
Hide resolved
keelerm84
approved these changes
Mar 27, 2026
| ) | ||
|
|
||
|
|
||
| class LangGraphAgentGraphRunner(AgentGraphRunner): |
Member
There was a problem hiding this comment.
This name is a little ridiuclous.
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.

feat: Add OpenAIAgentGraphRunner support
feat: Add LangGraphAgentGraphRunner support
Note
Medium Risk
Adds new agent-graph execution paths for both OpenAI Agents and LangGraph, including tool invocation and metric tracking, which could affect runtime behavior and observability. Risk is mitigated by being additive and guarded by optional dependencies (
openai-agents/langgraph) with explicit failure handling.Overview
Adds first-class managed agent graph execution via new
ManagedAgentGraphandLDAIClient.create_agent_graph(), returning a runnable wrapper around a provider-specificAgentGraphRunnerand tracking a new$ld:ai:usage:create-agent-graphevent.Introduces two new provider implementations:
OpenAIAgentGraphRunner(OpenAI Agents SDK) andLangGraphAgentGraphRunner(LangGraph), pluscreate_agent_graph()wiring inOpenAIRunnerFactoryandLangChainRunnerFactoryand exports in each provider package. Both runners execute anAgentGraphDefinition, integrate tool registries, and record graph/node metrics (path, latency, success/failure, token usage; plus handoff/tool-call tracking for OpenAI).Written by Cursor Bugbot for commit f1836a4. This will update automatically on new commits. Configure here.