mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-08 05:45:07 -05:00
Currently it's only possible to open latest graph from monitor and see the node execution results only when manually running. This PR adds ability to open running and finished graphs in builder. ### Changes 🏗️ Builder now handles graph version and execution ID in addition to graph ID when opening a graph. When an execution ID is provided, node execution results are fetched and subscribed to in real time. This makes it possible to open a graph that is already executing and see both existing node execution data and real-time updates (if it's still running). - Use graph version and execution id on the builder page and in `useAgentGraph` - Use graph version on the `execute_graph` endpoint - Use graph version on the websockets to distinguish between versions - Move `formatEdgeID` to utils; it's used in `useAgentGraph.ts` and in `Flow.tsx` ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Opening finished execution restores node results - [x] Opening running execution restores results and continues to run properly - [x] Results are separate for each graph across multiple tabs #### For configuration changes: - [ ] `.env.example` is updated or already compatible with my changes - [ ] `docker-compose.yml` is updated or already compatible with my changes - [ ] I have included a list of my configuration changes in the PR description (under **Changes**) <details> <summary>Examples of configuration changes</summary> - Changing ports - Adding new services that need to communicate with each other - Secrets or environment variable changes - New or infrastructure changes such as databases </details> --------- Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>