Qwen-Agent is an open-source framework and agent platform that connects Qwen large language models to tools, planning workflows, memory, and external execution environments through the Model Context Protocol. Built by the QwenLM team, it powers systems like Qwen Chat and serves developers who need to implement autonomous agents, retrieval-augmented generation pipelines, and multi-turn problem-solving assistants. The system interfaces directly with Alibaba Cloud DashScope services or self-hosted OpenAI-compatible inference backends such as vLLM and Ollama. Through native MCP client support, agents built with Qwen-Agent can dynamically connect to standardized MCP servers such as filesystem providers, SQLite databases, and memory services. It enables models to read documents, generate and execute sandboxed code via Docker-based code interpreters, inspect reasoning traces, and coordinate complex multi-step tool calls within command-line applications or Gradio web interfaces.
Category: AI & LLM Tooling
Tags: agent-framework, llm-application, planning, qwen, tool-use
pip install -U "qwen-agent[gui,rag,code_interpreter,mcp]". 2. Configure your model backend by defining an environment variable DASHSCOPE_API_KEY for DashScope, or deploy an OpenAI-compatible endpoint using vLLM or Ollama. 3. Configure your target MCP servers using standard JSON configurations, such as: json { "mcpServers": { "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] }, "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"] } } } 4. Pass the MCP server configurations into your agent definition in Python and run the agent via the terminal or the Gradio WebUI.Part of MCP Servers
You can install Qwen-Agent using pip with the command pip install -U "qwen-agent[gui,rag,code_interpreter,mcp]". If you only need base capabilities without the user interface, retrieval-augmented generation, Docker code interpreter, or Model Context Protocol components, run pip install -U qwen-agent.
Qwen-Agent lets you develop applications powered by Qwen LLMs with planning, tool calling, memory management, and file reading. It includes built-in components like a Docker-based code interpreter, Gradio web interfaces, and connectors for third-party MCP servers.
Qwen-Agent works with Alibaba Cloud DashScope cloud models as well as self-hosted models such as Qwen2.5, Qwen3, Qwen3-Coder, and QwQ running via OpenAI-compatible servers like vLLM or Ollama.
Yes, Qwen-Agent is open-source software maintained by the QwenLM organization and hosted publicly on GitHub with community contributions and documentation.
Qwen-Agent can act as an MCP host, allowing agents to invoke tools exposed by external MCP servers such as memory, filesystem, and SQLite servers configured via standard command and argument schemas.