AutoGPT
AutoGPT copied to clipboard
fix(frontend): ensure all agents with graph_id appear in activity dropdown
Summary
Fixes issue where agents appear as "Unknown Agent" in the agent activity dropdown.
Root Cause
The buildAgentInfoMap function was only adding agents to the map if they had BOTH graph_id AND id fields populated. Since graph_id is used as the lookup key, agents missing the id field would not be added to the map, causing them to appear as "Unknown Agent".
Changes
Changed the condition in buildAgentInfoMap from:
if (a.graph_id && a.id) {
To:
if (a.graph_id) {
This ensures any agent with a graph_id (the lookup key) will be added to the map. The library_agent_id field remains optional.
Impact
- All agents with valid
graph_idwill now appear consistently in the activity dropdown - Resolves the "Unknown Agent" issue mentioned in the bug report
- No breaking changes -
library_agent_idis still populated when available
Testing
Manual testing recommended: Verify agents with missing id fields now appear with their proper names instead of "Unknown Agent".
Fixes #11229
Deploy Preview for auto-gpt-docs-dev canceled.
| Name | Link |
|---|---|
| Latest commit | 5b1ab57433f12b4e6e7d6af9a1e670fffa2140c1 |
| Latest deploy log | https://app.netlify.com/projects/auto-gpt-docs-dev/deploys/690f25a42dfa5d000831df40 |
Deploy Preview for auto-gpt-docs canceled.
| Name | Link |
|---|---|
| Latest commit | 5b1ab57433f12b4e6e7d6af9a1e670fffa2140c1 |
| Latest deploy log | https://app.netlify.com/projects/auto-gpt-docs/deploys/690f25a4cdf3570008572360 |
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
β¨ Finishing touches
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
PR Reviewer Guide π
Here are some key observations to aid the review process:
| β±οΈΒ Estimated effort to review: 1 π΅βͺβͺβͺβͺ |
| π§ͺΒ No relevant tests |
| πΒ No security concerns identified |
β‘Β Recommended focus areas for reviewData Consistency
|
Here's the code health analysis summary for commits 8058b94..5b1ab57. View details on DeepSourceΒ β.
Analysis Summary
| Analyzer | Status | Summary | Link |
|---|---|---|---|
| β Β Success | View CheckΒ β | ||
| β Β Success | View CheckΒ β |
π‘ If youβre a repository administrator, you can configure the quality gates from the settings.
Thanks for the explanation! That makes sense - I misdiagnosed the root cause. The LibraryAgent type does require both fields, so the real issue is executions referencing graphs that aren't in the library (sub-agents, deleted agents, etc).
Closing this one. The Sentry logging idea you mentioned could help track how often this happens.