Kickstart Multi‑Agent Collaboration with OxyGent: A 20‑Line Setup Guide

This guide introduces the open‑source OxyGent multi‑agent framework, walks through a quick 20‑line installation, demonstrates environment configuration, tool integration, visualization, and advanced features such as RAG, Reflexion, and distributed deployment for AI applications.

JD Tech Talk
JD Tech Talk
JD Tech Talk
Kickstart Multi‑Agent Collaboration with OxyGent: A 20‑Line Setup Guide

OxyGent Multi‑Agent Collaboration Framework

Open‑source repository: https://github.com/jd-opensource/OxyGent Official site: https://oxygent.jd.com PyPI package: https://pypi.org/project/oxygent

Quick Start in 20 Lines of Code

The demo code is available in the demo branch of the GitHub repository.

Installation

Python environment (version 3.10 or higher)

conda create -n oxy_env python==3.10
conda activate oxy_env

OxyGent package pip install oxygent Node.js (required when using MCP tools) Download and install from https://nodejs.org/zh-cn

Hello World

Create a .env file to set environment variables:

DEFAULT_LLM_API_KEY    = "<large‑model‑key>"
DEFAULT_LLM_BASE_URL   = "<large‑model‑url>"
DEFAULT_LLM_MODEL_NAME = "<large‑model‑name>"

Run the framework to see the initial UI.

RAG

Supports Retrieval‑Augmented Generation for enhanced knowledge access.

MoA

Provides a Model‑of‑Agency component for structured agent behavior.

Enabling Agents to Invoke Tools Autonomously

SSE MCP Tool

Integration with Server‑Sent Events (SSE) based MCP tool.

FunctionHub Tool

Register and use arbitrary tools via FunctionHub, LocalMCP, or SSEMCP. After startup, all registration methods produce the same effect.

External MCP Tool

Support for external MCP services.

Automatic Top‑K Tool Recall

The framework can automatically recall the top‑K most relevant tools during execution.

Node Visualization

Access a visual page to monitor node states and interactions.

Block‑Style Multi‑Agent Construction

Multi‑Agent

Design and compose multiple agents using a block‑based approach.

Hierarchical Agents

Support for multi‑level agent hierarchies.

Workflow Integration

Combine agents with custom workflows for complex pipelines.

Reflexion Mechanism

Agents can reflect on their actions and adjust behavior dynamically.

Why? The reflexion mechanism improves adaptability and performance.

Rapid Agent Deployment

Data Persistence

The framework includes a robust data storage system suitable for subsequent SFT or RL training.

Concurrency Limits per Node

Configure maximum concurrent executions for each node.

Multi‑Environment Deployment

Deploy agents across different environments with flexible configuration.

Distributed Execution

Support for distributed deployment to scale workloads.

Advanced Usage

Multimodal support

Weighted memory filtering during execution

Extended tool retrieval

Custom large‑model output parsers

Custom SSE interfaces

Result post‑processing and formatting

Simultaneous tool invocation by agents

Task restart from intermediate nodes

Plan‑and‑Solve paradigm

PythonAITool IntegrationFrameworkMulti-agentOxyGent
JD Tech Talk
Written by

JD Tech Talk

Official JD Tech public account delivering best practices and technology innovation.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.