Qwen-Agent

MCP.Pizza Chef: QwenLM

Qwen-Agent is the toolkit Alibaba's own Qwen Chat is built on, and you can run it yourself to create a personal assistant. Out of the box it comes with example apps: one that answers questions about pages you are reading in Chrome, one that writes and runs Python for charts and calculations, and one that reads long PDFs. It connects to MCP servers for extra abilities. Expect to write a little Python, and to supply either a Qwen cloud key or your own locally hosted model.

Coding
Files/PDF
Web/Research

Use This MCP client To

Ask questions about a long PDF I uploaded Summarize the web page I am currently reading Write and run Python to chart some numbers Build a custom assistant with my own tools Run an assistant entirely on my own computer

README

中文 | English


💜 Qwen Chat   |   ðŸ¤— Hugging Face   |   ðŸ¤– ModelScope   |    📑 Blog    |   ðŸ“– Documentation
💬 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 of Qwen Chat.

News

  • 🔥🔥🔥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:
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.

Qwen-Agent FAQ

Do I need to write code to use this?
Yes — it is a Python toolkit, so expect to write a short script or run one of the bundled examples.
Which models does it work with?
Qwen models, either through Alibaba's DashScope cloud service with a key, or hosted yourself with vLLM or Ollama.
Can I use this to ask questions about a PDF?
Yes — the bundled assistant example reads PDF files and answers questions about them.
Is there a visual interface?
Yes — a browser-based chat window is included, and there is a Chrome extension for the page you are reading.
Does it work with MCP servers?
Yes — install the optional MCP extra and it can use tools offered by MCP servers.
Is it free?
The toolkit is open source and free. You pay only for whichever model service you pick, or nothing at all if you host one yourself.