DocsPlugin System
Plugins
Plugins are reusable event handlers. Package capabilities and reuse them across agents.
Quick Start
main.py
What is a Plugin?
A plugin is a list of event handlers:
main.py
Plugin vs on_events
main.py
Built-in Plugins
| Plugin | Purpose | Docs |
|---|---|---|
| re_act | Planning + reflection (ReAct pattern) | docs |
| auto_compact | Auto-compress context at 90% — prevents hitting token limits | docs |
| subagents | Load sub-agents from AGENT.md files via task() tool | docs |
| ulw | Ultra Light Work — autonomous mode from web UI | docs |
| ui_stream | WebSocket streaming of completion events to UI | docs |
| tool_approval | Require user approval before each tool call | docs |
| shell_approval | Approve shell commands before execution | docs |
| prefer_write_tool | Encourage agent to use FileTools.write() over bash | docs |
| system_reminder | Inject system reminders into LLM context | docs |
| image_result_formatter | Format images for vision models | docs |
| eval | Task evaluation for debugging | docs |
main.py
Writing Custom Plugins
Simple example - log each tool execution:
main.py
For more complex plugins, see Events for available event hooks.
Reusing Plugins
main.py
