# What Tools Are Supported by Qwen-Agent? A Complete Guide to the Built-in Toolbox

> Explore Qwen-Agent supported tools: web search, code execution, image generation, RAG, API integrations, and more. Extend its capabilities easily.

- Repository: [Qwen/Qwen-Agent](https://github.com/qwenlm/Qwen-Agent)
- Tags: deep-dive
- Published: 2026-03-09

---

**Qwen-Agent supports a comprehensive suite of tools including web search, document parsing, code execution, image generation, retrieval-augmented generation, and external API integrations, all extensible through a unified base interface.**

The Qwen-Agent framework from the QwenLM organization provides a modular architecture for building AI agents. Understanding what tools are supported by Qwen-Agent is essential for developers looking to create sophisticated workflows that extend beyond simple text generation.

## Overview of Qwen-Agent Tools

All tools in Qwen-Agent inherit from a common base class defined in [`qwen_agent/tools/base.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/base.py). This ensures every tool implements a consistent `run(**kwargs)` signature, allowing agents to invoke them interchangeably. The tools are organized under the `qwen_agent/tools/` package and cover everything from information retrieval to code execution.

## Built-in Tool Categories

### Web Search and Extraction Tools

The framework provides robust capabilities for accessing real-time information through [`qwen_agent/tools/web_search.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/web_search.py) and [`qwen_agent/tools/web_extractor.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/web_extractor.py). These enable agents to perform general web queries and extract structured content from specific URLs. Additionally, the `qwen_agent/tools/search_tools/` directory contains specialized implementations including keyword search, vector search, and hybrid search for more targeted information retrieval.

### Document Parsing and Retrieval

For handling local knowledge bases, Qwen-Agent includes [`qwen_agent/tools/simple_doc_parser.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/simple_doc_parser.py) and [`qwen_agent/tools/doc_parser.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/doc_parser.py) to load and process various document formats including PDF, HTML, and TXT files. The [`qwen_agent/tools/retrieval.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/retrieval.py) module combines these parsing capabilities with vector stores to fetch relevant document chunks for retrieval-augmented generation (RAG) workflows.

### Code Execution and Interpretation

The [`qwen_agent/tools/code_interpreter.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/code_interpreter.py) module provides safe Python execution environments through [`python_executor.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/python_executor.py) and [`code_interpreter_init_kernel.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/code_interpreter_init_kernel.py). This allows agents to perform mathematical calculations, data analysis, and algorithmic reasoning by executing code in isolated kernels.

### Multimodal and Vision Tools

Qwen-Agent extends beyond text with [`qwen_agent/tools/image_search.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/image_search.py) for finding relevant images and [`qwen_agent/tools/image_gen.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/image_gen.py) for generating visual content. The specialized [`image_zoom_in_qwen3vl.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/image_zoom_in_qwen3vl.py) tool enables detailed visual analysis by zooming into specific regions using Qwen-3-VL capabilities.

### External API Integrations

The framework supports real-world data access through [`qwen_agent/tools/amap_weather.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/amap_weather.py) for weather information and [`qwen_agent/tools/mcp_manager.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/mcp_manager.py) for managing multi-channel plugins and external service integrations.

### Storage and Persistence

The [`qwen_agent/tools/storage.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/storage.py) module provides mechanisms for persisting tool-generated artifacts, embeddings, and intermediate results across agent sessions.

## How to Use Qwen-Agent Tools

### Web Search and Content Extraction

```python
from qwen_agent.tools.web_search import WebSearchTool
from qwen_agent.tools.web_extractor import WebExtractorTool

# Search the web for a query

search = WebSearchTool()
results = search.run(query="latest python 3.12 release notes")

# Extract the most relevant page

extractor = WebExtractorTool()
content = extractor.run(url=results[0]["url"])
print(content[:500])   # preview the extracted text

```

### Keyword-Based Document Retrieval

```python
from qwen_agent.tools.search_tools.keyword_search import KeywordSearchTool

kw_tool = KeywordSearchTool(index_path="data/doc_index")
hits = kw_tool.run(keyword="quantum computing")
for hit in hits[:3]:
    print(hit["snippet"])

```

### Running Python Code Safely

```python
from qwen_agent.tools.code_interpreter import CodeInterpreterTool

ci = CodeInterpreterTool()
output = ci.run(code="""
def fib(n):
    a, b = 0, 1
    for _ in range(n):
        a, b = b, a + b
    return a
print(fib(10))
""")
print(output)   # → 55

```

### Generating Images

```python
from qwen_agent.tools.image_gen import ImageGenTool

gen = ImageGenTool()
img_path = gen.run(prompt="A futuristic city skyline at sunset, photorealistic")
print(f"Image saved to {img_path}")

```

## Extending the Toolbox with Custom Tools

All tools inherit from the abstract base class in [`qwen_agent/tools/base.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/base.py), which enforces a uniform `run(**kwargs)` interface. Developers can create custom tools by subclassing this base and implementing the `run` method. The [`examples/assistant_add_custom_tool.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/examples/assistant_add_custom_tool.py) file demonstrates how to register and integrate custom tools into agent workflows.

## Summary

- **Qwen-Agent provides a comprehensive built-in toolbox** covering web search, document parsing, code execution, image generation, and external APIs.
- **All tools inherit from [`qwen_agent/tools/base.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/base.py)**, ensuring consistent interfaces through the `run(**kwargs)` method.
- **Key modules include** [`web_search.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/web_search.py), [`doc_parser.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/doc_parser.py), [`code_interpreter.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/code_interpreter.py), [`retrieval.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/retrieval.py), and [`image_gen.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/image_gen.py).
- **Tools are composable** and can be combined in agents like `react_chat` or `router` to build complex workflows.
- **The framework is extensible** via the base tool class, allowing developers to add custom integrations.

## Frequently Asked Questions

### What types of web search tools does Qwen-Agent support?

Qwen-Agent includes general web search through [`web_search.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/web_search.py), content extraction via [`web_extractor.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/web_extractor.py), and specialized search algorithms in the `search_tools/` directory. These include keyword search, vector search, hybrid search, and front-page search capabilities, allowing agents to retrieve information using different retrieval strategies depending on the use case.

### How does Qwen-Agent handle document parsing and retrieval?

The framework provides [`simple_doc_parser.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/simple_doc_parser.py) and [`doc_parser.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/doc_parser.py) to load and process PDF, HTML, and TXT files. For retrieval, [`retrieval.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/retrieval.py) combines these parsers with vector stores to implement RAG (Retrieval-Augmented Generation) workflows. The `search_tools/` module also provides [`extract_doc_vocabulary.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/extract_doc_vocabulary.py) for indexing document content.

### Can I execute Python code safely within Qwen-Agent?

Yes, the [`code_interpreter.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/code_interpreter.py) module provides sandboxed Python execution through [`python_executor.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/python_executor.py) and [`code_interpreter_init_kernel.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/code_interpreter_init_kernel.py). This allows agents to perform calculations, data analysis, and algorithmic tasks without compromising system security. The tool returns stdout output and supports stateful execution across multiple code blocks.

### Is it possible to add custom tools to Qwen-Agent?

Absolutely. All tools inherit from the abstract base class in [`qwen_agent/tools/base.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/tools/base.py), which requires implementing a `run(**kwargs)` method. Developers can subclass this base class to create custom integrations, then register them with agents as demonstrated in [`examples/assistant_add_custom_tool.py`](https://github.com/QwenLM/Qwen-Agent/blob/main/examples/assistant_add_custom_tool.py). This extensibility allows integration with proprietary APIs, databases, or specialized computation engines.