Application docs
Everything the app does, in one glanceable place.
This page is the in-app documentation for AgentBridge AI. It matches the current runtime behavior of the workspace and backend, so the UI, APIs, and deployment steps stay easy to discover.
Overview
Overview
AgentBridge AI turns plain-English prompts into MCP-style FastAPI services, previews the output, and runs a live sandbox to inspect the generated system before you ship it.
Workflow
Workflow
The intended flow is prompt -> generate -> preview -> sandbox -> deploy. The workspace ties those steps together so you can keep the code, runtime state, and agent output in one place.
Architecture
Architecture
The frontend is a Next.js app and the backend is a FastAPI service. The backend handles generation, preview state, sandbox sessions, WebSocket updates, and MCP-style tool routes.
API surface
API surface
The backend exposes health, generation, preview, sandbox, tools, and websocket routes. The docs page mirrors the runtime contract so the UI and backend stay aligned.
Sandbox protocol
Sandbox protocol
Sandbox clients receive agent:analysis, mcp:tool_result, and final events. Final responses should be rendered as structured paragraphs rather than a single unbroken line.
Deployment
Deployment
Deploy the frontend on Vercel and the backend on Render. Set NEXT_PUBLIC_BACKEND_URL on the frontend and keep the Render backend pointed at Python 3.12.x with the backend root directory.
Troubleshooting
Troubleshooting
If generation falls back to local mode, check GROQ_API_KEY. If browser requests fail, verify CORS_ORIGINS. If Render crashes on boot, make sure the backend config and runtime files are in sync.
API reference
Backend routes
GET /healthHealth check used by Render and the app shell.POST /api/generateGenerate MCP code from prompt or description.POST /api/generate?download=zipDownload the generated code as a ZIP bundle.GET /api/v1/previewRead the most recent preview metadata.POST /api/v1/preview/deployPersist the latest generated artifact.GET /api/v1/tools/listList tools discovered from the latest generation.POST /api/v1/tools/callCall supported demo tools such as add and multiply.POST /api/v1/sandbox/startCreate a sandbox session for live agent analysis.GET /api/v1/ws/sandbox/{session_id}Stream live sandbox events over WebSocket.Environment
Required variables
NEXT_PUBLIC_BACKEND_URLFrontend URL for the deployed backend.CORS_ORIGINSComma-separated browser origins or * for permissive access.LLM_PROVIDERSet to groq to use the remote provider or leave on fallback mode.GROQ_API_KEYRequired for Groq-backed generation.GROQ_MODELModel name used for generation requests.Routes
App entry points
Frontend
/workspace- main dashboard with generator, code viewer, health, output, and sandbox panels./generator- standalone prompt-to-code experience./deploy- deployment helper workflow./sandboxand/sandbox/[id]- sandbox overview and session replay./servers/[id]- server detail and log view.
Backend
/health- readiness endpoint used by Render./api/generate- generation entry point./api/v1/preview- latest preview state./api/v1/tools/*- demo MCP tool discovery and invocation./api/v1/sandbox/*- live agent session management.
Related files
Documentation sources
- This docs page - live product documentation in the app.
- /workspace - primary operator interface.
- /generator - focused generation entry point.
- docs/agent_protocol.md - sandbox event shapes and rendering notes in the repository.