The simplest way to get started with ConnectOnion. A basic calculator agent that demonstrates:
- Creating an agent with a simple tool
- Interactive conversations
- Using both
agent.input()andllm_do()functions
# Initialize project (if not already done)
co init --template minimal
# Run the agent
python agent.pyagent.py - A minimal agent with:
- Simple calculator tool (add, subtract, multiply, divide)
- Interactive conversation loop
- Examples of both agent and direct LLM usage
# The agent can use its calculator tool
agent.input("What is 25 * 4?")
# → The calculator will compute: 100
# Direct LLM call without tools
llm_do("What is ConnectOnion?")
# → Quick response without agent overheadThe .env file is created automatically during co init. It includes:
OPENONION_API_KEY- Managed keys withco/prefix (recommended)- Or
OPENAI_API_KEY- Your own OpenAI API key
Ready for more? Try these templates:
co init --template playwright- Browser automation with Playwrightco init --template web-research- Web search and research toolsco init --template meta-agent- Multi-agent orchestration