How yhdf/zerogravity works
ZeroGravity is a Gemini-Web-backed code-generation service: OpenWebUI requests enter a FastAPI router, which obtains Gemini output through a browser bridge, extracts and validates files and commands, applies them to a workspace, and records turn telemetry. The README documents the overall handoff and optional Ollama stage; sampled excerpts show the bridge and workspace/history implementations. Some router internals are omitted, so edges for those documented handoffs cite the README rather than implying the missing code was inspected.
Main entry points: app.py Router API · server.py Bridge API · gemini_automator.py Gemini Automation · browser_extractor.py Response Extraction
Components 14
Request Routing
- Router API
services/router/src/app.py - Meta-task Interceptor
services/router/src/app.py
Gemini Generation
- Bridge API
services/browser_bridge/server.py - Gemini Automation
services/browser_bridge/gemini_automator.py - Gemini Web
Extraction and Validation
- Response Extraction
services/router/src/browser_extractor.py - File and Command Validation
services/router/src/browser_extractor.py - Ollama
Workspace and History
- Workspace Operations
services/router/src/mcp_workspace.py - Target Workspace
- Command Execution
services/router/src/mcp_workspace.py - Turn Archive
services/router/src/history_manager.py - History Index
services/router/src/history_manager.py
Other components
- OpenWebUI
Connections 18
- OpenWebUI → Router API: submits chat
README.md - Router API → Meta-task Interceptor: filters meta-tasks
README.md - Router API → Bridge API: requests generation
services/router/src/app.py - Bridge API → Gemini Automation: delegates prompts
services/browser_bridge/server.py - Gemini Automation → Gemini Web: sends prompt
services/browser_bridge/gemini_automator.py - Gemini Web → Gemini Automation: streams response
README.md - Gemini Automation → Bridge API: returns output
services/browser_bridge/server.py - Bridge API → Router API: returns raw text
services/router/src/app.py - Router API → Response Extraction: extracts chunks
README.md - Response Extraction → File and Command Validation: checks outputs
services/router/src/browser_extractor.py - Response Extraction → Ollama: optionally synthesizes
services/router/src/browser_extractor.py - Router API → Workspace Operations: writes files
services/router/src/app.py - Workspace Operations → Target Workspace: stores files
services/router/src/mcp_workspace.py - Router API → Command Execution: runs commands
README.md - Command Execution → Target Workspace: uses workspace cwd
services/router/src/mcp_workspace.py - Router API → Turn Archive: records turns
README.md - Turn Archive → History Index: updates index
services/router/src/history_manager.py - Router API → OpenWebUI: returns result
README.md