Skip to main content

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

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
Always provide detailed JSON schemas for your events. This helps Fabraix better understand and analyze your agent’s behavior:
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:
  1. Request sandbox access from founders@fabraix.com
  2. Use sandbox API keys for testing
  3. 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: