tracecore-openai is a Python-first examples repository for building OpenAI Agents SDK applications with the same local FastAPI + uvicorn workflow already used in TraceCore.
- A shared OpenAI Agents runtime adapter
- A
FastAPIapp exposing example agent-powered routes - Two initial examples:
chat_assistantsupport_triage
- A deterministic local verification flow for app behavior
Read docs/repo_scope.md for a short explanation of what this repository demonstrates, what it does not demonstrate, and how it fits TraceCore's core mission as an agent evaluation tool.
Docker is optional. These examples call OpenAI-hosted models over HTTPS, so a normal Python process is enough for local development and verification.
Everything needed to run this example is declared in pyproject.toml, so once you clone the repo you can install it with a single command.
git clone https://github.com/justindobbs/tracecore-openai.git
cd tracecore-openai
python -m venv .venv
.venv\Scripts\activate
pip install -e .[dev]
copy .env.example .envSet OPENAI_API_KEY in your environment or .env loader of choice.
If you installed tracecore in a different environment, make sure the tracecore command is available in your shell before running bundle commands from this repo.
uvicorn tracecore_openai.main:app --reloadOpen http://127.0.0.1:8000.
The verification harness runs the app in a fake deterministic mode so you can validate behavior without spending API credits while staying inside the native TraceCore workflow.
set TRACECORE_OPENAI_FAKE_RUNNER=1
tracecore run --agent agents/chat_assistant_agent.py --task chat_assistant_example@1 --seed 0
tracecore verify --latestUse the rest of the CLI to inspect and compare agent behavior as you iterate:
tracecore inspect --run <run_id>
tracecore diff <run_a> <run_b>
tracecore baseline --agent <agent> --task <task> --compare <run_a> <run_b>
tracecore runs list --limit 5
tracecore runs summary --limit 5By default, the app uses the OpenAI Agents SDK. For deterministic tests, set:
set TRACECORE_OPENAI_FAKE_RUNNER=1GET /POST /api/chat-assistantPOST /api/support-triageGET /healthz
uvicorn tracecore_openai.main:app --reload
tracecore run --agent agents/chat_assistant_agent.py --task chat_assistant_example@1 --seed 0
tracecore verify --latest
tracecore inspect --run <run_id>
tracecore diff <run_a> <run_b>
tracecore baseline --agent agents/chat_assistant_agent.py --task chat_assistant_example@1 --compare <run_a> <run_b>
tracecore runs list --limit 5
tracecore runs summary --limit 5
tracecore bundle seal --latest
pytest
ruff check .