Skip to main content

Controller Setup Guide

This guide walks you through customizing your Supervaizer controller step by step.

Overview

info

This step-by-step guide uses the Hello World Agent as a reference example.

See the Quickstart guide for installation instructions.

After running supervaizer scaffold, you'll have a template file to customize. This guide shows you how to:

Define agent parameters: ParameterSetup()

Define agent methods: AgentMethod()

Define the fields of the AgentMethods: AgentMethodField()

Declare the agent: Agent()

Define the account: Account()

Setup the server: Server()

note

Open supervaizer_control_example.py and adapt the content to your agent.

1. Define agent parameters

Use Parameter / ParametersSetup to declare what the agent needs. These show up in Supervaize UI and can be marked as env or secret.

Map Parameters
loading...

📖 See the model references

Parameter Documentation

ParameterSetup Documentation

2. Define agent methods

Point Supervaizer to your agent's functions.

tip

It usually saves time to create a wrapper module where your agent's methods are called with the expected parameters.

Methods: wire your agent's functions
from supervaizer import AgentMethod

job_start = AgentMethod(
name="start", # This is required
method="agent_simple.job_start", # Path to the main function in dotted notation
params={}, # Default parameters to pass to the function
is_async=False, # Only use sync methods for the moment
fields=[] # Defined below
)

See below for definition of fields

Additional required methods
job_stop = AgentMethod(
name="stop", # Must be present
method="agent_simple.job_stop",
is_async=False,
)

job_status = AgentMethod(
name="status", # Must be present
method="agent_simple.job_status",
is_async=False,
)

📖 See the model reference

ParameterModel Documentation

3. Define the fields of the AgentMethods

The fields parameter defines the user input form that will be displayed in the Supervaize UI. Each field specifies what data users need to provide when calling your agent method.

Field setup for the "Start" method

Fields of Start AgentMethod
loading...

📖 See the model reference

AgentMethodField Documentation

4. Declare the agent

The Agent class defines your agent's metadata and capabilities. This is where you specify what your agent does, who maintains it, and how it can be discovered.

Agent definition
loading...

📖 See the model reference

Agent Documentation

5.Setup the Supervaize Account and configure your Environment variables

info

This step is not needed to run the supervaizer as an A2A server only. See Protocol support

Create your developer account on the Supervaize platform.

Create your API Key and collect your environment variables.

See the Quickstart guide to setup the environment variables

Account definition
loading...

📖 See the model reference

Account Documentation

6. Setup the Server

Config

The Server class wraps all the defined components together.

At the minimum, the server requires at least one agent to be defined and the supervisor account (we are using Supervaize as the supervisor).

Server definition
loading...
Important

Note that if supervisor_account is provided, the A2A protocol is automatically activated

📖 See the model reference

Server Documentation

Server launch

Server launch
loading...

See Server Start 🚀 for CLI instructions

What's next?