Overview
The Health Check endpoint allows UserTrace to verify that your agent is operational and ready to handle test requests. This endpoint is called before starting simulations to ensure system readiness.Endpoint
Request Headers
Authentication is not required for health check endpoints as they only provide basic status information.
Request
Simple GET request with no body required:Response Format
Overall system status. Values:
healthy, unhealthy, degradedISO 8601 timestamp when the health check was performed
Current version of your agent or API
System uptime in seconds (optional)
Status of external dependencies (optional)
System performance metrics (optional)
Response Examples
Healthy System
Degraded System
Minimal Response
Status Codes
| HTTP Status | Status Value | Description |
|---|---|---|
| 200 | healthy | System is fully operational |
| 200 | degraded | System is operational but performance is impacted |
| 503 | unhealthy | System is not operational |
Error Responses
Service Unavailable (503)
Network Issues (500)
Implementation Guidelines
Health Check Logic
Your health check should verify:- Basic Connectivity: Server is responding to requests
- Dependencies: Database, LLM services, external APIs
- Resources: Memory, CPU, disk space within acceptable limits
- Configuration: Required environment variables and settings
Response Time
- Health checks should respond within 2 seconds
- UserTrace will timeout requests after 10 seconds
- Consider caching health status for frequently called checks
Frequency
- UserTrace calls health checks before each simulation
- Implement lightweight checks that don’t impact system performance
- Avoid expensive operations in health check logic
Best Practices
- Keep it Simple: Health checks should be lightweight and fast
- Include Dependencies: Check critical external services
- Use Caching: Cache expensive dependency checks
- Return Meaningful Data: Include metrics that help diagnose issues
- Handle Failures Gracefully: Always return a response, even for partial failures
Monitoring: Consider using the health check endpoint for your own monitoring and alerting systems.