Environment Setup
Development Environment
For development and testing, use our development endpoint:API Keys
Generate development API keys from your Dashboard. Each environment should have its own API key:- Development: For local development and testing
- Staging: For pre-production testing
- Production: For live deployments
Never commit API keys to version control. Use environment variables or secure secret management systems.
Best Practices
Event Logging Strategy
Log All Critical Events
Log All Critical Events
Ensure you’re logging all important steps in your agent’s reasoning loop:
- User inputs
- Model inputs and outputs
- Tool calls and results
- Memory operations
- Environment interactions
Use Structured Schemas
Use Structured Schemas
Always provide detailed JSON schemas for your events. This helps Fabraix better understand and analyze your agent’s behavior:
Batch Events When Possible
Batch Events When Possible
For high-throughput applications, consider batching events to reduce API calls. Events can be sent asynchronously as long as they include accurate timestamps.
Action Checks
1
Identify Critical Actions
Determine which agent actions could have real-world consequences:
- Financial transactions
- Data modifications
- External API calls
- Email/message sending
- File system operations
2
Implement Pre-execution Checks
Always check critical actions before execution:
3
Handle Rejections Gracefully
When an action is blocked, ensure your agent:
- Logs the rejection
- Informs the user appropriately
- Attempts alternative safe actions if possible by feeding the Fabraix reason back to the reasoning engine
Testing
Unit Testing
Mock Fabraix API responses for unit testing:Integration Testing
For integration testing, use our sandbox environment:- Request sandbox access from zach@fabraix.com
- Use sandbox API keys for testing
- Sandbox data is isolated and can be reset on demand
Error Handling
Common Error Codes
| Status Code | Description | Solution |
|---|---|---|
| 400 | Bad Request | Check your request format and required fields |
| 401 | Unauthorized | Verify your API key is correct and active |
| 403 | Forbidden | Check API key permissions |
| 404 | Not Found | Verify the endpoint URL and trace_id |
| 429 | Rate Limited | Implement exponential backoff |
| 500 | Server Error | Retry with exponential backoff |
Retry Strategy
Implement exponential backoff for transient errors:Monitoring
Metrics to Track
Monitor these key metrics in production:Event Volume
Track event submission rates and patterns
Action Blocks
Monitor blocked action rates and reasons
API Latency
Track response times for critical endpoints
Error Rates
Monitor API errors and failures
Logging
Structure your logs for easy debugging:Support
Need help? We’re here for you:- 📧 Email: zach@fabraix.com
- 💬 Slack: Join our community
- 📖 GitHub: Report issues

