Skip to main content

Custom Runners

Create custom runners to execute tests against any AI system by implementing the BaseRunner interface.

BaseRunner Interface

Example: LLM Runner

A runner for any LangChain-compatible model:

Usage

Example: REST API Runner

A runner for any REST API:

Example: Mock Runner

For testing without external calls:

Parallel Execution

For faster execution with many batches:

Best Practices

Always return a valid batch even on failure:
Measure time for performance analysis:
Make network calls async for efficiency:
Respect API rate limits:

Next Steps

Storage

Save and load results

Examples

See complete examples