Skip to main content
The Playground App is used to serve Agents, Teams and Workflows using a FastAPI server with several endpoints to manage and interact with Agents, Workflows, and Teams on the Agno Playground.

Example Usage

Create an agent, and serve it with Playground:
To run:
  1. Ensure your PostgreSQL server is running and accessible via the db_url.
  2. Set the OPENAI_API_KEY environment variable.
  3. The Playground UI will be available at http://localhost:7777. API docs (if enabled in settings) are typically at http://localhost:7777/docs.
  4. Use playground with Agent Playground .

Core Components

  • Playground: Wraps Agno agents, teams, or workflows in an API.
  • Playground.serve: Serves the Playground FastAPI app using Uvicorn.
The Playground class is the main entry point for creating Agno Playground applications. It allows you to easily expose your agents, teams, and workflows through a web interface with Agent Playground or Agent UI.

Playground Class

Initialization Parameters

Provide at least one of agents, teams, or workflows.

Key Methods

Endpoints

Endpoints are available at the specified prefix (default /v1) combined with the playground router’s prefix (/playground). For example, the status endpoint is typically /v1/playground/status.

Parameters