This repo contains the code for a production-grade agentic system built with:
- A Streamlit UI
- A FastAPI server
- A Postgres database with the PgVector extension.
You can run the agent app in 2 environments:
- A local development environment using Overmind (recommended)
- A development environment running locally on docker
- Install uv for managing the python environment.
curl -LsSf https://astral.sh/uv/install.sh | sh- Create a virtual environment and install dependencies:
./scripts/dev_setup.sh- Activate virtual environment
source .venv/bin/activate
This method runs all services directly on your local machine without Docker.
- Install PostgreSQL 17 and pgvector:
brew install postgresql@17 pgvector
# Configure PostgreSQL 17 to run on port 5433 (to avoid conflict with PostgreSQL 16)
echo "port = 5433" >> /opt/homebrew/var/postgresql@17/postgresql.conf
# Start PostgreSQL 17
brew services start postgresql@17- Install Overmind:
brew install overmind- Create and configure environment variables:
cp .env.example .env
# Edit .env file with your API keys and update DB_PORT=5433 for PostgreSQL 17 (if you have another version of postgres on your machine, otherwise you can use the standard 5432)- Set up the database:
# Create database using PostgreSQL 17 (specify port 5433 to avoid conflict with PostgreSQL 16)
/opt/homebrew/opt/postgresql@17/bin/createdb -p 5433 opt_out_dev
# Connect to the database and enable pgvector extension
psql -p 5433 opt_out_dev -c "CREATE EXTENSION IF NOT EXISTS vector;"- Run database migrations:
uv run alembic -c db/alembic.ini upgrade headovermind startThis will start:
- FastAPI server on localhost:8000
- Streamlit UI on localhost:8501
overmind stopOr press Ctrl+C in the terminal running Overmind.
-
Install docker desktop
-
Export API keys
Required: Set the OPENAI_API_KEY environment variable using
export OPENAI_API_KEY=***You may use any supported model provider, just need to update the respective Agent, Team or Workflow.
- Start the workspace:
ag ws up- This will run 3 containers:
- Streamlit on localhost:8501
- FastAPI on localhost:8000
- Postgres on localhost:5432
- Open localhost:8501 to view the Streamlit App.
- Open localhost:8000/docs to view the FastAPI docs.
- Stop the workspace using:
ag ws downLearn more about this application and how to customize it in the Agno Workspaces documentaion