Streamlit Chat UI
Every app-mode project includes a production-ready chat interface with dynamic model switching.
Quick start
cd my-project-app pip install -r requirements.txt # Start the API server (terminal 1) uvicorn server:app --reload --port 8080 # Start the chat UI (terminal 2) streamlit run streamlit_app.py
The chat UI opens at http://localhost:8501.
Features
Dynamic model switching
The chat UI reads your .env file and auto-detects which API keys are present. Based on that, it populates a model picker dropdown:
| If this key exists in .env | These models appear |
|---|---|
| OPENAI_API_KEY | gpt-4o, gpt-4o-mini, gpt-4.1, o1 |
| ANTHROPIC_API_KEY | claude-sonnet-4, claude-haiku-4.5 |
| GOOGLE_API_KEY | gemini-2.0-flash, gemini-2.5-pro |
You can add multiple API keys to get access to models from multiple providers in the same chat UI.
Changing the default model
Set the default model in your .env file:
DEFAULT_MODEL=claude-sonnet-4-20250514
This sets what model is pre-selected when the chat UI loads. Users can still switch models from the dropdown at any time.
Customizing the UI
The chat UI is a single Python file (streamlit_app.py) that you can customize:
- Change the page title and icon in
st.set_page_config() - Modify the CSS in the
st.markdown()block at the top - Add custom sidebar content
- Change the API URL if your server runs on a different port
Running with agentvoy dev
Instead of starting two terminals manually, use:
agentvoy dev
This starts both the FastAPI server and the Streamlit UI, plus enables the DevTools dashboard at /dev.