Open-source AI agent
Run your own general-purpose agent from your terminal.
OpenManus is an open-source Python agent framework from FoundationAgents. You install it locally, connect an LLM through config/config.toml, then give the agent a task from the terminal.
The official README currently recommends Python 3.12, uv for dependency management, optional Playwright for browser automation, and python main.py as the main way to start.
What you are setting up
python run_mcp.py when you want tool-server style workflows.python run_flow.py, including an optional data analysis agent.Best beginner setup
- Install Python 3.12, Git, and a terminal you are comfortable using.
- Clone OpenManus from GitHub.
- Create a virtual environment with
uv. - Install dependencies from
requirements.txt. - Copy
config/config.example.tomltoconfig/config.toml. - Choose one model backend: Ollama, Claude, or OpenAI.
- Run
python main.pyand type a small test task.
Windows install
- Install Git for Windows.
- Install Python 3.12 and enable the option that adds Python to PATH.
- Open PowerShell and confirm the tools work.
git --version
python --version
py --version
- Install
uv.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- Close and reopen PowerShell, then clone and install OpenManus.
git clone https://github.com/FoundationAgents/OpenManus.git
cd OpenManus
uv venv --python 3.12
.\.venv\Scripts\activate
uv pip install -r requirements.txt
If PowerShell blocks script activation, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned, open a fresh terminal, and activate the environment again.
macOS install
- Install Homebrew if you do not already have it.
- Install Python 3.12 and Git.
brew install python@3.12 git
- Install
uv.
curl -LsSf https://astral.sh/uv/install.sh | sh
- Open a new Terminal window, then clone and install OpenManus.
git clone https://github.com/FoundationAgents/OpenManus.git
cd OpenManus
uv venv --python 3.12
source .venv/bin/activate
uv pip install -r requirements.txt
Conda install option
The OpenManus README also documents a conda path. Use this if your machine already uses Anaconda or Miniconda.
conda create -n open_manus python=3.12
conda activate open_manus
git clone https://github.com/FoundationAgents/OpenManus.git
cd OpenManus
pip install -r requirements.txt
Enable browser automation
OpenManus can use browser automation for web tasks. Install the Playwright browser package after dependencies finish.
playwright install
You can also set browser options in config/config.toml, including headless mode, a Chrome executable path, a WebSocket URL, a CDP URL, or proxy settings.
[browser]
headless = false
disable_security = true
chrome_instance_path = ""
cdp_url = ""
Create the config file
OpenManus reads model settings from config/config.toml. Start by copying the example file.
# macOS or Linux
cp config/config.example.toml config/config.toml
# Windows PowerShell
Copy-Item config\config.example.toml config\config.toml
Keep real API keys out of screenshots, Git commits, and shared zip files. If you test multiple providers, change one provider block at a time and restart OpenManus after each change.
Power OpenManus with Ollama
- Install Ollama for Windows or macOS.
- Pull a model that can follow tool instructions well.
- Confirm Ollama is listening locally.
ollama pull llama3.2
ollama list
ollama serve
Then edit config/config.toml like this:
[llm]
api_type = "ollama"
model = "llama3.2"
base_url = "http://localhost:11434/v1"
api_key = "ollama"
max_tokens = 4096
temperature = 0.0
For vision tasks, use a vision-capable local model and add an [llm.vision] section with the same Ollama base URL. Local models are best for private drafting, simple browsing, and experiments; larger hosted models usually handle long, tool-heavy tasks more reliably.
Power OpenManus with Claude
The OpenManus example config includes Claude-style settings. Put your Anthropic API key into config/config.toml and use a model available to your account.
[llm]
model = "claude-3-7-sonnet-20250219"
base_url = "https://api.anthropic.com/v1/"
api_key = "YOUR_ANTHROPIC_API_KEY"
max_tokens = 8192
temperature = 0.0
[llm.vision]
model = "claude-3-7-sonnet-20250219"
base_url = "https://api.anthropic.com/v1/"
api_key = "YOUR_ANTHROPIC_API_KEY"
max_tokens = 8192
temperature = 0.0
Claude is a strong choice when the task needs planning, careful writing, long-context reasoning, or safer browser decisions. If a model name changes, check the Claude models page and replace the model value only.
Power OpenManus with OpenAI or Codex
OpenManus does not run inside the Codex desktop app. The clean connection is to use an OpenAI API model in OpenManus, then use Codex separately to edit, inspect, and improve the OpenManus project files.
[llm]
model = "YOUR_OPENAI_MODEL"
base_url = "https://api.openai.com/v1"
api_key = "YOUR_OPENAI_API_KEY"
max_tokens = 4096
temperature = 0.0
python main.py, uses browser tools, reads pages, and executes configured workflows.If you use a local or hosted provider that exposes an OpenAI-compatible endpoint, set base_url, model, and api_key to that provider's values.
Run your first task
- Activate the virtual environment.
- Confirm
config/config.tomlhas one working model provider. - Start OpenManus.
python main.py
Start with a small prompt so you can verify the model, tools, and terminal output before asking for a long workflow.
Read the homepage of example.com and summarize what the site does.
Use MCP mode
The README includes an MCP tool version. Use it when you want OpenManus to work through Model Context Protocol tooling instead of only the normal terminal agent path.
python run_mcp.py
The config example points MCP at a default server module, and the project also reads optional MCP server settings from config/mcp.json. Add external tool servers only after the base agent runs correctly.
Use run-flow mode
OpenManus also includes an unstable multi-agent path. Turn on the data analysis agent when you want spreadsheet, data, chart, or visualization help.
[runflow]
use_data_analysis_agent = true
python run_flow.py
Treat this mode as experimental. Use it after the normal python main.py workflow is already working on your machine.
Practical use cases
Final checklist
- Python 3.12 is installed.
- Git works from the terminal.
- The virtual environment is activated.
uv pip install -r requirements.txtcompleted.config/config.tomlexists.- One model provider is configured and reachable.
playwright installran if you want browser tasks.python main.pystarts and accepts a task.
Troubleshooting
uv venv --python 3.12.config/config.example.toml to config/config.toml from inside the OpenManus folder.ollama list, confirm the model name matches the config, and make sure the base URL ends with /v1.playwright install, then check any custom Chrome path, CDP URL, or proxy setting in the browser config.