Skip to content

Implement agent busy state#283

Open
Yahiewi wants to merge 4 commits intojupyterlite:mainfrom
Yahiewi:busy
Open

Implement agent busy state#283
Yahiewi wants to merge 4 commits intojupyterlite:mainfrom
Yahiewi:busy

Conversation

@Yahiewi
Copy link
Copy Markdown
Contributor

@Yahiewi Yahiewi commented Mar 4, 2026

This PR solves the issue described here by adding a _busy and _busyChanged attributes to the AgentManager which prevent sending messages and generating a response if the agent is busy.

This screencast shows what happens when we try to send a prompt while the agent is busy:
https://github.com/user-attachments/assets/b3fb6c9d-c7a3-4c01-8e71-467335ef610c

@jtpio jtpio added the bug Something isn't working label Mar 4, 2026
@Yahiewi Yahiewi marked this pull request as ready for review March 5, 2026 13:58
@jtpio
Copy link
Copy Markdown
Member

jtpio commented Mar 6, 2026

Thanks @Yahiewi for looking into this!

which prevent sending messages and generating a response if the agent is busy.

Other agents allow sending messages even when already busy with other tasks, which ends up adding messages to a queue that will be processed by the agent at a later time (after a turn or at the end of all turns for instance).

Wondering if we should maybe move towards implementing something like this instead directly? Although we currently may be lacking some UI elements or extension point for such "pending" messages.

@Yahiewi
Copy link
Copy Markdown
Contributor Author

Yahiewi commented Mar 6, 2026

Yes I actually agree that being able to send a message but have it pending is a better user experience than simply blocking the user from sending anything.
I thought since this was easier to implement, I would start with it to fix the error, but I'll just extend this PR to add a queue feature.

@jtpio
Copy link
Copy Markdown
Member

jtpio commented Mar 6, 2026

Maybe this "queue" component could be a good candidate for https://github.com/brichet/jupyter-chat-components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants