Why Streamlit
Generating an app is cheap.
Owning it isn't.
What we believe
The numbers have to be right, and the app has to last
The logic belongs next to the data
Forecasts, models, approvals, and AI calls are Python. A data app shouldn't need a TypeScript frontend, a Python backend, and a contract between them just to show a result, so Streamlit provides those layers once, for every app. Agents can write the code, but people answer for it, so the logic sits next to the number it produces, in changes small enough to review. Where definitions live in a semantic layer, the app shows the same governed numbers.Opinionated on design, great by default
Streamlit works like a built-in design system with a starter pack: native charts, maps, tables, and filters; a modern theme in your brand; dashboard templates and agent skills; and accessibility and agent access built in. A custom stack makes these decisions again in every app and every agent run. Streamlit makes them once, and well, so agents spend their effort on the logic.Write the logic once, for people and agents
One app packages the queries, calculations, definitions, and rules about who may see what. People use it in the browser, and agents use it as a tool, with the same numbers and access rules.Freedom for developers, guardrails for the enterprise
Developers write any business logic in plain Python. Management, security, and platform teams review the framework and its shared controls once for hundreds of apps: the interface, authentication, security defaults, and upgrades. Each app's data access, business rules, and writeback still get their own review, and that review is small.
Choosing a tool
Which tool for which job
Choose Streamlit for
Data apps and dashboards
- Dashboards with drill-down and cross-filtering
- Forecasting apps with what-if levers
- Workflow apps for reviews, approvals, and writeback
- AI chat and agent apps over your data
Choose a custom stack
When the UI itself is the product
- The app is customer-facing at large scale
- It must be mobile-first or work offline
- It has design requirements that Streamlit's components and theming can't meet, even with custom components
Keep a BI tool for
Drag-and-drop self-service
- Exploration by people who don't want code
- Pixel-precise paginated reports
Ask in chat for
One question, one moment
- One-off questions and reports
- When the answer needs to stay live, take new parameters, be reviewed and tested, or write decisions back, it becomes a Streamlit app
Compared to custom web stacks
A custom stack is easy to generate and expensive to own
An agent can generate a React frontend and a Python API in minutes. Then you own both, and the contract between them. You also own a mix-and-match of libraries for the UI, charts, tables, forms, state, and authentication, the lazy loading, caching, and cross-filtering every dashboard needs, and hundreds of frontend packages to patch.
Streamlit is batteries-included. You write plain Python with no API layer, and you get one dependency to keep current and one upgrade path for every app. Because the agent writes a fraction of the code, each app has less to maintain and fewer places to break, and it costs fewer tokens to write and change. Dashboard performance is built in, and we scan and patch the web frontend for you.
Streamlit
Python
- app.py
- metrics.py
- .streamlit/
- config.toml
- Batteries included, no npm tree
- Authentication, caching, and state built in
- Already a tool for agents
A custom stack
TypeScript and Python
- web/
- package.json
- src/pages/revenue.tsx
- src/components/KpiCard.tsx
- src/components/RevenueChart.tsx
- src/hooks/useRevenue.ts
- src/api/client.ts
- api/
- main.py
- routes/revenue.py
- schemas.py
- auth.py
- cache.py
- Two toolchains and a large npm tree
- Authentication, caching, and state assembled per app
- A second API for agents
An illustrative file layout for the same revenue screen. Real apps grow into more pages and modules in both stacks.
| Streamlit | A custom stack (React and an API) | |
|---|---|---|
| What an agent generates | StreamlitPython pages and modules, with no frontend or API layer to write | A custom stack (React and an API)A frontend, a backend, and the API contract between them |
| Code to generate and maintain | StreamlitA fraction of the code: less to maintain, fewer places to break, and fewer tokens | A custom stack (React and an API)Several codebases, generated, debugged, and kept in sync together |
| Languages and toolchains | StreamlitPython | A custom stack (React and an API)TypeScript and Python, Node, a bundler, and two package managers |
| Fewer ways to go wrong | StreamlitBuilt-in expert skills and one idiomatic way to build each screen, and agents verify the running app headlessly before they hand it over | A custom stack (React and an API)Countless valid architectures that differ on every run |
| Reviewing the numbers | StreamlitThe query and the result sit side by side | A custom stack (React and an API)Logic is spread across components, hooks, routes, and caches |
| Data access | StreamlitOn the server; no credentials in the browser | A custom stack (React and an API)Designed and secured in each app |
| Made for data | StreamlitHand a pandas, Polars, Snowpark, PySpark, or DuckDB dataframe straight to a table or a chart (st.dataframe, st.line_chart) | A custom stack (React and an API)Serialize the data for an API, then wire it into a data grid and a charting library by hand |
| Batteries included | StreamlitWidgets, charts, data tables, forms, layouts, navigation, state, caching, authentication, theming, chat, and testing ship natively and work together (st.dataframe, st.login, @st.cache_data, st.session_state) | A custom stack (React and an API)Mixed and matched from a UI kit, a charting library, a data grid, and form, state, and auth libraries, each with its own versions, docs, and upgrade cycle |
| Dashboard performance | StreamlitLazy loading, background refresh, partial reruns, and cross-filtering, solved once (@st.fragment, refresh_mode="background") | A custom stack (React and an API)Rebuilt slightly differently in every app |
| Dependencies | StreamlitOne to keep current: update Streamlit, and its frontend and dependencies come along | A custom stack (React and an API)A large npm tree to patch in every repository |
| Upgrades | StreamlitBump one version: every app improves and keeps running for years | A custom stack (React and an API)Dependency and framework migrations per app |
| Frontend security | StreamlitThe web frontend and its npm tree are scanned and patched centrally, with fixes in regular releases | A custom stack (React and an API)Each app owns and patches hundreds of frontend packages |
| Accessibility | StreamlitTargets WCAG 2.2 Level A and AA, with a published audit, plus landmarks, keyboard support, alt text, and contrast-checked themes | A custom stack (React and an API)Depends on the libraries and choices in each app |
| Design | StreamlitOpinionated and great by default, consistent across every app | A custom stack (React and an API)Designed again in every app, and different on every agent run |
| Branding across apps | StreamlitOne shared brand theme for every app ([theme] base) | A custom stack (React and an API)Styled per app, unless every team adopts a shared design system |
| User experience across apps | StreamlitThe same interaction patterns in every app, learned once | A custom stack (React and an API)Each app assembles its own tables, filters, and menus |
| Testing | StreamlitBuilt-in headless testing (AppTest) | A custom stack (React and an API)A test setup assembled per app |
| Agent access | StreamlitEvery app is also an MCP tool, with the browser's access rules, caches, and partial reruns | A custom stack (React and an API)A separate API or MCP server per app, built, secured, optimized, and kept in sync |
| Bespoke UI | StreamlitCustom React components, or a React build dropped into the app folder | A custom stack (React and an API)Unlimited |
| Best for | StreamlitDashboards, forecasting and workflow apps, and AI chat and agent apps over your data | A custom stack (React and an API)Products where the UI itself is the product, or with design requirements beyond Streamlit's components and theming |
When a custom stack is the better choice
- The UI itself is the product
- The app is customer-facing at large scale
- It must be mobile-first or work offline
- It has specific design requirements that Streamlit's components and theming can't meet, even with custom components
Escape hatches
When a screen or an endpoint needs more
# main.py: your own routes next to the app
import streamlit as st
from starlette.responses import JSONResponse
from starlette.routing import Route
async def health(request):
return JSONResponse({"ok": True})
app = st.App("app.py", routes=[Route("/health", health)])
# Run it with: uvicorn main:app
Custom components
For a bespoke screen, write a component in React or any frontend framework and keep the rest of the app in Python. You can even drop an existing React or Vite build into the app's folder.API routes, middleware, and startup hooks
Streamlit runs on a standard ASGI server. Add webhooks, health checks, or a small REST API, plus middleware and startup and shutdown hooks, directly to your app.Mount it into FastAPI or Starlette
Serve a Streamlit app from inside an existing FastAPI or Starlette service.
Compared to BI tools
Dashboards that compute and act, built with agents, in Python your team can read
| A BI tool | Streamlit | |
|---|---|---|
| What a dashboard is | A BI toolA report in a tool-specific format | StreamlitPython code in your repository |
| Logic | A BI toolA formula or modeling language | StreamlitYour existing Python models, libraries, and tests, plus SQL and the whole Python ecosystem for forecasts and AI |
| Charts | A BI toolThe vendor's chart catalog and custom visuals | StreamlitNative charts, maps, and diagrams, plus any Python library |
| Taking action | A BI toolBuilt mainly for reading, with writeback in some tools | StreamlitEditable tables, forms, approvals, and writeback, validated by the same Python code that produced the numbers |
| Who builds it | A BI toolAnalysts in a visual editor | StreamlitAnyone, through a coding agent, reviewed by the data team |
| Change management | A BI toolMostly published from a visual editor | StreamlitPull requests, review, and tests |
| Cost | A BI toolPer-seat licenses | StreamlitOpen source; pay for the compute you use |
| Best for | A BI toolDrag-and-drop self-service and paginated reports | StreamlitThe dashboards that matter most, with logic and actions |
A BI tool still fits
- Drag-and-drop self-service exploration by people who don't want code
- Pixel-precise paginated reports
Compared to dashboards built in chat
A chat report is a snapshot. An app is what your team relies on.
It needs to stay live
Fresh data every time someone opens it.It takes new parameters
Filters, levers, and drill-downs instead of a fixed answer.It needs to be reviewed and tested
Reviewed code in your repository, with tests that run in CI.It writes decisions back
Approvals, sign-offs, and corrections, saved where the data lives.
Who it's for
Everyone who touches a data app
Data teams
For data scientists, analysts, and data engineers: keep the logic in Python and SQL, the languages you already review. Agents handle the interface, and there's no TypeScript to maintain.Data platform leaders
One open-source standard for hundreds of apps: flexible for developers, one framework and set of shared controls to review once, upgraded and patched as a fleet, and running where your data lives.Python developers, and ML and AI engineers
The whole Python ecosystem, chat and streaming for AI apps, async and partial reruns for speed, custom components and ASGI routes for the edges, and built-in testing.Coding agents and their platforms
The API models know best, built-in skills, and headless checks of the running app. The shortest path from a request to a verified app.Business users
Modern apps that all work the same way, an AI assistant that can work through them, and changes the same day you ask for them.
Frequently asked questions
Get started
Data apps for people and agents
01Install Streamlit.
pip install streamlit02Give your coding agent the skills.
streamlit skills03Or say hello to your first app.
streamlit hello
You're set. Ask your agent for the Streamlit app you need.