Deploying Agno AI Agents on Render.com (Without the Hassle)

Deploying AI agents as APIs has always felt a bit daunting to me. Between wrangling Docker, configuring databases, and making sure everything talks to each other, it’s easy to get lost in the weeds.

So when I stumbled across Ashpreet Bedi’s tweet about the Agno Agent API, promising a minimal, open-source setup with FastAPI and Postgres, I knew I had to give it a try.
Spoiler: It worked, and it was way easier than I expected. Here’s how I did it—and how you can too, without hitting the snags I did.

I’ve tried a few agent frameworks before, but deployment was always the sticking point. Either the setup was too complex, or the documentation left me guessing. Agno’s approach is refreshingly simple: FastAPI for the API, PostgreSQL for storage packed with Docker, and a clean, well-documented repo.

Step 1: Cloning the Repo

First things first, I cloned the repo:
git clone https://github.com/agno-agi/agent-api.git
cd agent-api

The README is super clear, so I didn’t have to hunt around for what to do next.

Step 2: Setting Up on Render.com

I wanted to deploy this in the cloud, so I chose Render.com for its simplicity and managed Postgres support.

Database Setup

  • I created a new PostgreSQL instance on Render.
  • Grabbed the connection details (host, port, user, password, database name).
    Postgres DB Settings in Render
    PostgresDB on Render with all the connection details

     

Web Service Setup

  • Created a new Web Service on Render, pointing to my Docker image (built from the repo, see step 3).
  • Set the following environment variables in the Render dashboard:
    • OPENAI_API_KEY
    • PORT (set to 8000)
    • DB_HOSTDB_PORTDB_USERDB_PASSDB_DATABASE (from my Render Postgres instance)
Tip:
If you forget to set any of the DB variables, the app will crash with a cryptic error about the port being None. Double-check these!

Step 3: Building and Deploying

Locally, I tested everything with:
docker compose up -d

For Render, I needed to build and push the Docker image to Docker Hub.

Before building the Docker image, I edited the scripts/build-image.shfile to set my Docker image name and tag:

IMAGE_NAME="[YOUR DOCKER HUB USER NAME]/[YOUR DOCKER HUB REPO NAME]"
IMAGE_TAG="v1.0.0"
This ensures the image is tagged correctly and pushed to my Docker Hub account.
Then, I built and pushed the Docker image with:
./scripts/build_image.sh

Then, I pointed my Render Web Service to the new image. If you change your agent code, just rebuild and push the image, and redeploy on Render (you can also configure Render to redeploy automatically on every image update).

Step 4: First Run—And a Gotcha

My first deploy didn’t work. Render kept saying “No open ports detected.”
Turns out, the default Dockerfile entrypoint just prints “Hello World!” and sleeps. Locally, docker-compose overrides this, but on Render, you need to set the Docker start command to:
Setting the start command on Render
Setting the Docker start command
uvicorn api.main:app --host 0.0.0.0 --port 8000

Step 5: Success! 

With the service running, I could access the FastAPI docs at https://<my-service>.onrender.com/docs.

Connecting to the Agno Playground was as simple as adding my endpoint:

Deploying agents used to be a pain, but this setup made it genuinely easy.