ConnectOnionConnectOnion
DocsUseful Plugins

Useful Plugins

Built-in

Pre-built plugins from connectonion.useful_plugins

What is a Plugin?

A plugin is a reusable list of event handlers. Use plugins=[...] to add pre-packaged functionality to any agent.

main.py
1from connectonion import Agent 2from connectonion.useful_plugins import re_act, image_result_formatter 3 4# Combine multiple plugins 5agent = Agent( 6 "assistant", 7 tools=[search, screenshot], 8 plugins=[re_act, image_result_formatter] 9)

Learn how to build custom plugins in the Plugin System documentation.

ReAct Pattern

re_act

Implements Reason + Act pattern with planning before action and reflection after tool execution

Events used:
after_user_input (plan)after_tools (reflect)
Usage
from connectonion.useful_plugins import re_act

agent = Agent("assistant", tools=[search], plugins=[re_act])

Code Evaluation

eval

Safe code evaluation and execution in a sandboxed environment

Events used:
after_tools
Usage
from connectonion.useful_plugins import eval

agent = Agent("assistant", tools=[generate_code], plugins=[eval])

Image Result Formatter

image_result_formatter

Automatically formats base64 images in tool results for vision models (GPT-4o, etc.)

Events used:
after_each_tool
Usage
from connectonion.useful_plugins import image_result_formatter

agent = Agent("assistant", tools=[screenshot], plugins=[image_result_formatter])

Gmail Plugin

gmail_plugin

Pre-configured event handlers for Gmail integration workflows

Events used:
after_user_inputafter_tools
Usage
from connectonion.useful_plugins import gmail_plugin

agent = Agent("email_assistant", plugins=[gmail_plugin])

Calendar Plugin

calendar_plugin

Pre-configured event handlers for calendar management workflows

Events used:
after_user_inputafter_tools
Usage
from connectonion.useful_plugins import calendar_plugin

agent = Agent("scheduler", plugins=[calendar_plugin])

Shell Approval

shell_approval

Requires user confirmation before executing shell commands for safety

Events used:
before_each_tool
Usage
from connectonion.useful_plugins import shell_approval

agent = Agent("devops", tools=[run_command], plugins=[shell_approval])

Combining Plugins

Plugins can be combined for powerful agent behaviors:

main.py
1from connectonion import Agent 2from connectonion.useful_plugins import ( 3 re_act, # Planning + Reflection 4 image_result_formatter, # Vision support 5 shell_approval # Safety for shell commands 6) 7 8agent = Agent( 9 "devops_assistant", 10 tools=[run_command, screenshot, analyze], 11 plugins=[re_act, image_result_formatter, shell_approval] 12) 13 14# Now the agent will: 15# 1. Plan before acting (re_act) 16# 2. Format images for vision models (image_result_formatter) 17# 3. Ask for approval before shell commands (shell_approval) 18# 4. Reflect after tool execution (re_act)

Build Your Own Plugin

Learn how to create custom plugins using the event system

Plugin System Docs