-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix session isolation for shared agents #12710
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
Multiple users sharing the same agent were overwriting each other's conversation history. Now each user gets their own session. Fixes infiniflow#11697
|
@KevinHuSh please review the changes and let me know your feedback. thanks. |
|
Appreciations! |
|
@KevinHuSh Thanks for the review! The frontend already supports session_id - I checked For DB waste: sessions are only created when users actually chat with the agent. We could add a cleanup job for old sessions in a follow-up PR if needed. |
|
@ZhenhangTung can you review the PR and let me know your feedback? seems like Kevin is busy |
|
@MkDev11 I’m a product manager, so I’m not able to review code directly :( Kevin will review it when he is available. |
|
@KevinHuSh Really sorry to bother you. Could you please review the PR again and help me merge it so that I can continue working on other issues? |
|
@KevinHuSh Regarding
The session gets reused on follow-up messages in the same conversation. |
|
@Magicbook1108 Can you please review this PR as well? |
|
@KevinHuSh Is it impossible to approve this PR yet? |

What problem does this PR solve?
When multiple users share the same agent simultaneously, there was no isolation mechanism. Historical memories and conversation state were being overwritten by subsequent requests because the canvas state was stored in the shared agent DSL.
The SDK's
/agents/<agent_id>/completionsendpoint already had session isolation, but the web UI's/completionendpoint incanvas_app.pydid not.Fixes #11697
Type of change