# AgentScope Samples [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/agentscope-ai/agentscope-samples/blob/main/LICENSE) [![Python](https://img.shields.io/badge/python-%3E%3D3.10-blue)](https://www.python.org/) [![DeepWiki](https://img.shields.io/badge/DeepWiki-agentscope--samples-navy.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/agentscope-ai/agentscope-samples) [![Docs](https://img.shields.io/badge/docs-AgentScope-blue)](https://doc.agentscope.io/) [![Runtime Docs](https://img.shields.io/badge/docs-AgentScope%20Runtime-red)](https://runtime.agentscope.io/) [![Last Commit](https://img.shields.io/github/last-commit/agentscope-ai/agentscope-samples)](https://github.com/agentscope-ai/agentscope-samples) [[δΈ­ζ–‡README]](README_zh.md) 🎯 **Kickstart Your Agent Journey!** This is a repository that **brings together a variety of ready-to-run Python agent examples**, ranging from command-line mini-tools to **full-stack deployable applications**. ## 🌟 What is AgentScope? **[AgentScope](https://github.com/agentscope-ai/agentscope)** is a **multi-agent framework** that lets you rapidly build **LLM-based intelligent applications**: > Learn more in the [AgentScope Documentation](https://doc.agentscope.io/) - 🧠 Define agents and integrate tools - πŸ“‘ Manage context and conversations - 🀝 Orchestrate collaboration among multiple agents to accomplish tasks **[AgentScope-Runtime](https://github.com/agentscope-ai/agentscope-runtime)** is the runtime framework that enables you to deploy agents as API services: > Learn more in the [AgentScope Runtime Documentation](https://runtime.agentscope.io/) 1. πŸ”„ **Scalable deployment management for multiple agents** 2. πŸ›‘οΈ **Secure sandbox execution for tools** ## ⚑ Getting Started πŸ“Œ **Before running an example**, please check the corresponding `README.md` for installation and execution instructions. > - All examples are built with **Python**. > - Examples are organized by **functionality** and **usage scenario**. > - Some examples use **AgentScope** only. > - Some examples use **both AgentScope and AgentScope Runtime** to implement **deployable full-stack applications with frontend + backend**. > - Full-stack runtime versions have folder names ending with **`_fullstack_runtime`**. ## 🌳 Repository Structure ```bash β”œβ”€β”€ alias/ # Agent to solve real-world problems β”œβ”€β”€ browser_use/ β”‚ β”œβ”€β”€ agent_browser/ # Pure Python browser agent β”‚ β”œβ”€β”€ browser_use_agent_pro/ # Advanced pure python browser agent β”‚ └── browser_use_fullstack_runtime/ # Full-stack runtime version with frontend/backend β”‚ β”œβ”€β”€ deep_research/ β”‚ β”œβ”€β”€ agent_deep_research/ # Pure Python multi-agent research β”‚ └── qwen_langgraph_search_fullstack_runtime/ # Full-stack runtime-enabled research app β”‚ β”œβ”€β”€ games/ β”‚ └── game_werewolves/ # Role-based social deduction game β”‚ β”œβ”€β”€ conversational_agents/ β”‚ β”œβ”€β”€ chatbot/ # Chatbot application β”‚ β”œβ”€β”€ chatbot_fullstack_runtime/ # Runtime-powered chatbot with UI β”‚ β”œβ”€β”€ multiagent_conversation/ # Multi-agent dialogue scenario β”‚ └── multiagent_debate/ # Agents engaging in debates β”‚ β”œβ”€β”€ evaluation/ β”‚ └── ace_bench/ # Benchmarks and evaluation tools β”‚ β”œβ”€β”€ data_juicer_agent/ # Data processing multi-agent system β”œβ”€β”€ tuner/ # Tune AgentScope applications using AgentScope Tuner β”‚ β”œβ”€β”€ math_agent/ # A quick start example for tuning β”‚ β”œβ”€β”€ frozen_lake/ # Teach an agent to play a game requiring multiple steps β”‚ β”œβ”€β”€ learn_to_ask/ # Using LLM-as-a-judge to facilitate agent tuning β”‚ β”œβ”€β”€ email_search/ # Enhance the tool use ability of your agent β”‚ β”œβ”€β”€ werewolf_game/ # Enhance a multi-agent application β”‚ └── data_augment/ # Data augmentation for tuning β”œβ”€β”€ sample_template/ # Template for new sample contributions └── README.md ``` ## πŸ“Œ Example List | Category | Example Folder | Uses AgentScope | Use AgentScope Runtime | Description | | ----------------------- |-------------------------------------------------------| --------------- | ------------ |--------------------------------------------------| | **Data Processing** | data_juicer_agent/ | βœ… | ❌ | Multi-agent data processing with Data-Juicer | | **Browser Use** | browser_use/agent_browser | βœ… | ❌ | Command-line browser automation using AgentScope | | | browser_use/browser_use_agent_pro | βœ… | ❌ | Advanced command-line Python browser agent using AgentScope | | | browser_use/browser_use_fullstack_runtime | βœ… | βœ… | Full-stack browser automation with UI & sandbox | | **Deep Research** | deep_research/agent_deep_research | βœ… | ❌ | Multi-agent research pipeline | | | deep_research/qwen_langgraph_search_fullstack_runtime | ❌ | βœ… | Full-stack deep research app | | **Games** | games/game_werewolves | βœ… | ❌ | Multi-agent roleplay game | | **Conversational Apps** | conversational_agents/chatbot_fullstack_runtime | βœ… | βœ… | Chatbot application with frontend/backend | | | conversational_agents/chatbot | βœ… | ❌ | | | | conversational_agents/multiagent_conversation | βœ… | ❌ | Multi-agent dialogue scenario | | | conversational_agents/multiagent_debate | βœ… | ❌ | Agents engaging in debates | | **Evaluation** | evaluation/ace_bench | βœ… | ❌ | Benchmarks with ACE Bench | | **General AI Agent** | alias/ | βœ… | βœ… | Agent application running in sandbox to solve diverse real-world problems | | **Financial Trading** | evotraders/ | βœ… | ❌ | Self-Evolving Multi-Agent Trading System | ## 🌈 Featured Examples ### πŸ“Š DataJuicer Agent A powerful multi-agent data processing system that leverages Data-Juicer's 200+ operators for intelligent data processing: - **Intelligent Query**: Find suitable operators from 200+ data processing operators - **Automated Pipeline**: Generate Data-Juicer YAML configurations from natural language - **Custom Development**: Create domain-specific operators with AI assistance - **Multiple Retrieval Modes**: LLM-based and vector-based operator matching - **MCP Integration**: Native Model Context Protocol support πŸ“– **Documentation**: [English](data_juicer_agent/README.md) | [δΈ­ζ–‡](data_juicer_agent/README_ZH.md) ### πŸ•΅πŸ» Alias-Agent *Alias-Agent* (short for *Alias*) is designed to serve as an intelligent assistant for tackle diverse and complicated real-world tasks, providing three operational modes for flexible task execution: - **Simple React**: Employs vanilla reasoning-acting loops to iteratively solve problems and execute tool calls. - **Planner-Worker**: Uses intelligent planning to decompose complex tasks into manageable subtasks, with dedicated worker agents handling each subtask independently. - **Built-in Agents**: Leverages specialized agents tailored for specific domains, including *Deep Research Agent* for comprehensive analysis and *Browser-use Agent* for web-based interactions. Beyond being a ready-to-use agent, we envision Alias as a foundational template that can be adapted to different scenarios. πŸ“– **Documentation**: [English](alias/README.md) | [δΈ­ζ–‡](alias/README_ZH.md) ### πŸ“ˆ EvoTraders *EvoTraders* is a financial trading agent framework that builds a trading system capable of continuous learning and evolution in real markets through multi-agent collaboration and memory systems. Key features include: - **Multi-Agent Collaboration**: A team of specialized analysts (Fundamentals, Technical, Sentiment, Valuation) and managers collaborating like a real trading team. - **Memory Enhancement & Evolution**: Agents reflect and summarize after trades using the ReMe memory framework, evolving their trading styles over time. - **Real-Time & Backtesting**: Supports both real-time market data integration for live trading and backtesting modes. - **Visualized Dashboard**: A comprehensive frontend to observe analysis processes, communication, and performance tracking. πŸ“– **Documentation**: [English](evotraders/README.md) | [δΈ­ζ–‡](evotraders/README_zh.md) ## πŸ†˜ Getting Help If you: - Need installation help - Encounter issues - Want to understand how a sample works Please: 1. Read the sample-specific `README.md`. 2. File a [GitHub Issue](https://github.com/agentscope-ai/agentscope-samples/issues). 3. Join the community discussions: | [Discord](https://discord.gg/eYMpfnkG8h) | DingTalk | | ------------------------------------------------------------ | ------------------------------------------------------------ | | | | ## 🀝 Contributing We welcome contributions such as: - Bug reports - New feature requests - Documentation improvements - Code contributions See the [CONTRIBUTING.md](CONTRIBUTING.md) for details. ## πŸ“„ License This project is licensed under the **Apache 2.0 License** – see the [LICENSE](LICENSE) file for details. ## Contributors ✨ [![All Contributors](https://img.shields.io/badge/all_contributors-27-orange.svg?style=flat-square)](#contributors-) Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/emoji-key/)):
Weirui Kuang
Weirui Kuang

🚧 πŸ’» πŸ‘€ πŸ“–
Osier-Yi
Osier-Yi

🚧 πŸ’» πŸ‘€ πŸ“–
DavdGao
DavdGao

🚧
qbc
qbc

🚧
Lamont Huffman
Lamont Huffman

πŸ’» ⚠️
Daoyuan Chen
Daoyuan Chen

πŸ’» πŸ’‘
MeiXin Chen
MeiXin Chen

πŸ’» πŸ’‘
Yilun Huang
Yilun Huang

πŸ’» πŸ’‘
ShenQianli
ShenQianli

πŸ’» πŸ’‘
ZiTao-Li
ZiTao-Li

πŸ’» πŸ’‘
Yuexiang XIE
Yuexiang XIE

πŸ’» πŸ’‘
Yue Cui
Yue Cui

πŸ’» πŸ’‘ 🚧 πŸ“–
Zexi Li
Zexi Li

πŸ’» πŸ’‘
lalaliat
lalaliat

πŸ’» πŸ’‘
Dandan Liu
Dandan Liu

πŸ’» πŸ’‘
Tianjing Zeng
Tianjing Zeng

πŸ’» πŸ’‘
zhijianma
zhijianma

πŸ’» πŸ’‘
Jiaji
Jiaji

πŸ’» πŸ’‘
duoyw
duoyw

πŸ’» πŸ’‘
JustinDing
JustinDing

πŸ’» πŸ’‘
jinliyl
jinliyl

πŸ’» πŸ’‘
y1y5
y1y5

πŸ’» πŸ’‘
LuYi
LuYi

πŸ’» πŸ’‘
Wu Yue
Wu Yue

πŸ’» πŸ’‘
Zhiling (Bruce) Luo
Zhiling (Bruce) Luo

πŸ’» πŸ’‘ πŸ“–
sidiluo
sidiluo

πŸ’»
Attan
Attan

πŸ’‘ πŸ’» πŸ“–
Add your contributions
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!