-
Notifications
You must be signed in to change notification settings - Fork 44.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ai_name not passed to Agent #3948
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Note: my fix is probably not the cleanest solution, I noticed that in agent.py we sometimes use |
Without having looked at the code in question, it would make sense for the top-level agent routines to refer to the config values from the yaml file to get the name for the top-leve (outermost) agent, whereas any dynamic (sub) agents would obviously have a different name, which is why dealing with it that way would make sense - lest, all your sub-agents would inherit the same name </pure speculation> |
Interesting theory, but I don't see anywhere else in the code where we instantiate Agent (apart in unit tests & integration tests). I don't know how sub-agent are handled, but they don't seem to be subject to the inheritance problem you're talking about. |
take a look at the command layer, you should find something called start_agent (more or less), that should instantiate a new Agent object with the ID/task etc (again, pure speculation / off the top of my head and without having followed the re-arch massacre) |
It doesn't seem to instantiate an actual agent, it just calls a singleton called agent_manager which handles its agents as basic tuples |
they basically stopped processing PRs in order to re-architect the project out of the realization that the current/previous architecture did not scale (given the sheer number of PRs). |
I see. Better leave this PR as is for now then :-) |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #3948 +/- ##
==========================================
- Coverage 62.30% 62.26% -0.04%
==========================================
Files 73 73
Lines 3337 3339 +2
Branches 481 482 +1
==========================================
Hits 2079 2079
- Misses 1111 1113 +2
Partials 147 147
☔ View full report in Codecov by Sentry. |
Deployment failed with the following error:
|
Deployment failed with the following error:
|
Co-authored-by: Nicholas Tindle <[email protected]>
Background
The ai_name parameter passed to the Agent constructor is always an empty string.
It leads to confusing logs like this:
instead of:
Changes
I noticed that the ai_name is present in ai_config returned by construct_main_ai_config() function in main.py. I just made sure to pass the parameter back to ai_name.
Documentation
It's just a 2-lines fix, I don't think it needs to be documented, but if you think otherwise please tell me in a comment of the PR :)
Test Plan
Reproduction steps are quite straightforward, just enter any prompt and wait for the "NEXT ACTION" command
Before the fix you'll see
After the fix you'll see
PR Quality Checklist