Overseas access: www.kdjingpai.com
Bookmark Us

OxyGent is an open source Python framework from JD Open Source that focuses on helping developers rapidly build production-ready intelligence systems. It provides an end-to-end development process by unifying management tools, models, and intelligences through modular Oxy components.OxyGent supports rapid building, deployment, and optimization of multi-intelligence systems with high scalability and transparency. The latest version (July 15, 2025) scored 59.14 on the GAIA benchmarks, close to the top open source system OWL It is designed to simplify the development of complex AI systems for both enterprise and individual developers.

Function List

  • Modular development : Provides standardized Oxy components, similar to Lego blocks, to support rapid assembly of intelligences, allowing hot-swapping and cross-scenario reuse.
  • Intelligent Collaboration : Supports dynamic task decomposition, where intelligences can negotiate and adapt to changes in real time, ensuring auditable decision-making.
  • Elastic Architecture : Supports a wide range of smart body topologies (e.g. ReAct and hybrid planning), providing automated dependency management and visual debugging tools.
  • Continuous evolution : A built-in evaluation engine that automatically generates training data, which the intelligences continuously optimize through feedback loops.
  • high scalability : Distributed schedulers enable linear cost growth and support large-scale real-time decision making and optimization.

Using Help

The core goal of OxyGent is to allow developers to focus on business logic and rapidly build and deploy intelligent systems. Below is a detailed installation and usage guide covering the main features and operational procedures.

Installation process

OxyGent supports Python 3.10 environments and can be accessed via the conda maybe uv Installation. The following are the specific steps:

Installation with Conda

  1. Create and activate a virtual environment:
    conda create -n oxy_env python=3.10
    conda activate oxy_env
    
  2. Install the OxyGent package:
    pip install oxygent
    

Installation with uv

  1. Install the uv tools:
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Create and activate a virtual environment:
    uv python install 3.10
    uv venv .venv --python 3.10
    source .venv/bin/activate
    
  3. Install the OxyGent package:
    uv pip install oxygent
    

Development Environment Settings

If local development is required, install Node.js and dependencies additionally:

  1. Download and install Node.js.
  2. Install project dependencies:
    pip install -r requirements.txt
    

    For macOS users, you may need to install coreutils::

    brew install coreutils
    

Configuring Language Models

OxyGent needs to be connected to the Large Language Model (LLM) in order to run intelligences. The configuration is as follows:

  1. establish .env file, fill in the LLM parameters:
    echo 'DEFAULT_LLM_API_KEY="your_api_key"' > .env
    echo 'DEFAULT_LLM_BASE_URL="your_base_url"' >> .env
    echo 'DEFAULT_LLM_MODEL_NAME="your_model_name"' >> .env
    
  2. Or configured via environment variables:
    export DEFAULT_LLM_API_KEY="your_api_key"
    export DEFAULT_LLM_BASE_URL="your_base_url"
    export DEFAULT_LLM_MODEL_NAME="your_model_name"
    

Usage

OxyGent provides a simple Python interface that allows developers to implement complex functionality with a few lines of code. Here is a sample script demo.py, showing how to look up the time and save it to a file:

import os
from oxygent import MAS, Config, oxy, preset_tools
Config.set_agent_llm_model("default_llm")
oxy_space = [
oxy.HttpLLM(
name="default_llm",
api_key=os.getenv("DEFAULT_LLM_API_KEY"),
base_url=os.getenv("DEFAULT_LLM_BASE_URL"),
model_name=os.getenv("DEFAULT_LLM_MODEL_NAME"),
llm_params={"temperature": 0.01},
semaphore=4,
),
preset_tools.time_tools,
oxy.ReActAgent(
name="time_agent",
desc="查询时间的工具",
tools=["time_tools"],
),
preset_tools.file_tools,
oxy.ReActAgent(
name="file_agent",
desc="操作文件系统的工具",
tools=["file_tools"],
),
preset_tools.math_tools,
oxy.ReActAgent(
name="math_agent",
desc="执行数学计算的工具",
tools=["math_tools"],
),
oxy.ReActAgent(
is_master=True,
name="master_agent",
sub_agents=["time_agent", "file_agent", "math_agent"],
),
]
async def main():
async with MAS(oxy_space=oxy_space) as mas:
await mas.start_web_service(first_query="当前时间是多少?请保存到 time.txt 文件。")
if __name__ == "__main__":
import asyncio
asyncio.run(main())

running example

  1. Save the above code as demo.pyThe
  2. Ensure that the LLM parameters are configured.
  3. Run the script:
    python demo.py
    
  4. Output: The system will query the current time and save it to the time.txt file. After running, you can access the web service via a browser to view the results.

Featured Function Operation

  1. Modular Intelligent Body Development ::
    • OxyGent's Oxy component allows developers to quickly define intelligences. For example, adding new tools:
      oxy.NewTool(name="custom_tool", desc="自定义工具", func=custom_function)
      
    • Intelligentsia supports hot-plugging and dynamic replacement of tools or models at runtime, without the need to reboot the system.
  2. Dynamic tasking ::
    • Main Intelligence (master_agentComplex tasks can be broken down into subtasks and assigned to subintelligences. For example, enter "analyze sales data and generate a report", and the main intelligence will coordinate the math_agent Calculate the data,file_agent Save results.
    • The task decomposition process is transparent, logging every step of the decision, and developers can use the MAS of the monitoring interface to view it.
  3. Visual Debugging ::
    • OxyGent provides visualization tools to show intelligent body interactions and dependencies. Access http://localhost:port/debug View the topology map.
  4. Continuous optimization ::
    • The built-in evaluation engine records the effect of each task execution and generates training data. For example, mathematical intelligences can be optimized for accuracy through multiple calculations.
    • Developers can manually adjust llm_params(e.g. temperature) to optimize output quality.

caveat

  • Ensure that the network connection is stable and that the LLM API requires real-time access.
  • For local development, it is recommended to allocate at least 8GB of memory to support multi-intelligence operation.
  • Refer to the official documentation (http://oxygent.jd.com/docs/) for more configuration options.

application scenario

  1. Enterprise AI System Development
    OxyGent is suitable for building enterprise-grade intelligent systems such as customer service bots or data analytics platforms. Developers can quickly integrate multiple intelligences to handle complex business logic.
  2. Automated Task Processing
    Individual developers can use OxyGent to automate routine tasks. For example, configure intelligences to monitor folder changes and generate reports, saving time on manual operations.
  3. Real-time decision support
    In finance or logistics, OxyGent's distributed scheduling supports real-time optimization. For example, intelligences can dynamically adjust logistics paths to reduce costs.

QA

  1. What language models does OxyGent support?
    Support for any LLM that provides an HTTP API is available to developers through the .env file configures the API key and model name.
  2. How do I extend the functionality of my smart body?
    exist oxy_space Adding a new smart or tool to a program, defining its name cap (a poem) tools attribute is sufficient. For example, add a weather query smartbody:

    oxy.ReActAgent(name="weather_agent", desc="查询天气的工具", tools=["weather_tools"])
    
  3. Is it suitable for small projects?
    Yes, OxyGent's modular design supports small projects, with a single intelligence capable of running simple tasks, as well as scaling to complex systems.
0Bookmarked
0kudos

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

inbox

Contact Us

Top

en_USEnglish