qwen-agent
Qwen-Agent: Enhancing LLMs with Agent Workflows, RAG, Function Calling, and Code Interpreter.
What it is and what it does
Qwen-Agent is a framework for building applications powered by large language models, centered on enabling agents to use tools, plan multi-step workflows, maintain memory across conversations, and follow complex instructions. It provides atomic building blocks (LLM classes, tool classes, agent classes) and higher-level components like the Assistant agent, which can read files, execute code, call external tools, and coordinate multi-turn interactions. The framework integrates with Alibaba's DashScope API or OpenAI-compatible model servers, and ships with example applications for browser automation, code interpretation, and custom assistants.
The package depends on 11 runtime libraries covering JSON parsing, schema validation, API communication, token counting, and image handling. It is actively maintained (last commit 2026-03-04) and has accumulated significant adoption (16968 GitHub stars). Installation is straightforward via pip, though full functionality requires configuring a model service and, for GUI features, Python 3.10 or higher.
Use it for:
- Build a chatbot that can read PDFs, execute Python code, and call custom APIs in response to user queries.
- Create an agent that plans and executes multi-step workflows, such as generating images and then processing them with code.
- Develop a code interpreter assistant that safely executes user-provided Python in a controlled environment.
- Integrate tool-calling capabilities into existing LLM applications via function calling and schema validation.
- Prototype RAG pipelines with built-in file reading and memory management.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Qwen-Agent is a framework for building LLM applications with tool usage, planning, memory, and instruction-following capabilities, including pre-built assistants for browsing, code execution, and custom workflows.
Yes, with conditions. Qwen-Agent is actively maintained, has low install friction, and offers a well-structured framework for building LLM applications with tool orchestration. However, verify the actual license terms (metadata shows unclear treatment despite Apache 2.0 headers), confirm Python version support for your environment, and ensure you have a model service configured (DashScope API key or local deployment). Not suitable if you need a fully sandboxed code execution environment for production use.
Install
qwen-agent on PyPI
pip
pip install qwen-agentuv
uv add qwen-agentpoetry
poetry add qwen-agentInstalling qwen-agent
Before you install
Low install friction with a pure-Python wheel and 11 well-established runtime dependencies. Actively maintained with recent commits and a large repository (16968 stars), though the package is relatively young (first release 2024-04-07).
License in practice
License treatment is unclear—no SPDX identifier or raw license text is recorded in the package metadata, despite the description excerpt showing Apache 2.0 headers. Verify the actual license terms before use in proprietary or restricted contexts.
Quickstart
pip install -U qwen-agent
from qwen_agent.agents import Assistant
bot = Assistant(llm={'model': 'qwen-max-latest', 'model_type': 'qwen_dashscope'},
function_list=['code_interpreter'])
Requires DASHSCOPE_API_KEY environment variable or explicit API key configuration; GUI features require Python 3.10 or higher.
Verify before relying
- Exact Python version support range (requires_python is unspecified in metadata)
- Whether the code_interpreter tool is sandboxed in production deployments
- Stability guarantees or backward-compatibility policy given the 0.0.34 version series
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — dashscope, eval_type_backport, json5, jsonlines, jsonschema, openai, pydantic, requests, tiktoken, pillow, dotenv |
| Maintenance | actively maintained — 179 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 666,162/month — #5,426 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: qwen_agent-0.0.34-py3-none-any.whl
Keywords: LLM, Agent, Function Calling, RAG, Code Interpreter
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
agentscopeAgentScope is a production-ready framework for…
permissive · top 15,000 on PyPI
strands-agents-toolsProvides ready-to-use tools for AI agents to…
permissive · top 5,000 on PyPI
qwen-ttsQwen-TTS generates speech from text using…
permissive · top 15,000 on PyPI
qwen-asrQwen3-ASR provides speech recognition and…
permissive · top 15,000 on PyPI
npmai-agentsAutonomous AI agent framework that executes…
permissive · top 15,000 on PyPI
PraisonAIPraisonAI is a framework for building and…
permissive · top 15,000 on PyPI
fast-agent-mcpfast-agent-mcp is a CLI-first framework for…
permissive · top 15,000 on PyPI
openai-agentsA framework for building multi-agent LLM…
permissive · top 1,000 on PyPI
deepevalDeepEval is an LLM evaluation framework that…
permissive · top 5,000 on PyPI