Qwen-Agent
About
A framework for developing LLM applications with capabilities like tool usage, planning, and memory, based on the Qwen model.
Details
- Author
- qwenlm
- Categories
- Developer Tools, AI, Knowledge Base
Jump to
Setup
Install Qwen-Agent in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/qwenlm/Qwen-Agent
Follow the installation instructions in the repository README, then restart your MCP client.
💜Qwen Chat| 🤗Hugging Face| 🤖ModelScope| 📑Blog| 📖Documentation
📊Benchmark| 💬WeChat (微信)| 🫨Discord
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 ofQwen Chat.
- 🔥🔥🔥Feb 16, 2026: Open-sourced Qwen3.5. For usage examples, refer toQwen3.5 Agent Demo.
- Jan 27, 2026: Open-sourced agent evaluation benchmarkDeepPlanningand added Qwen-Agentdocumentation.
- Sep 23, 2025: AddedQwen3-VL Tool-call Demo, supporting tools such as zoom in, image search, and web search.
- Jul 23, 2025: AddQwen3-Coder Tool-call Demo; Added native API tool call interface support, such as using vLLM's built-in tool call parsing.
- May 1, 2025: AddQwen3 Tool-call Demo, and addMCP Cookbooks.
- Mar 18, 2025: Support for thereasoning_contentfield; adjust the defaultFunction 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 theexamplefor passing parameters.
- Mar 7, 2025: AddedQwQ-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: AddedQwen2.5-Math Demoto 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.
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:
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.
You can either use the model service provided by Alibaba Cloud'sDashScope, 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 variableDASHSCOPE_API_KEYto 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, consult thevLLMsection for high-throughput GPU deployment or theOllamasection for local CPU (+GPU) deployment. For the QwQ and Qwen3 model, it is recommended todo notadd the--enable-auto-tool-choiceand--tool-call-parser hermesparameters, as Qwen-Agent will parse the tool outputs from vLLM on its own. For Qwen3-Coder, it is recommended to enable both of the above parameters, use vLLM's built-in tool parsing, and combine with theuse_raw_apiparameterusage.
Qwen-Agent offers atomic components, such as LLMs (which inherit fromclass BaseChatModeland come with[function calling) and Tools (which inherit fromclass BaseTool), along with high-level components like Agents (derived fromclass Agent).
The following example illustrates the process of creating an agent capable of reading PDF files and utilizing tools, as well as incorporating a custom tool:
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





