Skip to main content
You can connect an agent to other applications and services by exposing an API endpoint. Agentor makes it easy to create a production-ready server. agent.serve() returns an ordinary ASGI app running under uvicorn, so you host it the way you host any other Python service. It adds no authentication of its own.

Serve an Agent as API

Agents can be deployed as REST API server so you can query them from your applications or integrate them into your existing infrastructure. Agentor makes it easy to serve the Agents by providing a simple serve method.
To query your Agent server:

Self-Hosted Deployment

Deploy agents on your own infrastructure using Docker or Kubernetes.
Create a Dockerfile in your project:
Build and run your container:

Environment Variables

Set required environment variables for your deployment:
string
required
Your LLM provider API key (OpenAI, Anthropic, etc.)
string
Your Celesto API key for accessing managed tools and services
integer
default:"8000"
Port to run the agent server on
string
default:"INFO"
Logging level: DEBUG, INFO, WARNING, ERROR

Monitoring & Logs

Celesto Dashboard

Monitor agent performance, view logs, and track usage metrics in real-time.

Tracing

Enable tracing with CELESTO_API_KEY and inspect runs end-to-end.

Health Checks

Built-in health endpoint at /health for monitoring and load balancers.
For production deployments, we recommend setting up monitoring, logging, and auto-scaling based on your traffic patterns.
Last modified on July 30, 2026