generated from goeks/python314-template
No description
- Python 97.6%
- HTML 2.4%
| src/agent_template | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| .python-version | ||
| mise.toml | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
agent-template
AI Agent UI service built with FastAPI.
Prerequisites
Setup
Install dependencies:
uv sync --group dev
Create local environment files:
# For Dev
cp .env.example .env.dev
# For Prod
cp .env.example .env
Run the app
Development run (uses .env.dev and auto-reloads on Python changes):
mise run app:dev
Production run:
mise run app
Useful endpoints:
- Health:
http://127.0.0.1:8000/health - API docs:
http://127.0.0.1:8000/docs
Quality checks
Run tests:
mise run test
Run lint checks:
mise run lint
Environment variables
Supported variables:
For the APP_* variables, use .env or .env.dev to persist values.
APP_PORT(default:8000)APP_NAME(default:agent-template)APP_HOST(default:127.0.0.1)
Other:
ENV_FILE(optional explicit env file path)
Settings load order:
ENV_FILE(if set and file exists).env.dev.env- Defaults in
src/agent_template/settings.py
Note on
mise run app:dev:
- The task runs
uvicornwith explicit--hostand--portfromAPP_HOSTandAPP_PORT.- If those variables are missing, it falls back to
127.0.0.1:8000(Uvicorn-compatible defaults).