Framework · Orchestration Frameworks

Qwen-Agent

Provide a Python framework for building LLM applications that exercise the instruction-following, tool-use, planning, and memory capabilities of Alibaba's Qwen models, with built-in support for function calling, MCP, a Docker-sandboxed code interpreter, and RAG over very long documents.

Description

Qwen-Agent is the Apache-2.0 framework maintained by Alibaba's Qwen team for building agentic applications on top of Qwen models (Qwen >= 3.0). It ships in two languages — the English README and a parallel 中文 README_CN — and centres on three first-class capabilities advertised in the GitHub repo description: Function Calling, MCP, Code Interpreter, RAG. Distinctive characteristics: tight coupling to Qwen's native tool-call template (parallel function calls supported by default), Mandarin-first documentation with full Chinese-language abstractions and prompts, and a bundled fast-RAG pipeline aimed at super-long-document QA rather than generic vector-store glue.

Solution

Class-hierarchy-based imperative loop. The Agent base class defines an iterator interface; subclasses compose function calling, ReAct-style reasoning, and RAG: FnCallAgent is the function-calling base, ReActChat wraps the loop in a ReAct Thought/Action/Observation prompt, Assistant layers RAG over function-calling. Multi-agent shapes (group_chat, group_chat_auto_router, router) live in sibling modules.

Primary use cases

  • Qwen-model-native function calling and tool use
  • RAG over super-long documents
  • ReAct-style agents with sandboxed code execution
  • agentic apps with Mandarin-first prompts and docs

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related