Build AI Agents in 2 lines of Python
Keep simple things simple, make complicated things possible. No boilerplate. No framework lock-in. Just Python.
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?")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 ConnectOnionBuilt-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 customizationBuilt-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 executionSkills 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)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.
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?")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
| Feature | ConnectOnion | Others |
|---|---|---|
| Tool definition | Just a function | Decorators, wrappers, classes |
| Shared state | self.field | wrapper.context, dataclass, services |
| Add ReAct | plugins=[re_act] | Planner classes, different agent types |
| Memory | Memory as tool | Sessions, services, deprecated APIs |
| Event hooks | 9 types, full access | Guardrails only, limited callbacks |
| Built-in AI programmer | co ai | None |
| Approval system | Plugin-based | Build your own |
| Free credits | $5 free | — |
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:
"Create an agent that monitors my inbox and replies to customer questions about pricing"
- ✓ Generated Gmail integration tool
- ✓ Created pricing knowledge base
- ✓ Built reply agent with context
- ✓ Added tests and error handling
- ✓ Agent deployed and running
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
$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.
What You Can Build
Functions = Tools
No wrappers. No decorators. Just functions.
Deploy Anywhere
From your laptop. No AWS needed.
Connect Agents
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
For basic agents. No boilerplate.
Production features when you need them.
Not framework code. Just Python.