Controller Setup Guide
This guide walks you through customizing your Supervaizer controller step by step.
Overview
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()
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.
loading...
📖 See the model references
2. Define agent methods
Point Supervaizer to your agent's functions.
It usually saves time to create a wrapper module where your agent's methods are called with the expected parameters.
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
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
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
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.
loading...
📖 See the model reference
5.Setup the Supervaize Account and configure your Environment variables
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
loading...
📖 See the model reference
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).
loading...
Note that if supervisor_account is provided, the A2A protocol is automatically activated
📖 See the model reference
Server launch
loading...
See Server Start 🚀 for CLI instructions
What's next?
- Learn about Application Flow Control to manage cases, track progress, and handle human input
- Return to the Quickstart to continue with configuration and deployment
- Check the Model Reference for detailed field specifications
- Explore API Reference for advanced usage