Skip to main content
The Agent API workspace provides a simple RestAPI + database for serving agents. It contains:
  • A FastAPI server for serving Agents, Teams and Workflows.
  • A postgres database for session and vector storage.

Setup

1

Create and activate a virtual environment

2

Install Agno

3

Install uv and docker

  • Install uv for managing your python environment.
4

Export your OpenAI key

Agno is compatible with any model provider; simply update the agents in the workspace.

Create your Agent API codebase

Create your codebase using the agent-api template, give it any name you like.
This will create a folder agent-api with the following structure:

Run your Agent Api locally

cd into the agent-api folder
Start your Agent Api using the following command:
Press Enter to confirm and give a few seconds for the image to download (only the first time). Verify container status and view logs on the docker dashboard. Notes:
  • The Agents are defined in the agents folder.
  • The api routes are defined in the api folder.

Stop local workspace

Play around and stop the workspace using:

Next

Congratulations on running your Agent API locally. Next Steps: