-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: initialize agent user_id on agent arun #4236
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
base: main
Are you sure you want to change the base?
Conversation
Actually, just noticed the existing call was a self assignment. Probably a typo. It's initialized in Agent's init but not in arun. see https://github.com/agno-agi/agno/blob/main/libs/agno/agno/agent/agent.py#L445 |
@JasonLovesDoggo We don't actually want that to be "sticky" when passed on |
Yet session id persists? I feel like I'm missing something here where we obviously want the telemetry to get the user id but it reads from an empty value. The current code is just doing a self assignment which also just makes no sense |
Agreed! |
@JasonLovesDoggo @dominic-mortimer We don't want it to be sticky, because then it would break multi-user flows in production applications where an agent is used concurrently. I'll look into updating the Arize package |
Added a PR to openinference I'll get it merged asap. Their team is usually pretty responsive |
Got it! Thanks Dirk. That's perfect for us |
Summary
Properly init Agent.user_id if passed in via Agent.arun
Type of change
Checklist
./scripts/format.sh
and./scripts/validate.sh
)Additional Notes
Add any important context (deployment instructions, screenshots, security considerations, etc.)

This was due to user_id not showing up in arize. We don't use teams.