Skip to content

ihower/openai-agents-sdk-fastapi-boilerplate

Repository files navigation

OpenAI Agents SDK + FastAPI Boilerplate

A FastAPI boilerplate integrating OpenAI Agents SDK with Braintrust observability.

Prerequisites

  • uv package manager
  • API keys from:
    • OpenAI
    • Tavily
    • Braintrust

Setup

  1. Copy environment template:
cp .env.example .env
  1. Edit .env and add your API keys

  2. Install dependencies:

uv sync
  1. Run development server:
uv run uvicorn main:app --reload
  1. Open http://localhost:8000/static/agent.html

Production

Run with multiple workers using Gunicorn:

uv run gunicorn main:app \
  --workers 3 \
  --worker-class uvicorn.workers.UvicornWorker \
  --bind 0.0.0.0:7860 \
  --timeout 600

About

my LLM app dev workshop sample code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published