ConnectOnionConnectOnion
DocsUseful Tools

Useful Tools

Pre-built tools from connectonion.useful_tools

Quick Usage

main.py
1from connectonion import Agent 2from connectonion.useful_tools import gmail, memory, web_fetch 3 4agent = Agent( 5 "assistant", 6 tools=[gmail.search, gmail.send, memory.remember, web_fetch.fetch] 7) 8 9agent.input("Search my emails for invoices from last week")

Memory & Storage

Persistent memory and knowledge storage

Web

Fetch and interact with web content

Productivity

Task management and productivity tools

Customizing Built-in Tools

Need to modify a built-in tool? Copy it to your project:

code
1# Copy a tool to your project 2co copy shell 3 4# Copy multiple tools 5co copy shell memory gmail
Python REPL
Interactive
✓ Copied: ./tools/shell.py
✓ Copied: ./tools/memory.py
✓ Copied: ./tools/gmail.py

Then import from your local copy and customize:

main.py
1# Before (from package) 2from connectonion import Shell 3 4# After (from your copy) 5from tools.shell import Shell # Customize freely!

See co copy for full details.

Building Custom Tools

Any Python function can be a tool. Just pass it to the Agent:

main.py
1def my_custom_tool(query: str) -> str: 2 """Search my database for relevant information.""" 3 return database.search(query) 4 5agent = Agent("assistant", tools=[my_custom_tool])

Learn more in the Tools documentation.