Skip to main content

Module plugin

Module plugin 

Source
Available on crate feature plugin only.
Expand description

Plugin system for extending agent behavior.

Extensible callback architecture for agent lifecycle hooks:

  • Plugin registration and discovery
  • Before/after hooks for agent operations

Available with feature: plugin

Structs§

Plugin
A Plugin bundles related callbacks for extending agent behavior.
PluginBuilder
Builder for creating plugins with a fluent API.
PluginConfig
Configuration for creating a Plugin.
PluginManager
Manages a collection of plugins and coordinates callback execution.
PluginManagerConfig
Configuration for the PluginManager.

Functions§

collect_metrics
Helper to create a metrics collection callback.
log_events
Helper to create a simple logging callback for events.
log_user_messages
Helper to create a simple logging callback for user messages.

Type Aliases§

AfterRunCallback
Callback invoked after the agent run completes.
BeforeRunCallback
Callback invoked before the agent run starts.
OnEventCallback
Callback invoked for each event generated by the agent.
OnModelErrorCallback
Callback invoked when a model error occurs.
OnToolErrorCallback
Callback invoked when a tool execution fails (after retries are exhausted).
OnUserMessageCallback
Callback invoked when a user message is received.