Example Categories
Assistant Demos
Pre-built assistants for various tasks including RAG, weather forecasts, and custom tools
Function Calling
Examples of integrating external functions and APIs with LLMs
Multi-Agent Chat
Group chat systems with multiple AI agents collaborating
Document QA
Long document analysis and question answering systems
Quick Start Examples
Basic Assistant
The simplest example - a RAG-enabled assistant:Function Calling
Basic example of using external functions:Example Files
Here’s a complete list of available examples:Assistant Examples
assistant_rag.py
assistant_rag.py
Basic RAG (Retrieval-Augmented Generation) assistant that can answer questions about uploaded documents.Supported formats: PDF, Word, PPT, TXT, HTML
assistant_weather_bot.py
assistant_weather_bot.py
Weather forecast assistant with image generation and custom knowledge base integration.Features: Weather API integration, image generation, document knowledge
assistant_add_custom_tool.py
assistant_add_custom_tool.py
Demonstrates how to create and register custom tools for use in agents.Key concepts: Tool registration, custom implementations, plugin system
assistant_qwen3.py / assistant_qwen3.5.py
assistant_qwen3.py / assistant_qwen3.5.py
Examples specific to Qwen3 and Qwen3.5 models with optimized configurations.
assistant_qwen3_coder.py
assistant_qwen3_coder.py
Specialized for Qwen3-Coder with native tool call parsing.
assistant_qwq.py
assistant_qwq.py
QwQ-32B model demo supporting parallel, multi-step, and multi-turn tool calls.
assistant_mcp_sqlite_bot.py
assistant_mcp_sqlite_bot.py
Model Context Protocol (MCP) integration with SQLite database.
Function Calling Examples
function_calling.py
function_calling.py
Standard function calling example following OpenAI’s pattern.Demonstrates: Basic function definition, calling, and response handling
function_calling_in_parallel.py
function_calling_in_parallel.py
Advanced example showing parallel function execution.Key feature: Multiple functions called simultaneously for efficiency
qwen2vl_function_calling.py
qwen2vl_function_calling.py
Function calling with vision models (Qwen2-VL).
Multi-Agent Examples
group_chat_demo.py
group_chat_demo.py
Comprehensive group chat system with multiple AI agents and human participants.Features: Agent creation, role management, multi-turn conversations
multi_agent_router.py
multi_agent_router.py
Router-based multi-agent system that delegates tasks to specialized agents.Agents: VL assistant, tool assistant, text assistant
group_chat_chess.py
group_chat_chess.py
Example of agents playing chess together.
Document Processing Examples
parallel_doc_qa.py
parallel_doc_qa.py
Parallel document QA for efficient processing of long documents.Performance: Faster processing through parallelization
virtual_memory_qa.py
virtual_memory_qa.py
QA system with virtual memory for handling extremely large documents.
Advanced Examples
react_data_analysis.py
react_data_analysis.py
ReAct-style agent for data analysis tasks.
tir_math.py
tir_math.py
Tool-Integrated Reasoning with Qwen2.5-Math for mathematical problem solving.
visual_storytelling.py
visual_storytelling.py
Generate stories from images using vision models.
long_dialogue.py
long_dialogue.py
Handling long conversation contexts efficiently.
Jupyter Notebooks
Interactive cookbook examples:cookbook_database_manipulation.ipynb
Database operations with AI assistance
cookbook_drive_guide.ipynb
Driving guide application example
cookbook_mind_map.ipynb
Generate mind maps from content
cookbook_think_with_images.ipynb
Vision-based tool calling with Qwen3-VL
Running Examples
Prerequisites
Running an Example
Most examples support multiple modes:Common Patterns
Most examples follow this structure:Customization Tips
Changing Models
All examples allow model customization:Adding Custom Tools
Seeassistant_add_custom_tool.py for the complete pattern:
Configuring WebUI
Customize the web interface:Next Steps
Explore specific example categories:Assistant Demos
Detailed guide to assistant examples
Function Calling
Master function calling patterns
Multi-Agent Chat
Build collaborative agent systems
Document QA
Process long documents efficiently