Skip to main content

Module plugin

Module plugin 

Source
Expand description

Plugin system — lifecycle hooks with control-flow capabilities.

Plugins are a superset of middleware: they can observe AND control agent execution. A plugin can deny a tool call, short-circuit with a custom response, or simply continue. The PluginManager runs plugins in order and respects the first non-Continue result.

Structs§

AllowAllPolicy
A policy engine that allows all tool calls.
ContextFilterPlugin
Plugin that filters or transforms conversation context before model calls.
DenyListPolicy
A simple policy engine that blocks specific tool names.
GlobalInstructionPlugin
Plugin that injects global instructions into every LLM request.
LoggingPlugin
Plugin that logs agent and tool lifecycle events.
PluginManager
Manages an ordered list of plugins, running them in sequence.
ReflectRetryToolPlugin
Plugin that handles tool failures by reflecting on errors.
SecurityPlugin
Plugin that enforces tool call policies via a PolicyEngine.

Enums§

PluginResult
The result of a plugin hook — controls whether execution continues.
PolicyOutcome
The outcome of a policy evaluation.

Traits§

Plugin
Plugin trait — lifecycle hooks with control-flow capabilities.
PolicyEngine
Trait for evaluating tool call policies.