API Requirements
Your sandbox must expose an API endpoint compatible with OpenAI’s Chat Completions format, plus a health check endpoint.1. Chat Completions Endpoint
Endpoint:POST /v1/chat/completions
Request Format:
2. Health Check Endpoint
Endpoint:GET /health
Request:
Advanced Configuration
User Management (Optional)
If your agent requires user-specific contexts or session management, we can create users at the start of each simulation session. Endpoint:POST /users
Request Format:
Optional Parameters
user_id and session_id are optional in requests. If your agent doesn’t require session management, you can omit them. metadata is optional and can contain any scenario or context information your agent needs. Request with minimal parameters:Implementation Guide
1. Set Up Your Sandbox
Deploy your chat agent to a publicly accessible endpoint with HTTPS support. Required Headers:Content-Type: application/jsonAuthorization: Bearer <your-api-key>(best practice for security)
2. Test Your Endpoints
Chat Completions Test:3. Configure in UserTrace
- Add your sandbox URL in the UserTrace dashboard
- Set authentication if required (API keys, tokens)
- Enable user management if your agent needs user contexts
- Configure metadata passing for state-dependent scenarios
Error Handling
Your API should return appropriate HTTP status codes: 400 Bad Request:Best Practices
Performance
Response Optimization• Target < 5 second response times
• Support 100 RPS for parallel simulations
• Implement proper error handling
• Add request/response logging
Security
API Security• Use HTTPS endpoints only
• Implement rate limiting
• Validate all input data
Tool Calling Support
For agents that use function calling, the simulated user will send simple requests without tool definitions. Your agent must handle all tool calling internally - execute the necessary functions, get the results, and include the complete sequence of tool calls and responses in your response. The evaluator will use this information to evaluate your agent’s tool usage and decision-making. Request from Simulated User:Common Integration Patterns
- RAG Systems: Pass document context in system messages
- Multi-Agent: Route requests based on message content
- Memory Integration: Use user metadata for conversation history
- External APIs: Include tool calls for third-party integrations
Need help with integration? Our team can assist with custom requirements and complex architectures. Contact [email protected].Next Steps: Once configured, create test scenarios and run simulations to validate your agent.