Running Agents in SGP
How to execute interact with agents in the SGP UI.
Introduction
Agents that are configured with YAML in SGP and are fully executed on the platform’s backend. The application logic defined in your YAML configuration determines how the agent processes inputs and produces outputs.
Live Execution While Building
As you configure your agent in YAML, you can execute it within SGP’s interface to see how it behaves. The execution output is shown in the right-hand panel, on a per-node basis. This allows you to debug and validate your agent’s flow in real time:
Outputs can be viewed either as raw JSON or in a more readable, formatted display. Toggle between these modes to best understand or debug your agent’s responses.
Providing User Inputs
In the SGP interface (below the agent configuration panels), you will be prompted to provide inputs that are designated as user_input
in the YAML config.
These inputs will be rendered in the inputs panel. You can provide them as either raw JSON or fill them in via form fields. If you do not specify user inputs or type them, you will have to use JSON inputs. Hitting submit starts an execution of the agent as a run.
Understanding Runs (Threads)
A “run” is essentially a thread of execution for your agent. You can select which run (thread) you are viewing from a dropdown menu in the top-right corner. To start a new thread, simply select “New Run” (or equivalent) from the dropdown, which creates a fresh context for your agent to process inputs.
Saving and Publishing Variants
Once you are satisfied with your agent’s configuration, save or publish it as a variant. After publishing, this variant can still be executed directly from the UI, just as before.
Monitoring Executions
Every time an agent is run (during testing or otherwise), it is recorded and can be viewed on the “Monitoring Dashboard” for your application. This provides a comprehensive view of all runs (threads) and their inputs/outputs, helping you track performance and diagnose issues.
Deploying a Variant via Chat Interface
Note that currently, deploying and using the chat UI will only work for single workflows, not for state machines. It also does not support multi-modal inputs or untyped inputs. You will have to specify user inputs with a type in the YAML to deploy a chat UI.
From the variant’s page, select “Manage Deployments.” Then enter a custom slug (a unique identifier) and choose which variant to deploy.Click “Deploy Variant”, which creates a simple web-based chat interface you can access.
Once deployed, you can visit the web app at the slug you specified. You can chat with the agent in a more intuitive, conversational format. The chat interface supports threads, user feedback, and dynamic inputs (if the agent requires more than one input per turn).