How aluro7in/qwen-agent works
Qwen-Agent is an LLM application framework whose main workflow turns a user request into an agent response, optionally planning or routing work through model calls and tools. Its documented capabilities include retrieval-augmented document QA, memory, multi-agent coordination, code execution, and GUI/server applications. The graph also shows the browser-assistant surface and model/tool integration layers. Several modules are unsampled; links to those features are included only where the README or sampled runtime code supports them, and uncertain wiring is omitted.
Main entry points: agent.py Agent Base · retrieval.py Retrieval Tool · assistant.py Assistant · web_ui.py Gradio UI
Components 24
Agent Runtime
- Agent Base
qwen_agent/agent.py - Assistant
qwen_agent/agents/assistant.py - Agent Router
qwen_agent/agents/router.py - Agent Hub
qwen_agent/multi_agent_hub.py - Memory
qwen_agent/memory/memory.py
Models and Tools
- Chat Model API
qwen_agent/llm/base.py - Model Providers
qwen_agent/llm - Tool Registry
qwen_agent/tools/base.py - Agent Tools
qwen_agent/tools - MCP Client
qwen_agent/tools/mcp_manager.py
Document Retrieval
- Retrieval Tool
qwen_agent/tools/retrieval.py - Document Parser
qwen_agent/tools/doc_parser.py - RAG Search
qwen_agent/tools/search_tools
User Interfaces
- Gradio UI
qwen_agent/gui/web_ui.py - Browser Assistant
browser_qwen/src/popup.js - Browser Background
browser_qwen/background.js
Server and State
- Assistant Server
qwen_server/assistant_server.py - Database Server
qwen_server/database_server.py - Workspace State
qwen_agent/memory/memory.py
Other components
- User
- Model Service
- MCP Servers
- Input Documents
- Web Client
Connections 22
- User → Gradio UI: submits request
- Gradio UI → Assistant: invokes
- User → Browser Assistant: submits request
- Browser Assistant → Browser Background: dispatches
- Assistant → Agent Base: uses runtime
- Agent Base → Chat Model API: requests generation
- Chat Model API → Model Providers: dispatches
- Model Providers → Model Service: sends prompts
- Agent Base → Tool Registry: resolves tools
- Tool Registry → Agent Tools: dispatches calls
- Assistant → Retrieval Tool: uses for RAG
- Retrieval Tool → Document Parser: parses files
- Retrieval Tool → RAG Search: searches records
- Input Documents → Retrieval Tool: supplies files
- Agent Router → Agent Hub: coordinates agents
- Agent Base → Memory: uses memory
- Gradio UI → Assistant Server: requests service
- Browser Assistant → Database Server: sends browser tasks
- Database Server → Workspace State: reads and writes
- Web Client → Assistant Server: sends requests
- MCP Client → MCP Servers: connects to
- Agent Tools → MCP Client: uses integration