gitmyhub

Qwen-Agent

Python ★ 17k updated 3mo ago

Agent framework and applications built upon Qwen>=3.0, featuring Function Calling, MCP, Code Interpreter, RAG, Chrome extension, etc.

Python framework for building AI agent apps on Qwen LLMs that lets the AI use external tools, run code, search the web, and remember context across a conversation.

PythonQwen LLMsMCPRAGFunction CallingDashScope APIsetup: moderatecomplexity 3/5

Qwen-Agent is a Python framework for building AI agent applications on top of the Qwen family of large language models (LLMs developed by Alibaba). An "agent" in this context means an AI system that can not only respond to questions but also use external tools, plan multi-step actions, remember context, and execute code — going beyond simple text generation.

The framework provides a layered set of building blocks. At the low level, you get LLM wrappers and a Tool base class that make it easy to define custom tools (for example, an image generation tool or a web search tool). At the high level, you get pre-built Agent classes that combine LLMs with tools and memory — for instance, an Assistant agent that can read PDFs and call tools in sequence to answer a question. It supports Function Calling (letting the AI decide when and how to call a tool), MCP (Model Context Protocol — a standard interface for connecting AI models to external tools), a Code Interpreter (letting the AI write and run code to solve problems), and RAG (Retrieval-Augmented Generation — letting the AI look up relevant documents before answering).

Ready-made example applications include a Browser Assistant (a Chrome extension), a code interpreter, and a custom assistant. It works with the Qwen models served via Alibaba Cloud's DashScope API or a self-hosted model using compatible runtimes. You would use Qwen-Agent to build AI assistants that can take actions — querying databases, running code, browsing the web — rather than just answering questions. The full README is longer than what was provided.

Where it fits