Favicon of Qwen-Agent

Qwen-Agent

An open-source Python AI agent framework that connects Qwen models to tools, document retrieval and local Docker code execution.

Qwen-Agent is a Python framework for developers building assistants that use Qwen models to read files and carry out tasks with tools. It provides ready-made agent components and example applications for custom assistants and browser assistance.

  • Tool use: Agents can call custom tools and MCP servers, with support for parallel calls and tasks that require several steps or conversation turns.
  • Document questions: Assistants can read PDFs and use retrieval-augmented generation (RAG) to answer questions over long documents.
  • Code execution: The built-in code interpreter lets agents write and execute code in local Docker containers and return the results.
  • Web interface: A Gradio interface provides browser-based chat with your agents, while BrowserQwen is a separate browser assistant built on the framework.

You can run the framework on your own hardware and connect it to self-hosted Qwen models through an OpenAI-compatible API. Supported backends include Ollama for local CPU or GPU use and vLLM for GPU serving. Alibaba Cloud's DashScope is an alternative hosted model service that requires an API key and sends model requests to the cloud.

The project is open source under the Apache 2.0 license. The Gradio interface requires Python 3.10 or later, and the code interpreter requires Docker. Its containers provide basic sandbox isolation and mount the specified working directory; the project cautions against treating that isolation as sufficient protection for production use.

Similar to Qwen-Agent