ConnectOnion·v0.9.0

Build AI Agents in 2 lines of Python

Keep simple things simple, make complicated things possible. No boilerplate. No framework lock-in. Just Python.

Terminalbash
$pip install connectonion
agent.pyPython 3.11
from connectonion import Agent

def get_weather(city: str) -> str:
    return f"72°F, sunny in {city}"

agent = Agent("assistant", tools=[get_weather])
agent.input("What's the weather in NYC?")
MIT LicensePython 3.9+PyPI Downloads
Beyond Code Comparison

What Other Frameworks Don't Have

These aren't about writing less code. They're capabilities other frameworks haven't built at all.

Built-in AI Programmer

An AI that knows the framework inside out

Run co ai — an AI coding assistant built with ConnectOnion that writes working agent code. Fully open-source.

co ai   # Opens chat with AI that deeply understands ConnectOnion

Built-in Frontend & Backend

Just write prompt and tools — deploy

No FastAPI backend. No React frontend. No API wiring. Framework handles it all.

# ConnectOnion:
agent = Agent("support", tools=[search, reply])
host(agent)  # Done. Frontend + backend included.

Ready-to-Use Tool Ecosystem

Import and use — no schema, no wiring

bash, Shell, FileTools, BrowserAutomation, Gmail, Outlook, Calendar, Memory, TodoList — all built-in. Need to customize? co copy takes the source.

from connectonion import bash, Gmail, Memory, TodoList
from connectonion.useful_tools import FileTools

agent = Agent("assistant", tools=[bash, Gmail(), Memory(), FileTools()])

co copy Gmail   # Copies source to your project for customization

Built-in Approval System

Safety by default, not by effort

Dangerous operations automatically trigger approval. Plugin-based — turn it off, customize it, or replace it entirely.

from connectonion.useful_plugins import shell_approval, tool_approval

agent = Agent("assistant", tools=[bash], plugins=[shell_approval])
# Shell commands now require approval before execution

Skills System

Reusable workflows with auto permission scoping

User types /commit — skill loads, git commands auto-approved, permission cleared after execution. Auto-discovers Claude Code skills.

from connectonion.useful_plugins import skills

agent = Agent("assistant", tools=[bash], plugins=[skills])

# Three-level auto-discovery:
# .co/skills/       — project-level (highest priority)
# ~/.co/skills/     — user-level
# .claude/skills/   — Claude Code compatible (auto-loaded)

Claude Code-Equivalent Plugins

Same capabilities, open to any agent

auto_compact, subagents, ulw, tool_approval — these mirror Claude Code's internal capabilities. ConnectOnion makes them available to every agent you build.

from connectonion.useful_plugins import auto_compact, subagents, ulw

agent = Agent("researcher", tools=[search], plugins=[
    auto_compact,   # Auto-compress context at 90% capacity
    subagents,      # Spawn sub-agents with independent tools
    ulw,            # Ultra Light Work — fully autonomous mode
])

Multi-Agent Trust System

Zero token cost for 90% of trust decisions

Fast Rules handle trust before LLM involvement. Blocklist, whitelist, invite codes — all resolved instantly.

agent = Agent("production", trust="careful")
# careful: whitelist → allow, unknown → ask LLM, blocked → deny

# Three presets:
# "open"    — development (allow all)
# "careful" — staging (whitelist + LLM fallback)
# "strict"  — production (whitelist only)
Why ConnectOnion

See the Difference

Same task, dramatically less code. Real comparisons against LangChain, OpenAI SDK, and Google ADK.

Type hints = automatic tool conversion. No wrappers needed.

ConnectOnion8 lines
from connectonion import Agent

def add(a: float, b: float) -> float:
    return a + b

def multiply(a: float, b: float) -> float:
    return a * b

agent = Agent("You are a calculator", tools=[add, multiply])
agent.input("What is 5 + 3, then multiply by 2?")
LangChain30+ lines
from langchain.agents import Tool, AgentExecutor, create_react_agent
from langchain_openai import ChatOpenAI
from langchain.prompts import PromptTemplate

def add(input_str: str) -> str:
    """Add two numbers. Input: 'a,b'"""
    a, b = map(float, input_str.split(','))
    return str(a + b)

tools = [
    Tool(name="add", func=add, description="Add two numbers. Input: 'a,b'"),
    Tool(name="multiply", func=multiply, description="Multiply. Input: 'a,b'"),
]

template = """You are a calculator assistant.
Available tools: {tools}
Tool names: {tool_names}
Question: {input}
{agent_scratchpad}"""

prompt = PromptTemplate.from_template(template)
llm = ChatOpenAI(model="gpt-4", temperature=0)
agent = create_react_agent(llm=llm, tools=tools, prompt=prompt)
executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
executor.invoke({"input": "What is 5 + 3, then multiply by 2?"})

Quick Comparison

FeatureConnectOnionOthers
Tool definitionJust a functionDecorators, wrappers, classes
Shared stateself.fieldwrapper.context, dataclass, services
Add ReActplugins=[re_act]Planner classes, different agent types
MemoryMemory as toolSessions, services, deprecated APIs
Event hooks9 types, full accessGuardrails only, limited callbacks
Built-in AI programmerco aiNone
Approval systemPlugin-basedBuild your own
Free credits$5 free
The Future is AI-First

AI Agents Building AI Agents

Why write code when you can describe what you want? ConnectOnion enables meta-agents that build, test, and deploy other agents.

🤔Traditional Development

  • Write boilerplate, test, debug, repeat
  • Manual tool integration for every agent
  • Hours spent on repetitive patterns
  • Human bottleneck in agent creation

AI-First with ConnectOnion

  • Describe your agent, let AI build it
  • Meta-agents generate, test, and deploy
  • Ship agents in minutes, not hours
  • AI handles the boring parts

Why AI-First Development Wins

10x Faster Development

Meta-agents generate production-ready code in minutes. What took hours now takes seconds.

Self-Improving Agents

Agents analyze their own execution, identify issues, and generate fixes automatically.

Zero Boilerplate

Focus on what you want to build, not how. AI handles imports, error handling, and best practices.

Real-World Example

Build an email automation agent using a meta-agent:

You:

"Create an agent that monitors my inbox and replies to customer questions about pricing"

Meta-Agent:
  • ✓ Generated Gmail integration tool
  • ✓ Created pricing knowledge base
  • ✓ Built reply agent with context
  • ✓ Added tests and error handling
  • ✓ Agent deployed and running
Time saved: 4 hours · Lines of code written by you: 0
Start Building AI-First

No credit card required · Free tier available

OpenOnion for macOS

Native menu bar app for managing your AI agents. Beautiful, fast, and always one click away.

Native Design

Beautiful polished UI following Apple HIG.

Live Stats

Track uptime and requests in real-time.

Full Settings

Configure models, keys, and preferences.

Quick Access

Open chat and control agents from menu bar.

Download for macOS

Fully code-signed and notarized · macOS 12+ · Universal Binary

v0.7.9 · Intel & Apple Silicon
FREE

$5 Free Credits — No API Key Needed

Get $5 free credits to try Gemini 2.5 Pro, GPT-4o, Claude, and more. Start building immediately.

model="co/gemini-2.5-pro"
Check balance: co status

What You Can Build

Functions = Tools

def search(q: str):
return results

No wrappers. No decorators. Just functions.

Deploy Anywhere

agent.serve()
# Globally accessible

From your laptop. No AWS needed.

Connect Agents

other = connect("0x...")
# Agents as tools

Build agent networks. Like the internet, but for AI.

Production Ready

Built for production from day one

Auto Log

.co/logs/

@xray

Breakpoints

Plugins

Just functions

Human Loop

Approval flows

8 lines

For basic agents. No boilerplate.

Full power

Production features when you need them.

Your code

Not framework code. Just Python.

Ready to Start?

Terminalbash
$pip install connectonion
Quick Start →

60 seconds to your first agent. No AWS. Just code.

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.