The short answer
To deploy a Streamlit app, give your coding agent the sentence below. Antideploy finds Streamlit in your requirements, finds the file that imports it, and starts it with the flags it needs behind a proxy. You do not set the port or write a start command. Each app has 1 GB of memory, so load large models when first needed rather than at startup.
Say this to your coding agent
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
What Antideploy detects
-
Streamlit. Detected from
streamlitinrequirements.txtorpyproject.toml. If a project also imports Flask, it is still treated as Streamlit. -
The entry file. It looks for
streamlit_app.py,app.py,dashboard.py,main.pyandhome.py, in that order, in the folder of your requirements. The first one that containsimport streamlitwins. Otherwise it uses any.pyfile that imports Streamlit. -
The start command.
streamlit run <entry> --server.port $PORT --server.address 0.0.0.0with--server.headless true,--server.enableCORS falseand--server.enableXsrfProtection false. Those flags are what make Streamlit work behind a proxy. -
The port. It starts the app with
PORTset, and the start command passes it to Streamlit.
What your project needs
streamlit
pandas
Nothing else is required. You do not call a server from your code, and you do not change the port.
WebSockets and sessions
Streamlit keeps a WebSocket open to every browser tab. Antideploy sets no time limit of its own on a connection, and each app is one long-running process, so sessions behave as they do on your own machine. An idle WebSocket to a Streamlit app stayed open for 330 seconds in our test on 19 September 2026, until we closed it.
Memory
Every app gets 1 GB. A Streamlit app that loads a model or a large dataset when the script starts can run out of memory and be stopped before it listens. The deploy tells you when that happens. The usual fix is to load the data the first time it is needed, and cache it with st.cache_resource.
Step by step
-
Check your requirements
streamlitis listed, and any model or dataset is loaded lazily. -
Paste the sentence and approve one link
Your agent creates the app and builds it.
-
Deploy and open the link
Antideploy installs your requirements, starts Streamlit and checks that it answers. Your agent tells you the address.
Secrets
Keep API keys out of your code and out of any file you commit. Use environment variables, and read them with os.environ. Values you save on Antideploy are encrypted and write-only.