Controller Setup Guide
This guide walks you through customizing your Supervaizer controller step by step.
Overview
This step-by-step guide uses the EmailAIAgent as an 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 the EmailAIAgent.
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 duplicate the main file of the script and create an adapted version where all methods are called with the expected parameters. This is what we have done in the sv_main.py file.
from supervaizer import AgentMethod
job_start = AgentMethod(
name="start", # This is required
method="sv_main.process_email_workflow", # Path to the main function in dotted notation.
params={}, # If default parameters must be passed 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="email_agent.jobs.stop", # Initial deployment does not require this method to do anything
is_async=False,
)
job_status = AgentMethod(
name="status", # Must be present
method="email_agent.jobs.status", # Initial deployment does not require this method to do anything
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 / ACP 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 supervaizor_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?
- Return to the Quickstart to continue with configuration and deployment
- Check the Model Reference for detailed field specifications
- Explore API Reference for advanced usage