Dependencies for Running OpenEnv: Complete Installation Guide

OpenEnv requires a minimal core set of Python packages including FastAPI ≥0.116, Pydantic ≥2.0, and Uvicorn ≥0.24, with optional extras available for CLI tools, web interfaces, and environment-specific integrations.

OpenEnv is a modular Python framework designed for running multi-client protocol (MCP) environments. Understanding the dependencies for running OpenEnv is essential before installation, as the package uses a deliberately lightweight core with optional extras for specific use cases. All dependency specifications are centralized in the repository's pyproject.toml file, with additional requirements isolated in individual environment subdirectories to avoid bloating the base installation.

Core Runtime Dependencies

The essential packages required for the server-side API, request handling, and MCP layer are included in the openenv[core] installation target. These dependencies are declared in the [project.dependencies] section of pyproject.toml and install automatically with the top-level package.

HTTP Framework and Data Validation

FastAPI ≥0.116 powers the OpenEnv REST API server, providing the high-performance ASGI framework that handles HTTP requests. Pydantic ≥2.0 manages data validation and settings management throughout the codebase, ensuring type safety for environment configurations and API payloads. Uvicorn ≥0.24 serves as the ASGI server that runs the FastAPI application in production environments.

Communication Protocols

Requests ≥2.25 provides client-side HTTP functionality used by utilities and test suites. Websockets ≥15.0.1 enables low-level WebSocket support for real-time communication between agents and environments. FastMCP ≥3.0 implements the Multi-Client-Protocol layer that facilitates message exchange between agents and environment instances.

Optional Dependency Groups

OpenEnv organizes additional functionality into optional extras that you can install based on your specific use case. These groups prevent unnecessary bloat when you only need specific capabilities.

CLI Extras

Installing openenv[cli] adds the Typer ≥0.9 library, which creates the ergonomic openenv command-line interface entry point defined in src/openenv/cli/__main__.py. Rich ≥13 provides pretty-printing capabilities and progress bars for terminal output. PyYAML ≥6 parses configuration files, while Hugging Face Hub ≥0.20 enables pulling model files and datasets. OpenAI ≥2.7.2 adds optional integration for ChatGPT agents, and Tomli ≥2.3 with Tomli-W ≥1.2 support reading and writing TOML configuration files.

Web UI Dependencies

The browser-based interface requires Gradio ≥4, which can be launched directly from the package to provide a visual interface for environment interaction. HTTPX ≥0.28.1 serves as an async HTTP client used by the UI components and certain environment implementations for non-blocking network requests.

Specialized Orchestration Tools

For advanced deployment scenarios, the Daytona ≥0.136.0 integration adds support for the Daytona orchestration framework. The Inspect extra brings in inspect-ai for interactive inspection and debugging of running environments.

Installation Commands

Install only the essential components if you are integrating OpenEnv into an existing application or running headless servers:

pip install "openenv[core]"

For full functionality including the command-line tool and web interface:

pip install "openenv[all]"

You can launch the server immediately after installation:

import subprocess

# Starts the FastAPI application on localhost:8000

subprocess.run(["openenv", "serve"])

Programmatic usage requires only the core dependencies:

from openenv.core import EnvClient

client = EnvClient(base_url="http://localhost:8000")
info = client.get_env_info()
print(info)

Environment-Specific Dependencies

Individual environment implementations maintain their own dependency specifications to keep the core package lightweight. Heavy scientific libraries such as PyTorch, NumPy, or SmolAgents are intentionally excluded from the global pyproject.toml because they are only required by specific environments.

Each environment subdirectory contains its own pyproject.toml file. For example, envs/echo_env/pyproject.toml declares any additional packages needed specifically for that environment's operation. This modular approach ensures you only install scientific computing libraries for the environments you actually plan to use.

Key Configuration Files

Understanding the dependency structure requires examining several critical files in the repository:

Summary

  • Core dependencies include FastAPI, Pydantic, Uvicorn, Requests, Websockets, and FastMCP for basic server functionality.
  • CLI extras add Typer, Rich, PyYAML, and Hugging Face Hub integration for command-line usage.
  • Web UI support requires Gradio and HTTPX for browser-based interfaces.
  • Environment-specific packages like PyTorch are excluded from the core install and managed per-environment to minimize installation size.
  • All dependencies are specified in the root pyproject.toml with version constraints ensuring compatibility.

Frequently Asked Questions

What are the minimum dependencies required to run OpenEnv?

The minimum installation requires FastAPI ≥0.116, Pydantic ≥2.0, Uvicorn ≥0.24, Requests ≥2.25, Websockets ≥15.0.1, and FastMCP ≥3.0. These provide the HTTP server, data validation, ASGI runtime, and multi-client protocol layer necessary for basic operation.

How do I install OpenEnv with full CLI support?

Run pip install "openenv[cli]" to include Typer, Rich, PyYAML, and Hugging Face Hub dependencies. This enables the openenv command-line tool entry point defined in src/openenv/cli/__main__.py with full configuration parsing and progress visualization capabilities.

Why aren't scientific libraries like PyTorch included in the core dependencies?

Scientific libraries such as PyTorch, NumPy, and SmolAgents are excluded from the core pyproject.toml to maintain a lightweight base installation. According to the source code, these dependencies are declared in environment-specific pyproject.toml files (such as envs/echo_env/pyproject.toml) and only installed when you use those particular environments.

Where are the dependency versions specified for OpenEnv?

All dependency specifications are centralized in the repository's pyproject.toml file at the root level. This file defines both the core dependencies under [project.dependencies] and optional groups under [project.optional-dependencies], with specific minimum version constraints for each package.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →