Build dashboards, REST APIs, and model endpoints with FastAPI, Streamlit, vLLM, and more.
Build apps
This section covers how to build different types of apps with Flyte, from single-script apps to multi-file projects, common usage patterns, and authentication.
Go to Introducing apps for an overview of apps and a quick example. For pre-built environments for popular frameworks like Streamlit, FastAPI, vLLM, SGLang, and Ollama, see Native app integrations.
App types
Flyte supports various types of apps:
- UI dashboard apps: Interactive web dashboards and data visualization tools like Streamlit and Gradio
- Web API apps: REST APIs, webhooks, and backend services like FastAPI and Flask
- Model serving apps: High-performance LLM serving with vLLM and SGLang, or lightweight serving with Ollama
- Connector apps: Long-running services that delegate task execution to external systems
For ready-to-use environments for these frameworks, see Native app integrations.
Usage patterns
Apps and tasks can interact in various ways: calling each other via HTTP, webhooks, WebSockets, or direct browser usage.
| Pattern | Use Case | Implementation |
|---|---|---|
| App | Stand-alone serving app | HTTP requests from arbitrary clients |
| App → App | Microservices, proxies, agent routers, LLM routers | HTTP requests between apps |
| App → Task | Webhooks, APIs triggering workflows | Flyte SDK in app |
| Task → App | Batch processing using inference services | HTTP requests from task |
| Browser app | User-facing dashboards (e.g. Streamlit, Gradio) | Direct browser access |
Next steps
- Single-script apps: The simplest way to build and deploy apps in a single Python script
- Multi-script apps: Build FastAPI and Streamlit apps with multiple files
- Serving graphs: Apps calling other apps for microservice architectures
- Hybrid graphs: Tasks calling apps and apps calling tasks (webhooks, APIs)
- WebSocket apps: Real-time, bidirectional communication with WebSockets
- Browser apps: User-facing dashboards and UIs
-
Secret-based authentication: Authenticate FastAPI apps using Flyte secrets
- Connector app: Deploy a connector as a long-running service
Single-script appsBuild and deploy an app from one Python file.Multi-script appsBuild a FastAPI or Streamlit app that spans several Python files.Serving graphsSplit a request across several apps that talk to each other inside the cluster.Hybrid app-task graphsHave tasks call apps over HTTP and apps trigger runs through the SDK.WebSocket appsServe WebSocket endpoints for bidirectional, real-time communication.Browser appsServe Streamlit, Gradio, or custom dashboards that users reach directly in a browser.Secret-based authenticationProtect a public FastAPI endpoint with an API key held in a Flyte secret.Connector appExtend Flyte with a custom task execution backend, such as an internal batch service.