1. Prerequisites
Before setting up simulations, ensure you have:- Netra SDK installed and initialized
- Your API key configured
- An understanding of your agent’s capabilities and constraints
2. Create an Agent
Agents define what your AI system can do (abilities) and what it should avoid (constraints).Name Your Agent
Provide a descriptive name that identifies what this agent does.Example: “Customer Support Agent” or “Technical Documentation Assistant”
3. Create a Multi-Turn Dataset
Datasets define the scenarios you want to test—multi-turn conversations with specific goals.Configure Basics
- Name: “Customer Refund Scenarios” - Type: Select Multi-turn - Data Source: Add manually - Click Next
Configure Scenario
Define your simulation scenario:
Click Next
| Field | Value |
|---|---|
| Agent | Select the agent you created in Step 2 |
| Scenario Goal | ”The customer wants to get a refund for a product that arrived damaged 15 days ago” |
| Max Turns | 5 (recommended for support scenarios) |
| User Persona | Frustrated 😤 (tests patience and de-escalation) |
| Provider | OpenAI |
| Model | GPT-4.1 (for realistic user simulation) |
Add User Data & Facts
Provide context and success criteria:Simulated User Data (JSON format):Fact Checker (what the agent MUST communicate):Click Next
4. Configure Evaluators
Evaluators assess your simulations at two levels:Session-Level Evaluators
Evaluate the entire conversation:- Goal Achievement: Did the scenario objective get met?
- Fact Accuracy: Were critical facts communicated correctly?
- Conversation Quality: How good was the overall interaction?
5. Run Your First Simulation
Once your dataset is configured, trigger simulations through your agent code:Get Dataset ID
Open your dataset in the Netra dashboard and copy the Dataset ID from the top of the page.
Integrate with Your Agent
The simulation runs automatically when your agent code executes. Ensure your
agent is instrumented with Netra tracing.
6. Review Results
Check Summary Metrics
Review high-level performance: - Total scenarios run - Pass/fail rate -
Average cost and latency
Examine Conversations
Click on any scenario to view: - Conversation tab: Full turn-by-turn
dialogue - Evaluation Results tab: Turn-level and session-level scores -
Scenario Details tab: Goal, user data, and facts
What’s Next?
Simulation Overview
Learn more about the simulation framework and use cases
Create Advanced Scenarios
Build complex multi-turn scenarios with custom personas
Custom Evaluators
Create custom evaluators for your specific requirements
Agents Best Practices
Learn how to write effective abilities and constraints
Common Patterns
Testing Customer Support
- Personas: Test with Frustrated, Confused, and Neutral personas
- Evaluators: Goal Achievement, Fact Accuracy, Guideline Adherence
- Max Turns: 4-6 for typical support scenarios
Testing Technical Assistants
- Personas: Confused (needs extra clarification)
- Evaluators: Goal Achievement, Response Quality, Token Efficiency
- Max Turns: 6-8 for complex troubleshooting
Constraint Compliance Testing
- Scenarios: Create edge cases that challenge agent boundaries
- Evaluators: Guideline Adherence to catch violations
- Personas: Frustrated (more likely to push boundaries)