Plugins Overview¶
AgentProbe supports a plugin system for extending functionality with custom evaluators, reporters, adapters, and storage backends.
Architecture¶
The plugin system has three main components:
- PluginBase --- Abstract base class that all plugins extend
- PluginRegistry --- Manages plugin registration and lookup
- PluginManager --- Orchestrates plugin lifecycle and event dispatch
PluginManager
├── PluginRegistry (stores registered plugins)
├── PluginLoader (discovers plugins from entry points and directories)
└── Event Dispatch (test_start, test_end, suite_start, suite_end)
Plugin Types¶
AgentProbe supports four plugin types:
| Type | Base Class | Purpose |
|---|---|---|
| Evaluator | EvaluatorPlugin |
Custom evaluation logic |
| Adapter | AdapterPlugin |
Custom agent framework integration |
| Reporter | ReporterPlugin |
Custom output formats |
| Storage | StoragePlugin |
Custom storage backends |
See Plugin Types for detailed API reference.
Plugin Discovery¶
Plugins are discovered from two sources:
Entry Points¶
Register plugins in your package's pyproject.toml:
File-Based Discovery¶
Point AgentProbe to directories containing plugin modules:
Plugin Lifecycle¶
Plugins receive lifecycle events:
on_load()--- Called when the plugin is loaded and registeredon_test_start(test_name)--- Called before each test executionon_test_end(test_name)--- Called after each test executionon_suite_start()--- Called before the test suite beginson_suite_end()--- Called after the test suite completeson_unload()--- Called when the plugin is unloaded
Error Isolation¶
The PluginManager catches exceptions from individual plugins during event dispatch. A failing plugin does not affect other plugins or the test execution.
Configuration¶
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
true |
Enable the plugin system |
directories |
list[str] |
[] |
Additional plugin directories |
entry_point_group |
str |
"agentprobe.plugins" |
Entry point group name |
Next Steps¶
- Creating Plugins --- Step-by-step guide
- Plugin Types --- API reference for each type