AI agents shouldn't need 500 lines of boilerplate
v0.1.2 Production ReadyConnectOnion
The simplest AI agent framework
Ship in 5 minutes, not 5 days
Terminal
$pip install connectonion
ConnectOnion Philosophy
Keep simple things simple
Make complicated things possible
How It Works
It's just this simple:
Agent =Markdown + Functions
Markdown
your prompt
+
Functions
your tools
=
Agent
AI assistant
Markdown
prompt
+
Functions
tools
=
Agent
AI
Complete Example
This is all the code you need:
main.py
Python REPL
Interactive
See the Difference
Same AI agent, different approach
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.
AI-Powered Development
Vibe Coding Now
Copy our docs once. Your AI assistant writes perfect ConnectOnion code forever.
Claude Code
Cursor
GitHub Copilot
ChatGPT
One click • Full context • Start immediately
1
Copy Documentation
Click the button above
2
Paste to Your AI
Any AI coding assistant
3
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 History
Every interaction saved
Professional CLI
$ co init
✓ Project ready in 5 seconds
- Project templates
- Environment management
- Best practices built-in
@xray Debugging
@xray
def process(data):
See everything
- Real-time insights
- Iteration tracking
- Performance metrics