Snowglobe SDK Integration Guide
Overview
Snowglobe is a simulation engine designed for testing and evaluating AI agents and chatbots through automated conversation generation and analysis. This guide demonstrates how to integrate Snowglobe into your continuous integration (CI) pipeline and programmatic workflows for comprehensive agent testing.Table of Contents
Prerequisites
Before integrating Snowglobe, ensure you have:- Python 3.10+ installed
- Snowglobe SDK package (
pip install snowglobe-sdk
) - Valid API credentials (API key and Organization ID) from here.
- OpenAI API key (or other supported LLM provider credentials)
- Access to a Snowglobe control plane instance
Required Dependencies
Authentication Setup
Environment Variables
Set up your credentials as environment variables or configuration constants:Client Configuration
Initialize the Snowglobe client with proper authentication headers:Core Components
1. Agent Creation
Agents represent the AI systems you want to test. Each agent requires:- Name and Description: Identifiers for your agent
- Icon: Visual representation (optional)
- Connection Info: LLM provider configuration
- System Prompt: Instructions defining the agent’s behavior
Note:
Agents utilizing a code integration viasnowglobe-connect
require a two-step setup:
- Create the agent using the Snowglobe API as shown above.
- Configure the agent in your
snowglobe-connect
deployment by mapping the agent’s ID and settings in theagents.json
file.- Run
snowglobe-connect start
. This ensures Snowglobe can route simulation traffic to your custom integration correctly.
2. Simulation Configuration
Simulations define how conversations will be generated and evaluated:CI Integration Workflow
Step 1: Create and Configure Agent
Step 2: Launch Simulation
Step 3: Monitor Simulation Progress
Step 4: Retrieve Results
Complete CI Integration Example
Error Handling
CI Pipeline Integration
Simulation States
Understanding simulation states helps with monitoring:- States 0-5: Initialization and setup
- States 6-10: Persona and topic generation
- States 11-16: Conversation generation and agent testing
- State 17+: Evaluation complete, results available
Troubleshooting
Common Issues
Authentication Errors- Verify API key and organization ID are correct
- Ensure headers are properly formatted
- Check network connectivity to control plane
- Review agent configuration for missing required fields
- Verify LLM provider API key is valid and has sufficient quota
- Check simulation parameters are within acceptable ranges
- Increase timeout duration for complex simulations
- Reduce persona count or length for faster completion