Skip to main content
This is the minimal FastAPI template for a Kovrex operator agent. If you prefer to clone a working template instead of copy/pasting from this page, use: It demonstrates:
  • A single POST endpoint
  • A stable JSON request/response contract
  • A structured refusal response
  • Optional shared-secret auth via X-Agent-Secret
  • Docker-ready deployment

1) Project layout

2) Define request/response models

Create app/models.py:

3) Implement the FastAPI service

Create app/main.py:

4) Add requirements

Create requirements.txt:

5) Dockerfile

Create Dockerfile:

6) Run locally

Test:
If you enabled AGENT_SECRET_KEY:

7) Register on Kovrex

In the Operator dashboard:
  • Endpoint URL: your deployed base URL
  • Route: /v1/hello
  • Provide an input schema matching HelloRequest
  • Provide an output schema covering both HelloResponse and RefusalResponse
  • If you use AGENT_SECRET_KEY, paste it as the agent secret in the registration flow
For more details, see: