QwenLM /Qwen-Agent

Agent framework and applications built upon Qwen>=3.0, featuring Function Calling, MCP, Code Interpreter, RAG, Chrome extension, etc.

★ 17,261⑂ 1,767👁 103⑃ 269● 768▤ 25
PythonApache-2.0Created 2023-09-22pypi.org/project/qwen-agent/
Download: v0.0.26v0.0.26 ↓0.0.262025-05-29
+3
Daily
+14
Weekly
+93
Monthly
17,261
stars
1,767
forks
103
watchers
269
prs
768
issues
25
releases

README

中文 | English


    




          💜 Qwen Chat&nbsp&nbsp | &nbsp&nbsp🤗 Hugging Face&nbsp&nbsp | &nbsp&nbsp🤖 ModelScope&nbsp&nbsp | &nbsp&nbsp 📑 Blog &nbsp&nbsp | &nbsp&nbsp📖 Documentation


📊 Benchmark&nbsp&nbsp | &nbsp&nbsp💬 WeChat (微信)&nbsp&nbsp | &nbsp&nbsp🫨 Discord&nbsp&nbsp



Qwen-Agent is a framework for developing LLM applications based on the instruction following, tool usage, planning, and
memory capabilities of Qwen.
It also comes with example applications such as Browser Assistant, Code Interpreter, and Custom Assistant.
Now Qwen-Agent plays as the backend of Qwen Chat.

 News
 🔥🔥🔥Feb 16, 2026: Open-sourced Qwen3.5. For usage examples, refer to Qwen3.5 Agent Demo.
 Jan 27, 2026: Open-sourced agent evaluation benchmark DeepPlanning and added Qwen-Agent documentation.
 Sep 23, 2025: Added Qwen3-VL Tool-call Demo, supporting tools such as zoom in, image search, and web search.
 Jul 23, 2025: Add Qwen3-Coder Tool-call Demo; Added native API tool call interface support, such as using vLLM's built-in tool call parsing.
 May 1, 2025: Add Qwen3 Tool-call Demo, and add MCP Cookbooks.
 Mar 18, 2025: Support for the reasoning_content field; adjust the default Function Call template, which is applicable to the Qwen2.5 series general models and QwQ-32B. If you need to use the old version of the template, please refer to the example for passing parameters.
 Mar 7, 2025: Added QwQ-32B Tool-call Demo. It supports parallel, multi-step, and multi-turn tool calls.
 Dec 3, 2024: Upgrade GUI to Gradio 5 based. Note: GUI requires Python 3.10 or higher.
 Sep 18, 2024: Added Qwen2.5-Math Demo to showcase the Tool-Integrated Reasoning capabilities of Qwen2.5-Math. Note: The python executor is not sandboxed and is intended for local testing only, not for production use.

 Getting Started

 Installation

- Install the stable version from PyPI:
bash
pip install -U "qwen-agent[gui,rag,code_interpreter,mcp]"
 Or use pip install -U qwen-agent for the minimal requirements.
 The optional requirements, specified in double brackets, are:
   [gui] for Gradio-based GUI support;
   [rag] for RAG support;
   [code_interpreter] for Code Interpreter support;
   [mcp] for MCP support.


- Alternatively, you can install the latest development version from the source:
bash
git clone https://github.com/QwenLM/Qwen-Agent.git
cd Qwen-Agent
pip install -e ./"[gui,rag,code_interpreter,mcp]"
 Or pip install -e ./ for minimal requirements.


 Preparation: Model Service

You can either use the model service provided by Alibaba
Cloud's DashScope, or deploy and use your own
model service using the open-source Qwen models.

- If you choose to use the model service offered by DashScope, please ensure that you set the environment
variable DASHSCOPE_API_KEY to your unique DashScope API key.

- Alternatively, if you prefer to deploy and use your own model service, please follow the instructions provided in the README of Qwen2 for deploying an OpenAI-compatible API service.
Specifically, consul

Top issues

Latest release

v0.0.26 v0.0.26 2025-05-29
- bugfix: support set sse_read_timeout and automatic reconnection for mcp

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON