Skip to content

Graph optimization foundation with LangGraph/Graph adapter and Trace/OTEL/Sysmon backends#73

Merged
chinganc merged 19 commits into
AgentOpt:experimentalfrom
doxav:pr1-graph-optimization
Jun 10, 2026
Merged

Graph optimization foundation with LangGraph/Graph adapter and Trace/OTEL/Sysmon backends#73
chinganc merged 19 commits into
AgentOpt:experimentalfrom
doxav:pr1-graph-optimization

Conversation

@doxav

@doxav doxav commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

This PR adds an improved end-to-end approach for graph optimization in Trace, using LangGraph as the initial runtime target but aiming to be generalized to other graph structures.

Current scope:

  • adds a graph adapter/module layer for graph-like runtimes
  • supports graph optimization through three primary backends: trace, otel, and sysmon
  • allows comparing multiple trace/observer views for the same execution
  • keeps runtime outputs as normal Python objects while separating optimization-facing state
  • integrates the graph/module path with existing optimization/search mechanisms such as PrioritySearch and ModuleCandidate (to be double checked by @chinganc )
  • adds demos and tests to exercise the current design

This is still an early design base and some cleanup/refactoring is expected, but it should already be a useful basis for:

  • reviewing how graph optimization fits in the current Trace stack
  • discussing internal vs external tracing/optimization carriers
  • evaluating whether this pattern could inform a broader evolution of the current bundle approach without modifying core primitives yet

Suggested entry point for review:

  • docs/GraphOptimization.md

NO modification of core code => A clean-up/sync is required: some core files are modified just because branch is a little bit out of sync (e.g. utils.py, bundle.py...)

@doxav doxav changed the title Graph optimization foundation with LangGraph/Graoh adapter and Trace/OTEL/Sysmon backends Graph optimization foundation with LangGraph/Graph adapter and Trace/OTEL/Sysmon backends Apr 21, 2026
@chinganc

Copy link
Copy Markdown
Member

TODO: integrates the graph/module path with existing optimization/search mechanisms such as PrioritySearch and ModuleCandidate

@chinganc

Copy link
Copy Markdown
Member

LGTM

@chinganc chinganc merged commit 435a8d5 into AgentOpt:experimental Jun 10, 2026
1 check passed
doxav pushed a commit to doxav/NewTrace that referenced this pull request Jun 11, 2026
…ckends

- Updated README.md to reflect changes in installation and usage instructions, removing references to PR AgentOpt#73 and clarifying the role of graph telemetry.
- Modified levels.py to update API verification comments and remove PR AgentOpt#73 references.
- Refactored runmode.py to clarify the mode banner and remove PR AgentOpt#73 mentions, replacing them with general graph telemetry references.
- Enhanced tracebench.py to introduce a new trace_type configuration, allowing for hybrid trace feedback from multiple sources (internal, OTEL, Sysmon).
- Updated traces.py to guard imports for optional graph/telemetry modules and provide clear error messages when they are unavailable.
- Added new tests in test_recursive_opt.py to validate the trace_type functionality and ensure proper feedback collection from the TraceBenchTaskAdapter.
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