Skip to main content
Humancheck uses an adapter pattern to support different AI frameworks. You can create custom adapters for frameworks that don’t have built-in support.

Adapter Pattern

Adapters convert framework-specific review requests into Humancheck’s universal UniversalReview format. This allows any framework to work with Humancheck.

Creating a Custom Adapter

Step 1: Create Adapter Class

Step 2: Register Adapter

Step 3: Use Adapter

Complete Example

Here’s a complete example for a hypothetical framework:

Integration Patterns

Pattern 1: Direct Integration

Pattern 2: Middleware Pattern

Pattern 3: Event-Based

Testing Your Adapter

Best Practices

  1. Follow the adapter interface: Implement all required methods from BaseAdapter
  2. Handle errors gracefully: Implement proper error handling for network and timeout issues
  3. Provide clear mappings: Document how framework fields map to universal fields
  4. Support both blocking and non-blocking: Allow users to choose their preferred pattern
  5. Test thoroughly: Write tests for conversion, blocking behavior, and error cases

Next Steps