This is an early release preview. You may encounter bugs.
Qwen-Agent logo
Unclaimed

Framework coding interface memory

Qwen-Agent

Python agent framework over Qwen models with function calling, MCP, code interpreter and RAG.

Built by Qwen

C 45/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Qwen-Agent.

Qwen-Agent is a Python framework for building LLM applications on the instruction-following, tool-use, planning, and memory capabilities of Qwen models. It ships atomic components — LLM classes deriving from BaseChatModel with function calling, and tools deriving from BaseTool — plus higher-level Agent classes such as Assistant, FnCallAgent, and ReActChat, and it serves as the backend of Qwen Chat.

You register a custom tool with a decorator, describe its parameters, and hand the tool list to an agent along with an LLM configuration and any files it should read. Models are reached either through Alibaba Cloud's DashScope service or through your own OpenAI-compatible endpoint, so a self-hosted vLLM deployment or a local Ollama install works from the same configuration block. Tool calls are parsed by the framework for the QwQ and Qwen3 models, while Qwen3-Coder can use the serving engine's native tool-call interface through the use_raw_api parameter.

The built-in code interpreter executes generated code inside a local Docker container that mounts only the specified working directory; the project notes this is basic sandbox isolation and asks for caution in production. External MCP servers are configured with a standard mcpServers block, and a Gradio-based WebUI wraps an agent as a browser demo. Example applications include the BrowserQwen browser assistant, a code interpreter, and a custom assistant, and a documented retrieval solution answers questions over documents of up to one million tokens.

The project also publishes DeepPlanning, an agent evaluation benchmark, and demos for Qwen3.5, Qwen3-VL tool calls with zoom, image search, and web search, Qwen3-Coder tool calls, and Qwen2.5-Math tool-integrated reasoning. Optional capabilities are selected as extras: gui, rag, code_interpreter, and mcp. The GUI requires Python 3.10 or higher.

  • Atomic components: BaseChatModel LLM classes with function calling, BaseTool tools, and Agent classes you can subclass
  • Function calling: parallel, multi-step, and multi-turn tool calls, with a configurable prompt template per model family
  • MCP support: connect external MCP servers through a standard mcpServers configuration block
  • Code interpreter: generated code runs in a local Docker container with only the working directory mounted
  • Retrieval over long documents: a fast RAG path plus a parallel document QA agent for contexts around one million tokens
  • Model services: DashScope, or any OpenAI-compatible endpoint such as a vLLM or Ollama deployment
  • Gradio GUI: WebUI(bot).run() turns an agent into a browser demo
  • Example applications: BrowserQwen browser assistant, code interpreter, custom assistant, and vision and math tool-call cookbooks
  • DeepPlanning benchmark: an open-sourced agent evaluation suite published alongside the framework

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Qwen-Agent.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Qwen-Agent →

Browse the catalog