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
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 founders@fabraix.com
- Use sandbox API keys for testing
- Sandbox data is isolated and can be reset on demand
Error Handling
Common Error Codes
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: founders@fabraix.com
- π¬ Discord: Join our community
- π GitHub: Report issues