Qwen-Agent
An open-source framework by Alibaba's Qwen team for building LLM applications with function calling, tool usage, planning, MCP, RAG, and memory capabilities.
At a Glance
About Qwen-Agent
Qwen-Agent is an open-source Python framework developed by Alibaba's QwenLM team for building LLM-powered applications on top of the Qwen model family. It provides both atomic components (LLMs, tools) and high-level agent abstractions, and serves as the backend for Qwen Chat. The project is licensed under Apache 2.0 and is actively maintained on GitHub.
What It Is
Qwen-Agent is an agent development framework that exposes instruction-following, tool usage, planning, and memory capabilities of Qwen models to developers. It sits in the agent framework category — giving developers building blocks to compose multi-step, tool-using AI applications rather than a finished end-user product. The framework ships with example applications including a Browser Assistant, Code Interpreter, and Custom Assistant, and now powers the Qwen Chat backend.
Core Architecture
The framework is organized around three layers of abstraction:
- LLM layer —
BaseChatModelsubclasses that wrap DashScope-hosted Qwen models or any OpenAI-compatible API (vLLM, Ollama). Supports parallel function calls, multi-step tool calls, and thereasoning_contentfield for thinking models. - Tool layer —
BaseToolwith a@register_tooldecorator for defining custom tools. Built-in tools includecode_interpreter(Docker-sandboxed Python execution) and web search. - Agent layer —
Agentbase class with ready-made implementations likeAssistant,FnCallAgent, andReActChat. AWebUIhelper wraps any agent in a Gradio interface with a single line of code.
Key Capabilities
- Function / tool calling — parallel and multi-turn function calls with a configurable template (default: Nous-style, recommended for Qwen3).
- MCP support — agents can connect to Model Context Protocol servers (memory, filesystem, SQLite, etc.) via a JSON config block.
- RAG over long documents — a fast RAG solution and a parallel agent approach that the project claims outperforms native long-context models on two benchmarks while handling 1M-token contexts.
- Code Interpreter — Docker-based sandboxed Python execution; requires Docker to be installed locally.
- BrowserQwen — a Chrome extension application built on the framework for browser-based assistance.
- Gradio GUI — rapid demo deployment via
WebUI(agent).run().
Installation and Setup Path
Install from PyPI with optional extras:
pip install -U "qwen-agent[gui,rag,code_interpreter,mcp]"
The framework requires either a DashScope API key (set as DASHSCOPE_API_KEY) for cloud-hosted Qwen models, or a locally deployed OpenAI-compatible endpoint via vLLM or Ollama. The GUI requires Python 3.10 or higher (upgraded to Gradio 5 as of December 2024).
Update: v0.0.26 and Qwen3.5 Support
The latest release is v0.0.26, published May 29, 2025. The most recent notable update (February 16, 2026) open-sourced Qwen3.5 with a corresponding agent demo. Earlier 2025 milestones include Qwen3-Coder tool-call support with native vLLM API tool parsing (July 2025), Qwen3-VL tool-call support with image zoom and search tools (September 2025), and MCP cookbooks (May 2025). An agent evaluation benchmark called DeepPlanning and full documentation were published in January 2026. The repository shows 16,500+ stars and active issue tracking as of mid-2026.
Community Discussions
Be the first to start a conversation about Qwen-Agent
Share your experience with Qwen-Agent, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open-source under Apache License 2.0. Install via pip and use with any compatible model backend.
- Full framework source code
- Function calling and tool usage
- MCP support
- RAG and Code Interpreter
- Gradio GUI
Capabilities
Key Features
- Function calling (parallel and multi-turn)
- MCP (Model Context Protocol) support
- RAG over long documents (up to 1M tokens)
- Docker-sandboxed Code Interpreter
- Gradio-based WebUI for rapid demo deployment
- Custom tool registration via @register_tool decorator
- Support for DashScope, vLLM, and Ollama backends
- BrowserQwen Chrome extension application
- ReAct and FnCall agent implementations
- Qwen3, Qwen3-Coder, Qwen3-VL, QwQ-32B support
- Streaming output
- Multi-turn chat history management
- PDF and file reading support
- DeepPlanning benchmark evaluation
