Replace Streamlit UI with FastAPI backend for computer-use demo#363
Open
ZenRepoMaster wants to merge 1 commit into
Open
Replace Streamlit UI with FastAPI backend for computer-use demo#363ZenRepoMaster wants to merge 1 commit into
ZenRepoMaster wants to merge 1 commit into
Conversation
- Add FastAPI backend with session management, SQLite persistence, SSE streaming for agent output, and WebSocket VNC proxy - Add HTML/JS frontend with chat UI, desktop panel, and API log panel - Add Docker Compose setup with separate desktop and api services - Add Fernet encryption for API keys stored in SQLite - Keep existing loop.py and tools unchanged Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
494021d to
870ac3a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces the experimental Streamlit interface with a production-capable
FastAPI backend, providing a cleaner architecture with proper session management,
real-time streaming, and persistent chat history.
What's changed
output, WebSocket proxy for VNC desktop access
SQLAlchemy async + aiosqlite; WAL mode for concurrent reads/writes
sampling loop runs; SSE queue fan-out supports multiple browser tabs
sidebar, chat messages (with inline screenshots), and a tabbed right panel
for the VNC desktop and API request/response logs
desktop(Xvfb + x11vnc + noVNC)and new
api(FastAPI on port 8000); API waits for desktop healthcheck beforestarting
How to run
.env.exampleto.envand fill inAPI_SECRET_KEYandANTHROPIC_API_KEYdocker compose upWhat's preserved
loop.pyand all tools are unchanged