This repo contains the code for a running an agentic application with:
- A FastAPI server
- A Postgres database with the PgVector extension.
You can run the agentic application in 2 environments:
- A development environment running locally on docker
- A production environment running on AWS ECS
-
Install uv:
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
-
Install docker desktop
-
Export API keys
Required: Set the OPENAI_API_KEY
environment variable using
export OPENAI_API_KEY=***
you may use any model provider, just need to update the /agents
Optional: Set the EXA_API_KEY
if you'd like to use Exa search
export EXA_API_KEY=***
- Start the workspace:
ag ws up
- This will run 3 containers:
- 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 down
- Learn more about this template and how to customize it.