Feature Request: Visualize Agent Planning Graph for Better Readability and Maintainability #1913
anton-zom-ra
announced in
Announcements
Replies: 3 comments
|
@anton-zom-ra, @johnsonr - thank you. Anton, good idea. I would rather frame it as a discussion than an issue. Discussions will go through the planning phase. |
0 replies
yes,that's ok, please |
0 replies
|
@anton-zom-ra - converted into a discussion as agreed. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Feature Request: Visualize Agent Planning Graph for Better Readability and Maintainability
Problem
Embabel's GOAP/planning model is powerful, but as an agent grows, it becomes difficult for someone who did not originally write the code to understand the overall behavior of the agent.
A significant part of the control flow is implicit and distributed across:
@Actioninput/output typesprepost@ConditionFor example:
The relationship is conceptually simple:
However, this relationship is not obvious from any single place in the source code.
The
@Conditionmay be defined in one class, referenced as apostcondition by another action, and consumed as aprecondition by another action elsewhere.The same issue also exists for dependencies inferred from Java method parameters and return types.
As a result, Embabel provides good local readability at the individual Action level, but the global readability of an Agent can become difficult as complexity increases.
Why this matters
For the original author, the implicit planning model is usually understandable because they already know the intended graph.
For other developers, however, understanding an Agent may require:
@Actionmethods@Conditionmethodspre/postreferenceThis becomes particularly difficult during:
Proposal
It would be very useful if Embabel could expose a static Agent Planning Graph derived from the registered Agent metadata.
For example:
Ideally the graph could include:
Possible Outputs
Even a simple machine-readable or text-based representation would be useful.
For example:
Mermaid
Graphviz DOT
Possible APIs could be something similar to:
or
or an actuator/dev endpoint such as:
A UI would be great, but even exporting the underlying graph model would allow IDE plugins and external visualization tools to be built.
Runtime View
A second, complementary feature could visualize the current plan during execution.
For example:
This would be different from the static Agent graph:
Embabel already has strong concepts around planning and replanning, so exposing these three views could significantly improve observability and developer experience.
Summary
The planning abstraction is one of Embabel's strengths, but it also moves control flow away from explicit Java code.
As Agents become larger, I think having a first-class way to inspect or visualize the resulting planning graph would make Embabel significantly easier to:
Would a planning graph/introspection API be something that fits the project's roadmap?
All reactions