How camel-ai/owl works
Purpose and Entry Points
OWL is a Python framework for real-world task automation through collaborating LLM agents, built on the external CAMEL-AI framework. Primary CLI examples construct and run an agent “society”; the local Gradio UI exposes the same workflow in English, Chinese, and Japanese.
• examples/run.py
• owl/webapp.py
• owl/webapp_zh.py
Workforce Orchestration
The core execution model is enhanced role-playing: agents exchange messages, select tools, process results, and converge on an answer plus chat history/token usage. The implementation is thin in this repository and delegates foundational agent, model, and toolkit behavior to the installed CAMEL dependency.
• owl/utils/enhanced_role_playing.py
• examples/run.py
• pyproject.toml
Task Input and Document Boundary
User tasks may include local file paths. Document utilities provide the repository-local adaptation layer for extracting or preparing document content, while tool selection and model-driven invocation remain CAMEL responsibilities.
• owl/utils/document_toolkit.py
• owl/utils/common.py
• examples/run.py
Tool-Enabled Execution
Agents operate through configured toolkits: search, browser automation, multimodal analysis, document parsing, code execution, filesystem writing, and MCP services. Tool calls cross the main trust/runtime boundary: local subprocesses and browsers, remote search/content providers, and optional MCP servers.
• examples/run.py
• community_usecase/qwen3_mcp/mcp_sse_config.json
• community_usecase/Puppeteer MCP/mcp_servers_config.json
Model and External-Service Integration
The framework requires tool-calling LLMs and uses environment-provided credentials. It supports OpenAI and other CAMEL-supported model backends; task capabilities can additionally depend on OpenAI audio services, search engines, Playwright/browser channels, Node.js MCP services, and remote SSE MCP endpoints.
• owl/.env_template
• examples/run_claude.py
• examples/run_gemini.py
Web Interaction Surface
The web applications are local Gradio front ends for model selection, environment configuration, chat submission, and task history. They are alternate entry points rather than a separate server-side product; configured model APIs are the principal external data egress.
• owl/webapp.py
• owl/webapp_jp.py
• owl/webapp_backup.py
Deployment and Runtime
Supported runtime is Python 3.10–3.12, installed via package metadata or requirements. Docker Compose packages the environment, including browser-oriented execution requirements; Playwright may need OS dependencies and virtual display support.
• pyproject.toml
• requirements.txt
• .container/docker-compose.yml
• .container/Dockerfile
Extensions and Reference Implementations
community_usecase/ contains independent vertical applications and MCP demonstrations, not core OWL runtime modules. They illustrate how the orchestration/tool boundary is reused for domain workflows such as investment analysis, interview preparation, and document/resume processing.
• community_usecase/a_share_investment_agent_camel/src/main.py
• community_usecase/stock-analysis/run.py
• community_usecase/OWL Interview Preparation Assistant/main.py
Components 19
Entry Points
- CLI society runner · Builds and runs an agent society.
examples/run.py - Gradio web UI · Provides model configuration, chat submission, and history.
owl/webapp.py - Chinese web UI
owl/webapp_zh.py - Japanese web UI
owl/webapp_jp.py
Core Runtime
- Enhanced role playing · Coordinates agent messages, tool results, answer, history, and token usage.
owl/utils/enhanced_role_playing.py - Document utilities · Prepares local task documents for the agent workflow.
owl/utils/document_toolkit.py - Common utilities
owl/utils/common.py - CAMEL-AI · Supplies foundational agents, models, tool selection, and toolkit behavior.
pyproject.toml
Tool Boundary
- Configured toolkits · Search, browser, multimodal, parsing, code, and filesystem capabilities.
examples/run.py - Local execution · Code execution, filesystem writes, and browser automation run locally.
- Remote content services · Search, browser content, and model-provider APIs receive configured requests.
- MCP services · Optional Node.js and remote SSE tool integrations.
community_usecase/qwen3_mcp/mcp_sse_config.json - Puppeteer MCP config
community_usecase/Puppeteer MCP/mcp_servers_config.json
Platform & Extensions
- Environment credentials · Provides API keys and service settings.
owl/.env_template - LLM backends · Tool-calling models are selected through CAMEL-supported providers.
examples/run_claude.py - Gemini runner
examples/run_gemini.py - Container runtime · Packages Python and browser-oriented execution dependencies.
.container/docker-compose.yml - Container image
.container/Dockerfile - Community use cases · Reference vertical workflows outside the core OWL runtime.
community_usecase/a_share_investment_agent_camel/src/main.py
Connections 18
- CLI society runner → Enhanced role playing: starts
- Gradio web UI → Enhanced role playing: submits tasks
- Chinese web UI → Enhanced role playing: submits tasks
- Japanese web UI → Enhanced role playing: submits tasks
- CLI society runner → Document utilities: accepts file tasks
- Document utilities → Common utilities: uses
- Enhanced role playing → CAMEL-AI: delegates agent runtime
- Enhanced role playing → Configured toolkits: executes tool calls
- Configured toolkits → Local execution: runs locally
- Configured toolkits → Remote content services: calls
- Configured toolkits → MCP services: connects optionally
- Puppeteer MCP config → MCP services: configures
- CAMEL-AI → LLM backends: selects
- Environment credentials → LLM backends: authenticates
- Gemini runner → LLM backends: demonstrates
- Container runtime → Container image: builds from
- Container runtime → CLI society runner: runs
- Community use cases → Enhanced role playing: reuses orchestration pattern