2 min read · 463 words
Development Workflow
Two terminals, hot reload on both sides, and a short verification loop. This page is the daily-driver reference.
The setup (once)
Covered in Installation: uv sync in backend/, npm install in frontend/, OPENAI_API_KEY in backend/app/.env.
The loop
bash
# Terminal 1 — backend with hot reload
cd backend/app
uv run uvicorn main:app --reload --port 8001
# Terminal 2 — frontend with hot reload
cd frontend
npm run dev| While working on… | Verify with |
|---|---|
| Backend endpoints | Swagger UI http://localhost:8001/docs or curl; watch the uvicorn console for tracebacks |
| Backend behavior | the telemetry itself — GET .../runs, .../tool-calls, .../workflow-runs (Observability) |
| Frontend | http://localhost:3000 + npm run typecheck before committing |
| Database state | sqlite3 backend/app/agentops.db (queries) |
| Docs | uv run mkdocs serve from the repo root — treat warnings as failures |
Command reference
| Where | Command | Purpose |
|---|---|---|
backend/ | uv sync | install/update deps from lockfile |
backend/app/ | uv run uvicorn main:app --reload --port 8001 | dev server |
frontend/ | npm run dev / build / start | dev / prod build / serve |
frontend/ | npm run typecheck | the one mechanical gate — run it every time |
| repo root | uv run mkdocs serve / build | docs preview / build check |
There is no linter, formatter config, or test runner in either project yet (Testing) — typecheck and build warnings are the gates that exist.
Making common changes safely
| Change | Follow |
|---|---|
| New backend endpoint (+ UI access) | Add an Endpoint |
| New agent tool | Add a Tool |
| New column on an existing table | Add a Migration — don't skip the migration entry |
| Prompt edits | rules in Prompt System |
| New UI | tokens only — Design System |
Development gotchas (learned the hard way)
- Start uvicorn from
backend/app/, or you get import errors — or worse, a fresh empty DB in the wrong directory (Troubleshooting). --reloadreruns startup on every save —create_all+ migrations are idempotent, so this is safe, just noisy.- Deleting
agentops.dbwithout deletingchroma_db/leaves orphan vectors that still match searches for reused agent IDs. - The scratch files (
delete.py,practice_solution.py, …) are not part of the app — don't extend them (Project Structure). - Two
uvprojects — root (docs) andbackend/(API).uv syncin the right directory.
Git conventions
Work on branches, keep main deployable (it auto-deploys the docs site). Commit messages in the repo's history follow a loose conventional style (fix: ..., docs: ...) — match it. PR expectations: Contributing.
Related pages
- Coding Standards — how code should look
- Guides — recipes
- Troubleshooting — when the loop breaks