ConnectOnion
Build AI agents in 8 lines, not 50
Copy and run to get started in 30 seconds
Framework Status (v0.3.2 - Production Ready)
Keep simple things simple
Make complicated things possible
How It Works
It's just this simple:
Agent =Markdown + FunctionsComplete Example
This is all the code you need:
See the Difference
Same AI agent, different approach
Same result, way less boilerplate
1from connectonion import Agent
2
3def calculate(expression: str) -> str:
4 return str(eval(expression))
5
6agent = Agent("You are a helpful assistant",
7 tools=[calculate])
8
9result = agent.input("What's 42 * 17?")
10print(result)Other Frameworks
~50 lines1from langchain.agents import Tool, AgentExecutor
2from langchain.agents import create_react_agent
3from langchain.llms import OpenAI
4from langchain.prompts import PromptTemplate
5from langchain.memory import ConversationBufferMemory
6from langchain.schema import SystemMessage
7import json
8
9# Define the calculation tool
10def calculate_tool(expression: str) -> str:
11 try:
12 result = eval(expression)
13 return json.dumps({"result": result})
14 except Exception as e:
15 return json.dumps({"error": str(e)})
16
17# Create tool wrapper
18tools = [
19 Tool(
20 name="Calculator",
21 func=calculate_tool,
22 description="Useful for mathematical calculations"
23 )
24]
25
26# Setup prompt template
27template = """You are a helpful assistant.
28
29{history}
30Human: {input}
31{agent_scratchpad}
32"""
33
34prompt = PromptTemplate(
35 input_variables=["history", "input", "agent_scratchpad"],
36 template=template
37)
38
39# Initialize LLM
40llm = OpenAI(temperature=0)
41
42# Setup memory
43memory = ConversationBufferMemory(
44 memory_key="history",
45 return_messages=True
46)
47
48# Create agent
49agent = create_react_agent(
50 llm=llm,
51 tools=tools,
52 prompt=prompt
53)
54
55# Create executor
56agent_executor = AgentExecutor(
57 agent=agent,
58 tools=tools,
59 memory=memory,
60 verbose=True,
61 handle_parsing_errors=True
62)
63
64# Finally use it
65result = agent_executor.invoke({"input": "What's 42 * 17?"})
66print(result["output"])ConnectOnion
8 lines1from connectonion import Agent
2
3def calculate(expression: str) -> str:
4 return str(eval(expression))
5
6agent = Agent("You are a helpful assistant",
7 tools=[calculate])
8
9result = agent.input("What's 42 * 17?")
10print(result)Same result, 85% less code
No boilerplate. No complexity. Just agents.
Vibe Coding with Claude Code
Install the Claude Code plugin and let AI write your ConnectOnion agents for you.
Free plugin โข 2-minute setup โข Start coding with AI
Copy Documentation
Click the button above
Paste to Your AI
Any AI coding assistant
Start Building
AI writes perfect code
Direct access to the authors on Discord โข Shape the framework with us
Start Simple, Ship Production-Ready
Zero setup complexity, full production capabilities
Zero Setup
Functions become tools instantly
Debug Mode
@xray shows everything
Auto Logging
Every interaction logged to .co/logs/
Professional CLI
- Project templates
- Environment management
- Best practices built-in
Interactive Debugging
NEW- Pause at breakpoints
- Python REPL access
- Test "what if" scenarios
Agents That Debug Themselves
Pause at breakpoints, inspect variables, test edge cases - all in real-time
@xray Breakpoints
Decorate any tool with @xray - agent pauses automatically. Inspect variables, context, and full execution state.
Zero Learning Curve
Arrow keys or shortcuts (c/e/q). Tips always shown. No docs needed.
Time-Travel Testing
Press e for Python REPL. Change one variable, watch entire agent behavior change. Test edge cases instantly.
Available in v0.3.2 โข Coming soon: Ask AI, View trace, Step mode
Agents That Work Together
One line to serve. One line to connect. That's all you need.
Serve an Agent
Connect to It
Zero Config
Public key is auto-generated
Web Debugger
Test agents in browser instantly
Long Tasks
Built for 20+ minute operations
