OpenManus Installation and Usage Guide
- OpenManus repository on GitHub.
- Install uvicorn for running the FastAPI server.
1$ curl -LsSf https://astral.sh/uv/install.sh | sh
2uv -h
3uv -V
Essential uv Commands
| Category | Command | Description |
|---|---|---|
| Environments | uv venv | Creates a new virtual environment in the .venv folder. |
| source .venv/bin/activate | Activates the environment (macOS/Linux). | |
| .venv\Scripts\activate | Activates the environment (Windows). | |
| deactivate | Exits the currently active environment. | |
| Project Management | uv init | Sets up a new project with a pyproject.toml file. |
uv add <package> | Adds a dependency and automatically updates the environment. | |
| uv sync | Synchronises the environment with the lockfile (installs/removes). | |
uv run <script> | Runs a script without needing to manually activate the env. | |
| Pip Interface | uv pip install -r reqs.txt | Fast alternative to pip install for existing requirement files. |
| uv pip tree | Displays a visual tree of all installed dependencies. | |
| Python Versions | uv python list | Shows available Python versions you can install. |
| uv python install 3.12 | Downloads and installs a specific Python version automatically. |
- Clone the OpenManus repository and navigate to the project directory.
1git clone https://github.com/FoundationAgents/OpenManus.git
2cd OpenManus
- Install the required dependencies using pip.
1uv pip install -r requirements.txt
Configure toml file
OpenManus uses a config.toml file to specify the LLMs and their configurations. You can create this file in the root directory of the project.
1# This configuration is for local LLMs Ollama and qwen2.5
2
3# OpenManus configuration - config/config.toml
4
5[llm]
6# Provider type for OpenManus: use "ollama" for local Ollama
7api_type = "ollama"
8# Base URL for the Ollama OpenAI-compatible API (must include /v1)
9base_url = "http://localhost:11434/v1"
10# Local Ollama does not require an API key
11api_key = "ollama"
12# Default model for code/text tasks
13model = "qwen2.5-coder"
14# Generation defaults
15max_tokens = 4096
16temperature = 0.0
17
18[llm.vision]
19# Vision model for screenshot/image analysis tasks
20api_type = "ollama"
21base_url = "http://localhost:11434/v1"
22api_key = "ollama"
23model = "llama3.2-vision"
24max_tokens = 4096
25temperature = 0.0
- Once installed and configured correctly, it can be run with
python main.py. - There is no web UI, like Vscode Copilot Chat — you interact with it purely through the terminal. You can provide prompts directly as command-line arguments.
Issues Installing OpenManus
requirements.txtdoes not work, needs corrections to include missing packages and fix names. Following fixes were applied on 2026-05-10:
1aiofiles~=24.1.0
2docker~=7.1.0
3mcp~=1.5.0
4boto3~=1.37.18
5huggingface-hub~=0.29.2
6# --- OpenManus requirements (2026-05-10) ---
7# The following block is the correct set of requirements for OpenManus, matching setup.py and avoiding dependency conflicts.
8pydantic~=2.10.4
9openai>=1.58.1,<1.67.0
10tenacity~=9.0.0
11pyyaml~=6.0.2
12loguru~=0.7.3
13numpy
14datasets>=3.2,<3.5
15html2text~=2024.2.26
16gymnasium>=1.0,<1.2
17pillow>=10.4,<11.2
18browsergym~=0.13.3
19uvicorn~=0.34.0
20unidiff~=0.7.5
21browser-use~=0.1.40
22googlesearch-python~=1.3.0
23aiofiles~=24.1.0
24pydantic_core>=2.27.2,<2.28.0
25colorama~=0.4.6
26structlog~=25.5.0
27tiktoken~=0.9.0
28baidusearch~=1.0.3
29duckduckgo_search~=7.5.3
30daytona-sdk
31
32# --- Optional/extra packages (uncomment if needed) ---
33# fastapi~=0.115.11
34# tiktoken~=0.9.0
35# playwright~=1.51.0
36# docker~=7.1.0
37# pytest~=8.3.5
38# pytest-asyncio~=0.25.3
39# mcp~=1.5.0
40# httpx>=0.27.0
41# tomli>=2.0.0
42# boto3~=1.37.18
43# requests~=2.32.3
44# beautifulsoup4~=4.13.3
45# crawl4ai~=0.6.3
46# baidusearch~=1.0.3
47# duckduckgo_search~=7.5.3
48# huggingface-hub~=0.29.2
49# setuptools~=75.8.0
50
51# --- Previous requirements (commented out for reference) ---
52# pydantic~=2.10.6
53# openai~=1.66.3
54# tenacity~=9.0.0
55# pyyaml~=6.0.2
56# loguru~=0.7.3
57# numpy
58# datasets~=3.4.1
59# fastapi~=0.115.11
60# tiktoken~=0.9.0
61# html2text~=2024.2.26
62# gymnasium~=1.1.1
63# pillow~=11.1.0
64# browsergym~=0.13.3
65# uvicorn~=0.34.0
66# unidiff~=0.7.5
67# browser-use~=0.1.40
68# googlesearch-python~=1.3.0
69# baidusearch~=1.0.3
70# duckduckgo_search~=7.5.3
71# aiofiles~=24.1.0
72# pydantic_core~=2.27.2
73# colorama~=0.4.6
74# playwright~=1.51.0
75# docker~=7.1.0
76# pytest~=8.3.5
77# pytest-asyncio~=0.25.3
78# mcp~=1.5.0
79# httpx>=0.27.0
80# tomli>=2.0.0
81# boto3~=1.37.18
82# requests~=2.32.3
83# beautifulsoup4~=4.13.3
84# crawl4ai~=0.6.3
85# huggingface-hub~=0.29.2
86# setuptools~=75.8.0
Issue with installed packages
ModuleNotFoundError: No module named 'structlog'— fixed by addingstructlog~=25.5.0to requirements and installing it.ModuleNotFoundError: No module named 'tiktoken'— fixed by addingtiktoken~=0.9.0to requirements and installing it.ModuleNotFoundError: No module named 'baidusearch'— fixed by addingbaidusearch~=1.0.3to requirements and installing it.ModuleNotFoundError: No module named 'duckduckgo_search'— fixed by addingduckduckgo_search~=7.5.3to requirements and installing it.ModuleNotFoundError: No module named 'daytona'— fixed by addingdaytona-sdkto requirements and installing it.
OpenManus Setup — Full Summary
Environment
- OS: Ubuntu Linux
- Python: 3.12.3 (via
uv venv --python 3.12) - Package manager: uv 0.11.12
- LLM: Ollama running
qwen2.5-coderlocally
Issues Found & Fixes Applied
1. daytona_api_key required field crash
Error:
1pydantic_core.ValidationError: 1 validation error for DaytonaSettings
2daytona_api_key — Field required
Cause: DaytonaSettings.daytona_api_key was a required str. Even when no [daytona] section existed in config, a bare DaytonaSettings() was instantiated.
Fix in app/config.py:
- Changed
daytona_api_key: str→daytona_api_key: Optional[str] = None - Changed
daytona_settings = DaytonaSettings()→daytona_settings = Nonewhen the config section is absent
2. Wrong Ollama base_url in config
Cause: http://localhost:11434 is Ollama’s native API. OpenManus uses the OpenAI-compatible endpoint which requires /v1.
Fix in config/config.toml:
1base_url = "http://localhost:11434/v1" # was: http://localhost:11434
2model = "qwen2.5-coder" # was: qwen2.5
3. Missing packages not in requirements.txt
Three packages were imported by the codebase but absent from requirements:
| Package | Where used | Error |
|---|---|---|
structlog | app/logger.py | ModuleNotFoundError: No module named 'structlog' |
tiktoken | app/llm.py | ModuleNotFoundError: No module named 'tiktoken' |
baidusearch | app/tool/search/baidu_search.py | ModuleNotFoundError: No module named 'baidusearch' |
duckduckgo_search | app/tool/search/ | Would have failed next |
daytona-sdk | app/daytona/tool_base.py | ModuleNotFoundError: No module named 'daytona' |
Fix: Added all five to requirements.txt and installed them.
4. Wrong import name for Daytona SDK
Error:
1ModuleNotFoundError: No module named 'daytona'
Cause: The pip package is daytona-sdk but imports as daytona_sdk, not daytona.
Fix in app/daytona/tool_base.py and app/daytona/sandbox.py:
1# Before
2from daytona import Daytona, DaytonaConfig, Sandbox, SandboxState
3# After
4from daytona_sdk import Daytona, DaytonaConfig, Sandbox, SandboxState
5. Daytona module-level crash when not configured
Error:
1AttributeError: 'NoneType' object has no attribute 'daytona_api_key'
2# then after partial fix:
3DaytonaAuthenticationError: Authentication credentials not found
Cause: Both sandbox.py and tool_base.py construct DaytonaConfig(...) and Daytona(...) at module import time — not inside a function — so they crash immediately even if you never use Daytona.
Fix: Wrapped the initialization in both files with a None guard:
1# sandbox.py and tool_base.py
2daytona_settings = config.daytona
3if daytona_settings is not None:
4 daytona_config = DaytonaConfig(...)
5 daytona = Daytona(daytona_config)
6else:
7 daytona_config = None
8 daytona = None
Full Rebuild Steps (in order)
1# 1. Delete old broken venv
2rm -rf .venv
3
4# 2. Create fresh venv with Python 3.12 (uv downloads it if needed)
5uv venv --python 3.12 .venv
6
7# 3. Install all dependencies
8uv pip install -r requirements.txt
9
10# 4. Install Playwright Chromium + system deps
11.venv/bin/playwright install chromium --with-deps
VSCode Configuration
Added to .vscode/settings.json:
1"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
2"python.terminal.activateEnvironment": true
This ensures VSCode always uses the .venv Python 3.12 interpreter for IntelliSense, linting, and integrated terminal.
Running OpenManus
1# Interactive mode
2.venv/bin/python main.py
3
4# With a prompt directly
5.venv/bin/python main.py --prompt "your task here"
Harmless Warnings (can ignore)
UserWarning: Valid config keys have changed in V2: 'underscore_attrs_are_private' has been removed— comes from a third-party library (browser-use) using an old Pydantic V1 config style; doesn’t affect functionality.Daytona not configured, skipping Daytona initialization, expected, you don’t use Daytona.













