Skip to content

Chatbot template: UI for background mode#150

Closed
bbqiu wants to merge 9 commits intodatabricks:mainfrom
bbqiu:bbqiu/start-frotend
Closed

Chatbot template: UI for background mode#150
bbqiu wants to merge 9 commits intodatabricks:mainfrom
bbqiu:bbqiu/start-frotend

Conversation

@bbqiu
Copy link
Contributor

@bbqiu bbqiu commented Mar 4, 2026

stacked on top of #146

  • follows the client contract in the readme of the last PR to enable UI backend request to agent backend with background=True

manual testing WIP

david-tempelmann and others added 9 commits March 3, 2026 08:42
Signed-off-by: Bryan Qiu <bryan.qiu@databricks.com>
Signed-off-by: Bryan Qiu <bryan.qiu@databricks.com>
Signed-off-by: Bryan Qiu <bryan.qiu@databricks.com>
@bbqiu
Copy link
Contributor Author

bbqiu commented Mar 5, 2026

i realized that to support long running stuff within a UI that is colocated with the agent (on the same app), we do not need to do anything special bc:

user/UI frontend -1-> UI backend -2-> Agent

when UI + agent are colocated, connection 2 is never broken, so you can continue to run things without a problem. this PR will only be needed once we support querying the agentic loop w/ background mode=True, so closing this PR for now

changes required for future change:

  1. send a request with background=True, stream=True by default, if it fails, fall back to stream=True, and then stream=False
  2. after connection 2 times out, the protocol for resumption should be the GET /retrieve endpoint.
    a. there should probably be a tracker of last emitted event timestamp and to stop polling if the stream has gone stale

another working reference: https://github.com/david-tempelmann/agent-longrunning-openai-agents-sdk/pull/1

@bbqiu bbqiu closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants