No description
  • Python 97.6%
  • HTML 2.4%
Find a file
2026-04-19 22:08:30 -05:00
src/agent_template Move logic to main.py 2026-04-19 22:08:12 -05:00
tests Update settings and tests 2026-04-19 01:45:05 -05:00
.env.example Initial template 2026-04-19 00:53:22 -05:00
.gitignore Initial template 2026-04-19 00:53:22 -05:00
.python-version Initial template 2026-04-19 00:53:22 -05:00
mise.toml Move logic to main.py 2026-04-19 22:08:12 -05:00
pyproject.toml Move logic to main.py 2026-04-19 22:08:12 -05:00
README.md Initial template 2026-04-19 00:53:22 -05:00
uv.lock Add favicon 2026-04-19 22:08:30 -05:00

agent-template

AI Agent UI service built with FastAPI.

Prerequisites

  • Python 3.14
  • uv
  • mise (recommended for task running)

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:

  1. ENV_FILE (if set and file exists)
  2. .env.dev
  3. .env
  4. Defaults in src/agent_template/settings.py

Note on mise run app:dev:

  • The task runs uvicorn with explicit --host and --port from APP_HOST and APP_PORT.
  • If those variables are missing, it falls back to 127.0.0.1:8000 (Uvicorn-compatible defaults).