From c0b24a85010477e6c2e59a40059ec202b2d9ab8c Mon Sep 17 00:00:00 2001 From: DavdGao Date: Fri, 7 Jun 2024 15:44:52 +0800 Subject: [PATCH 1/7] Reorganize tutorial; Add project for all examples; --- README.md | 6 +- README_ZH.md | 6 +- docs/sphinx_doc/en/source/index.rst | 28 ++-- .../en/source/tutorial/104-usecase.md | 4 +- .../en/source/tutorial/105-logging.md | 32 +--- .../en/source/tutorial/201-agent.md | 2 +- .../en/source/tutorial/203-parser.md | 2 +- .../en/source/tutorial/204-service.md | 2 +- docs/sphinx_doc/en/source/tutorial/209-gui.md | Bin 0 -> 7246 bytes .../sphinx_doc/en/source/tutorial/advance.rst | 15 -- docs/sphinx_doc/en/source/tutorial/main.md | 39 +++-- .../en/source/tutorial/quick_start.rst | 11 -- docs/sphinx_doc/zh_CN/source/index.rst | 28 ++-- .../zh_CN/source/tutorial/104-usecase.md | 9 +- .../zh_CN/source/tutorial/105-logging.md | 2 +- .../zh_CN/source/tutorial/201-agent.md | 2 +- .../zh_CN/source/tutorial/202-pipeline.md | 2 +- .../zh_CN/source/tutorial/203-parser.md | 2 +- .../zh_CN/source/tutorial/204-service.md | 2 +- .../zh_CN/source/tutorial/209-gui.md | 138 ++++++++++++++++++ .../zh_CN/source/tutorial/advance.rst | 15 -- docs/sphinx_doc/zh_CN/source/tutorial/main.md | 37 +++-- .../zh_CN/source/tutorial/quick_start.rst | 11 -- examples/conversation_basic/conversation.py | 1 + .../conversation_nl2sql/react_nl2sql.ipynb | 1 + .../auto-discussion.py | 6 +- .../rag_example.py | 1 + .../main.ipynb | 6 +- .../conversation_with_gpt-4o.py | 5 +- .../conversation_with_langchain.py | 4 +- examples/conversation_with_mentions/main.py | 1 + .../code/conversation_with_react_agent.py | 5 +- .../conversation_with_react_agent/main.ipynb | 5 +- .../main.ipynb | 5 +- .../swe_agent.py | 0 .../swe_agent_prompts.py | 0 .../swe_agent_service_func.py | 0 .../distributed_basic/distributed_dialog.py | 2 + .../distributed_debate/distributed_debate.py | 2 + .../README.md | 0 .../answerer_agent.py | 0 .../configs/model_configs.json | 0 .../main.py | 1 + .../searcher_agent.py | 0 examples/game_gomoku/main.ipynb | 5 +- examples/game_werewolf/werewolf.py | 1 + 46 files changed, 272 insertions(+), 174 deletions(-) create mode 100644 docs/sphinx_doc/en/source/tutorial/209-gui.md delete mode 100644 docs/sphinx_doc/en/source/tutorial/advance.rst delete mode 100644 docs/sphinx_doc/en/source/tutorial/quick_start.rst create mode 100644 docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md delete mode 100644 docs/sphinx_doc/zh_CN/source/tutorial/advance.rst delete mode 100644 docs/sphinx_doc/zh_CN/source/tutorial/quick_start.rst rename examples/{swe_agent => conversation_with_swe-agent}/main.ipynb (98%) rename examples/{swe_agent => conversation_with_swe-agent}/swe_agent.py (100%) rename examples/{swe_agent => conversation_with_swe-agent}/swe_agent_prompts.py (100%) rename examples/{swe_agent => conversation_with_swe-agent}/swe_agent_service_func.py (100%) rename examples/{distributed_search => distributed_parallel_optimization}/README.md (100%) rename examples/{distributed_search => distributed_parallel_optimization}/answerer_agent.py (100%) rename examples/{distributed_search => distributed_parallel_optimization}/configs/model_configs.json (100%) rename examples/{distributed_search => distributed_parallel_optimization}/main.py (98%) rename examples/{distributed_search => distributed_parallel_optimization}/searcher_agent.py (100%) diff --git a/README.md b/README.md index d0abc1d24..c7d587548 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ https://github.com/DavdGao/AgentScope/assets/102287034/d9acf581-20d2-4294-8d10-9 - **[2024-04-06]** We release **AgentScope** v0.0.3 now! -- **[2024-04-06]** New examples [Gomoku](https://github.com/modelscope/agentscope/blob/main/examples/game_gomoku), [Conversation with ReAct Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_react_agent), [Conversation with RAG Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_RAG_agents) and [Distributed Parallel Search](https://github.com/modelscope/agentscope/blob/main/examples/distributed_search) are available now! +- **[2024-04-06]** New examples [Gomoku](https://github.com/modelscope/agentscope/blob/main/examples/game_gomoku), [Conversation with ReAct Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_react_agent), [Conversation with RAG Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_RAG_agents) and [Distributed Parallel Search](https://github.com/modelscope/agentscope/blob/main/examples/distributed_parallel_optimization) are available now! - **[2024-03-19]** We release **AgentScope** v0.0.2 now! In this new version, AgentScope supports [ollama](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models)(A local CPU inference engine), [DashScope](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models) and Google [Gemini](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models) APIs. @@ -143,7 +143,7 @@ the following libraries. - [Conversation in Natural Language to Query SQL](https://github.com/modelscope/agentscope/blob/main/examples/conversation_nl2sql/) - [Conversation with RAG Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_RAG_agents) - new[Conversation with gpt-4o](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_gpt-4o) - - new[Conversation with Software Engineering Agent](https://github.com/modelscope/agentscope/blob/main/examples/swe_agent/) + - new[Conversation with Software Engineering Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_swe-agent/) - new[Conversation with Customized Services](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_customized_services/) - Game @@ -153,7 +153,7 @@ the following libraries. - Distribution - [Distributed Conversation](https://github.com/modelscope/agentscope/blob/main/examples/distributed_basic) - [Distributed Debate](https://github.com/modelscope/agentscope/blob/main/examples/distributed_debate) - - [Distributed Parallel Search](https://github.com/modelscope/agentscope/blob/main/examples/distributed_search) + - [Distributed Parallel Optimization](https://github.com/modelscope/agentscope/blob/main/examples/distributed_parallel_optimization) - [Distributed Large Scale Simulation](https://github.com/modelscope/agentscope/blob/main/examples/distributed_simulation) More models, services and examples are coming soon! diff --git a/README_ZH.md b/README_ZH.md index 068d687fc..2b96f496d 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -44,7 +44,7 @@ - **[2024-04-06]** 我们现在发布了**AgentScope** v0.0.3版本! -- **[2024-04-06]** 新的样例“[五子棋](./examples/game_gomoku)”,“[与ReAct智能体对话](./examples/conversation_with_react_agent)”,“[与RAG智能体对话](./examples/conversation_with_RAG_agents)”,“[分布式并行搜索](./examples/distributed_search)”上线了! +- **[2024-04-06]** 新的样例“[五子棋](./examples/game_gomoku)”,“[与ReAct智能体对话](./examples/conversation_with_react_agent)”,“[与RAG智能体对话](./examples/conversation_with_RAG_agents)”,“[分布式并行搜索](./examples/distributed_parallel_optimization)”上线了! - **[2024-03-19]** 我们现在发布了**AgentScope** v0.0.2版本!在这个新版本中,AgentScope支持了[ollama](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models)(本地CPU推理引擎),[DashScope](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models)和[Gemini](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models) APIs。 @@ -125,7 +125,7 @@ AgentScope支持使用以下库快速部署本地模型服务。 - [通过对话查询SQL信息](./examples/conversation_nl2sql/) - [与RAG智能体对话](./examples/conversation_with_RAG_agents) - new[与gpt-4o模型对话](./examples/conversation_with_gpt-4o) - - new[与SoftWare Engineering智能体对话](./examples/swe_agent/) + - new[与SoftWare Engineering智能体对话](./examples/conversation_with_swe-agent/) - new[与自定义服务对话](./examples/conversation_with_customized_services/) @@ -136,7 +136,7 @@ AgentScope支持使用以下库快速部署本地模型服务。 - 分布式 - [分布式对话](./examples/distributed_basic) - [分布式辩论](./examples/distributed_debate) - - [分布式并行搜索](./examples/distributed_search) + - [分布式并行搜索](./examples/distributed_parallel_optimization) - [分布式大规模仿真](./examples/distributed_simulation) 更多模型API、服务和示例即将推出! diff --git a/docs/sphinx_doc/en/source/index.rst b/docs/sphinx_doc/en/source/index.rst index 1aad67356..5fab39acf 100644 --- a/docs/sphinx_doc/en/source/index.rst +++ b/docs/sphinx_doc/en/source/index.rst @@ -18,8 +18,23 @@ AgentScope Documentation :hidden: :caption: AgentScope Tutorial - tutorial/quick_start.rst - tutorial/advance.rst + tutorial/101-agentscope.md + tutorial/102-installation.md + tutorial/103-example.md + + tutorial/203-model.md + tutorial/206-prompt.md + tutorial/201-agent.md + tutorial/205-memory.md + tutorial/203-parser.md + tutorial/204-service.md + tutorial/202-pipeline.md + tutorial/208-distribute.md + tutorial/209-gui.md + tutorial/105-logging.md + tutorial/207-monitor.md + tutorial/104-usecase.md + tutorial/contribute.rst @@ -41,11 +56,4 @@ AgentScope Documentation agentscope.server agentscope.web agentscope.prompt - agentscope.utils - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + agentscope.utils \ No newline at end of file diff --git a/docs/sphinx_doc/en/source/tutorial/104-usecase.md b/docs/sphinx_doc/en/source/tutorial/104-usecase.md index 3aa3b7d0b..4a03d3e45 100644 --- a/docs/sphinx_doc/en/source/tutorial/104-usecase.md +++ b/docs/sphinx_doc/en/source/tutorial/104-usecase.md @@ -1,11 +1,9 @@ (104-usecase-en)= -# Crafting Your First Application +# Example: Werewolf Game img -Before diving into the advanced topics of AgentScope, in this tutorial, we will give you a glance at building a Werewolf application with out-of-the-box components of AgentScope. - **Werewolf** is a well-known social-deduction game, that involves an imaginary village where a few villagers are secretly werewolves, and the objective is to identify who they are before they eliminate all other players. It's a good use case to demonstrate the interaction between multiple autonomous agents, each with its own objectives and the need for communication. Let the adventure begin to unlock the potential of multi-agent applications with AgentScope! diff --git a/docs/sphinx_doc/en/source/tutorial/105-logging.md b/docs/sphinx_doc/en/source/tutorial/105-logging.md index 98f872a8b..4f1f9dd00 100644 --- a/docs/sphinx_doc/en/source/tutorial/105-logging.md +++ b/docs/sphinx_doc/en/source/tutorial/105-logging.md @@ -1,6 +1,6 @@ (105-logging-en)= -# Logging and WebUI +# Logging Welcome to the tutorial on logging in multi-agent applications with AgentScope. We'll also touch on how you can visualize these logs using a simple web interface. This guide will help you track the agent's interactions and system information in a clearer and more organized way. @@ -62,34 +62,4 @@ logger.warning("The agent is running slower than expected.") logger.error("The agent encountered an unexpected error while processing a request.") ``` -## Integrating logging with WebUI - -To visualize these logs and running details, AgentScope provides a simple -web interface. - -### Quick Running - -You can run the WebUI in the following python code: - -```python -import agentscope - -agentscope.web.init( - path_save="YOUR_SAVE_PATH" -) -``` - -By this way, you can see all the running instances and projects in `http://127.0.0.1:5000` as follows: - -![webui](https://img.alicdn.com/imgextra/i3/O1CN01kpHFkn1HpeYEkn60I_!!6000000000807-0-tps-3104-1849.jpg) - -By clicking a running instance, we can observe more details. - -![The running details](https://img.alicdn.com/imgextra/i2/O1CN01AZtsf31MIHm4FmjjO_!!6000000001411-0-tps-3104-1849.jpg) - -### Note - -The WebUI is still under development. We will provide more features and -better user experience in the future. - [[Return to the top]](#105-logging-en) diff --git a/docs/sphinx_doc/en/source/tutorial/201-agent.md b/docs/sphinx_doc/en/source/tutorial/201-agent.md index dbe2f3e77..5b8563f4b 100644 --- a/docs/sphinx_doc/en/source/tutorial/201-agent.md +++ b/docs/sphinx_doc/en/source/tutorial/201-agent.md @@ -1,6 +1,6 @@ (201-agent-en)= -# Customizing Your Own Agent +# Agent This tutorial helps you to understand the `Agent` in more depth and navigate through the process of crafting your own custom agent with AgentScope. We start by introducing the fundamental abstraction called `AgentBase`, which serves as the base class to maintain the general behaviors of all agents. Then, we will go through the *AgentPool*, an ensemble of pre-built, specialized agents, each designed with a specific purpose in mind. Finally, we will demonstrate how to customize your own agent, ensuring it fits the needs of your project. diff --git a/docs/sphinx_doc/en/source/tutorial/203-parser.md b/docs/sphinx_doc/en/source/tutorial/203-parser.md index 5257a8e02..71fff4d59 100644 --- a/docs/sphinx_doc/en/source/tutorial/203-parser.md +++ b/docs/sphinx_doc/en/source/tutorial/203-parser.md @@ -1,6 +1,6 @@ (203-parser-en)= -# Model Response Parser +# Response Parser ## Table of Contents diff --git a/docs/sphinx_doc/en/source/tutorial/204-service.md b/docs/sphinx_doc/en/source/tutorial/204-service.md index 8f8ded830..dad6fa3d9 100644 --- a/docs/sphinx_doc/en/source/tutorial/204-service.md +++ b/docs/sphinx_doc/en/source/tutorial/204-service.md @@ -1,6 +1,6 @@ (204-service-en)= -# Service +# Tool Service function is a set of multi-functional utility tools that can be used to enhance the capabilities of agents, such as executing Python code, diff --git a/docs/sphinx_doc/en/source/tutorial/209-gui.md b/docs/sphinx_doc/en/source/tutorial/209-gui.md new file mode 100644 index 0000000000000000000000000000000000000000..6092b33dbea039aef663cdc46b55ff8924c54c09 GIT binary patch literal 7246 zcmbVRYi}FJ747H!6=MnrY(u0(7kN~O(khBw3$Pv4@*_nMh{N3>ccSIadUjV79R$eF zX#ZY*Nzb{nFOo9a#z7!*wR7h_&OP^`hfj|GGG5kpZ1P8^QFNfrmL{*RVpkY-Rn>`g zQMC6+*;46T;hkKSuJ*A>)O#~mZ!c8kTy|qCwQyd|YnvrDU*g?Ftz2#^=lOM2XO$gm zUZiwUWH#27b$L07E-F=ccWV<*l4WkqGYg}u+MDtuipJ{k%z4CRQi*f@E4n@_>xf@*XUA;_2 zjrP^lmNdaYQ!4S^`J1v5-Gds1TjSz7>otHsf*Zn}pR!!7ZI#k2ua`?I^_lw4yQ09y z$B)Bhf7e-N{Dv2uyA|Iloy#AHB3H)W8n0gJ98O)qt$S}p2L}kJ_SJpyed83&!0$AE zGUSJ9VSQOClb7(hxG&YW24>+ssF8?QGF=(Ggqur5Pr1cF_9S|fn*6Zyd}&t&A_GV6 z#PxDhr8peB#2~b@*{qNU5#D#yh#)D6#whAPPlB2g3rIbD#8Uw20zrpxUG=x#+7eJa z>k%E!DP5^qT2;l#(b4qDmy=`sH$D0M`1p7>QBm~$0_xPh1bkZH#Hr4gMpRE7Y$l+o zUxOE$11~OwcmU`QVjXVOeA57&0o+Eo_RE^FBgFrRA0mZ+)b4cD88tfO!<~Nz3b9ca zmr5rIGOFB;Tmu1-MiWozm;1ytQiC)JR$i~>h`|;RhT;(Y>jc13r|QQYow~0<9Nsc< zNHvPv%Gb`Bq9PBD?(Xi6_&+WvVe%(_A&-CRZcb-*eqMVI0A!oPUKN$baRG{gyUM`Wy%wZ8@ve>Q60}?HP(vsg0*u?)J ztwNyyuOl_){Rs#p#7n(0YNg}U=45oQ-oAcuRA>+$R4GBJCXY80bs=$9YmKS^5AWr! z4bmJ$`c_<@p_Sk86vVGl735yQB%V9i{wTw}Jh8QJ?i=YH#KZraKM-6FjX2xw$ zKWj=lKo^rxR$y}`PD$VR$|Q#mo4BvK-<*w?Fs*M4J(U~AkUYjN1;??V> zcAxdNyR86H$rujaHV8?;Xb%|Q%Gx5Ap{YbkS(w-^Hk3CD#pAm6*^Ky@>8>_4g=qGF zFt?PhChU{RL_Wa}KZEv8$!DWOdBiXczxO(vj_$2sqn_Ual_J@87&&;NWxr52TW`S7 z-bJ_8tOFqTTctKbI-;DYH%?Fk5w!&>6T4WT`P%96dg+a8<$_sb`b=nZMyqGknlT)N zWD-T+2v?q{@AEh`Cavb5QZxY8<^=$VHo{B0CjC~EQ>nfJEx9pj`7rv|VC*ldMq}1R7BT3WvqHGkIxf^1YRXa=&dV4%MR0+ELF>olN<-99T%g@w@5EB+08XtM30tA+6+}7=cr?!8w2BHjMxoW+chL) z2#hR2Cj6jc2=O`#2MP>;LMIyH3;gf0xw`{RrN(--sB`$%H zM01+Dl(CflFT5FZvc-6Grx|uc+NsoJh2;6%uzONE{!nX1Bnh+Kj#om|2!y4cX9m#% z@^Yw86^4^@U*MXd^L*DvYDZYFa2?IiJ3}uo5kCmp1{XnVnb7y>76E5IChmX z^O(EvGfoW~N-`XBZ(j`X{B=52aPcxf9Wgk@kG_e%wkr&;J`NSE#1MuD6TB5C`2_m$ ztGPoUkL>j5`|0_s zt7C3d5|tV4WfOw98tzcIIB823RN{RhFW^KsG_a~Uqv@vjP&nG zAzkb2MlNU>GIeWZc(stTeVyj zg2ssN#Y{37xR5Iy;1*XZM}`wx#0PmmoG-_Wk$_|U|SnILJuP%M-C<%nn`Xa z#pSf8pRoBN<+760SZM;h*vfF>nzC+Y%h1^_0>%((16w@QK*8i*|@cH9dZ~DUzr3G z{209+xS#VSi1H=kmPv~vmY=AnP-C+NcUgPcJkDx_7y(8-1x=G-xd+LF%|rqpfiZ!2 za+r|(6?8%ScOICY)5N6%ZEyHTjlOo2sjIUDr>f8^NCgL&uyhw5momY_EbvlDg}>Ry z;co(oMwQ;EXVzp%sotT{!V|oWJ3t-Ye5f%NGD%rH7U8XSl~=f;&VXMTcbh*42#Vzv zn$ayNQL0!G=p4V4vkxr zzd1-HoLwarp-hCWqg+vuqKm(QSY3ICHvfg_(e|H8SVm3gS%r#3U&kH~H>%jNTWu9_>GrjF_Z oN8{#>vDn7^P!C%eXmtgc0J&)P+DraK-p0&@n+VOsJeoxR0sV;VI{*Lx literal 0 HcmV?d00001 diff --git a/docs/sphinx_doc/en/source/tutorial/advance.rst b/docs/sphinx_doc/en/source/tutorial/advance.rst deleted file mode 100644 index 64bd86508..000000000 --- a/docs/sphinx_doc/en/source/tutorial/advance.rst +++ /dev/null @@ -1,15 +0,0 @@ -Advanced Exploration -==================== - -.. toctree:: - :maxdepth: 2 - - 201-agent.md - 202-pipeline.md - 203-model.md - 203-parser.md - 204-service.md - 205-memory.md - 206-prompt.md - 207-monitor.md - 208-distribute.md diff --git a/docs/sphinx_doc/en/source/tutorial/main.md b/docs/sphinx_doc/en/source/tutorial/main.md index 230d5efe6..c06a8d551 100644 --- a/docs/sphinx_doc/en/source/tutorial/main.md +++ b/docs/sphinx_doc/en/source/tutorial/main.md @@ -1,4 +1,4 @@ -# Welcome to AgentScope Tutorial Hub +# Welcome to AgentScope Tutorial AgentScope is an innovative multi-agent platform designed to empower developers to build multi-agent applications with ease, reliability, and high performance. It features three high-level capabilities: @@ -10,26 +10,23 @@ AgentScope is an innovative multi-agent platform designed to empower developers ## Tutorial Navigator -### Getting Started - -- [About AgentScope](101-agentscope-en) -- [Installation](102-installation-en) -- [Quick Start](103-start-en) -- [Crafting Your First Application](104-usecase-en) -- [Logging and WebUI](105-logging-en) - -### Advanced Exploration - -- [Customizing Your Own Agent](201-agent-en) -- [Pipeline and MsgHub](202-pipeline-en) -- [Model](203-model-en) -- [Service](204-service-en) -- [Memory](205-memory-en) -- [Prompt Engineering](206-prompt-en) -- [Monitor](207-monitor-en) -- [Distribution](208-distribute-en) +- [About AgentScope](101-agentscope.md) +- [Installation](102-installation.md) +- [Quick Start](103-example.md) +- [Model](203-model.md) +- [Prompt Engineering](206-prompt.md) +- [Agent](201-agent.md) +- [Memory](205-memory.md) +- [Response Parser](203-parser.md) +- [Tool](204-service.md) +- [Pipeline and MsgHub](202-pipeline.md) +- [Distribution](208-distribute.md) +- [AgentScope Studio](209-gui.md) +- [Logging](105-logging.md) +- [Monitor](207-monitor.md) +- [Example: Werewolf Game](104-usecase.md) ### Getting Involved -- [Joining AgentScope Community](301-community-en) -- [Contribute to AgentScope](302-contribute-en) +- [Joining AgentScope Community](301-community.md) +- [Contribute to AgentScope](302-contribute.md) diff --git a/docs/sphinx_doc/en/source/tutorial/quick_start.rst b/docs/sphinx_doc/en/source/tutorial/quick_start.rst deleted file mode 100644 index ecf79d47e..000000000 --- a/docs/sphinx_doc/en/source/tutorial/quick_start.rst +++ /dev/null @@ -1,11 +0,0 @@ -Getting Started -=============== - -.. toctree:: - :maxdepth: 2 - - 101-agentscope.md - 102-installation.md - 103-example.md - 104-usecase.md - 105-logging.md \ No newline at end of file diff --git a/docs/sphinx_doc/zh_CN/source/index.rst b/docs/sphinx_doc/zh_CN/source/index.rst index 662fb267c..422a9cced 100644 --- a/docs/sphinx_doc/zh_CN/source/index.rst +++ b/docs/sphinx_doc/zh_CN/source/index.rst @@ -18,8 +18,23 @@ AgentScope 文档 :hidden: :caption: AgentScope 教程 - tutorial/quick_start.rst - tutorial/advance.rst + tutorial/101-agentscope.md + tutorial/102-installation.md + tutorial/103-example.md + + tutorial/203-model.md + tutorial/206-prompt.md + tutorial/201-agent.md + tutorial/205-memory.md + tutorial/203-parser.md + tutorial/204-service.md + tutorial/202-pipeline.md + tutorial/208-distribute.md + tutorial/209-gui.md + tutorial/105-logging.md + tutorial/207-monitor.md + tutorial/104-usecase.md + tutorial/contribute.rst @@ -41,11 +56,4 @@ AgentScope 文档 agentscope.server agentscope.web agentscope.prompt - agentscope.utils - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + agentscope.utils \ No newline at end of file diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/104-usecase.md b/docs/sphinx_doc/zh_CN/source/tutorial/104-usecase.md index cf0ebfb70..7a4278809 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/104-usecase.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/104-usecase.md @@ -1,14 +1,13 @@ (104-usecase-zh)= -# 创造您的第一个应用 +# 样例:狼人杀游戏 img -在介绍更多AgentScope的高阶内容前,我们先会给您展示如何利用AgentScope内置的功能,快速搭建一个狼人杀游戏模拟应用。 +**狼人杀**是非常具有代表性的,具有复杂SOP流程的游戏。游戏中,玩家分别扮演狼人和村民的角色进行对抗,其中一些村民(例如预言家和女巫)还有特殊的技能。当狼人被全部杀死后村民取得胜利;而当狼人的数量等于村民的数量时即狼人获得胜利。 +我们将利用 AgentScope 构建一个狼人杀游戏,用 Agent 来扮演不同的角色进行互动,并推动游戏的进行。 -**狼人杀**是一个广为人知的桌面游戏。游戏设定在一个虚拟世界的村庄里。村庄里有真正的村民、也有伪装成村民的狼人;每个参与者都在游戏中都有自己的角色。对于村民方而言,他们的胜利条件是在全灭之前找出并杀死所有的狼人;对于狼人方而言,胜利条件就是杀死所有的村民。狼人杀这样的游戏是一个很好的可以自动展示多个有不同目标的智能体之间如何互动。 - -话不多说,让我们开始通过狼人杀这个游戏,解锁AgentScope多智体的应用吧! +完整的样例代码可以在GitHub仓库的[examples/game_werewolf](https://github.com/modelscope/agentscope/tree/main/examples/game_werewolf)找到,这里我们将介绍构建狼人杀游戏中的几个关键步骤。 ## 开始 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/105-logging.md b/docs/sphinx_doc/zh_CN/source/tutorial/105-logging.md index d517cd46b..16d8db1cd 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/105-logging.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/105-logging.md @@ -1,6 +1,6 @@ (105-logging-zh)= -# 日志和WebUI +# 日志 本节教程主要是关于AgentScope的日志记录(logging)功能。我们会介绍如何能美观地将这些日志可视化。这个模块会帮助您更方便、清晰、有组织地跟踪智能体之间的互动和各种系统消息。 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/201-agent.md b/docs/sphinx_doc/zh_CN/source/tutorial/201-agent.md index 6959bc929..b6df3dc7a 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/201-agent.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/201-agent.md @@ -1,6 +1,6 @@ (201-agent-zh)= -# 定制你自己的Agent +# Agent 本教程帮助你更深入地理解Agent,并引导你通过使用AgentScope定制自己的自定义agent。 我们首先介绍一个称为AgentBase的基本抽象概念,它作为基类维护所有agent的通用行为。然后,我们将探讨AgentPool,这是一个由预构建的、专门化的agent组成的集合,每个agent都设计有特定的目的。最后,我们将演示如何定制你自己的agent,确保它符合你项目的需求。 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/202-pipeline.md b/docs/sphinx_doc/zh_CN/source/tutorial/202-pipeline.md index 852785fca..5713c317a 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/202-pipeline.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/202-pipeline.md @@ -1,6 +1,6 @@ (202-pipeline-zh)= -# Pipeline 和 MsgHub +# Pipeline和MsgHub **Pipeline**和**Message Hub**主要用于描绘应用中信息的交换和传播过程,它们极大简化了Multi-Agent应用流程的编排工作。 在本教程中,我们将详细的介绍Pipeline和Message Hub的原理和使用方式。 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/203-parser.md b/docs/sphinx_doc/zh_CN/source/tutorial/203-parser.md index 3f9755484..1ae7fe863 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/203-parser.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/203-parser.md @@ -1,6 +1,6 @@ (203-parser-zh)= -# 模型结果解析 +# 结果解析 ## 目录 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/204-service.md b/docs/sphinx_doc/zh_CN/source/tutorial/204-service.md index 7b54cd315..788d2bdad 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/204-service.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/204-service.md @@ -1,6 +1,6 @@ (204-service-zh)= -# 服务函数 +# 工具 服务函数(Service function)是可以增强智能体能力工具,例如执行Python代码、网络搜索、 文件操作等。本教程概述了AgentScope中可用的服务功能,同时介绍如何使用它们来增强智能体的能力。 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md b/docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md new file mode 100644 index 000000000..4ecf5ef1c --- /dev/null +++ b/docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md @@ -0,0 +1,138 @@ +(209-gui-zh)= + +# AgentScope Studio + +AgentScope Studio 是一个开源的 Web UI 工具包,用于构建和监控多智能体应用程序。它提供以下功能: + +- **Dashboard**:一个用户友好的界面,可以在其中监视正在运行的应用程序,并查看运行历史。 +- **Workstation**:一个强大的界面,可通过**拖拽**的方式构建多智能体应用程序。 +- **Gallery**:即将推出! +- **Server Management**:即将推出! + + +## 启动 AgentScope Studio + +要启动 Studio,请首先确保已安装了最新版本的 AgentScope。然后,可以通过运行以下 Python 代码: + +```python +import agentscope + +agentscope.studio.init() +``` + +之后,可以在 `http://127.0.0.1:5000` 访问 AgentScope Studio。 + +当然,AgentScope Studio的 IP 地址和端口都可以更改,并且可以通过以下方式引入应用的运行记录: + +```python +import agentscope + +agentscope.studio.init( + host="127.0.0.1", # AgentScope Studio 的 IP 地址 + port=5000, # AgentScope Studio 的端口号 + run_dirs = [ # 您的运行历史目录 + "xxx/xxx/runs", + "xxx/xxx/runs" + ] +) +``` + +## Dashboard + +Dashboard 是一个 Web 界面,用于监视正在运行的应用程序,并查看运行历史。 + +## 注意 + +目前,Dashboard 存在以下限制,我们正在努力改进。欢迎任何反馈、贡献或建议! + +- 运行的应用程序和 AgentScope Studio 必须在同一台机器上运行,以保持 URL 和路径的一致性。如果需要在其它机器上访问 AgentScope Studio,可以尝试通过在远程机器上运行以下命令将端口转发到远程机器: + + ```bash + # 假设 AgentScope 在 {as_host}:{as_port} 上运行,远程机器的端口为 {remote_machine_port} + ssh -L {remote_machine_port}:{as_host}:{as_port} [{user_name}@]{as_host} + ``` + +- 对于分布式应用程序,支持单机多进程模式,但尚不支持多机多进程模式。 + +### 注册应用程序 + +启动 AgentScope Studio 后,可以通过指定 `agentscope.init()` 函数中的 `studio_url` 参数来注册应用程序: + +```python +import agentscope + +agentscope.init( + # ... + project="xxx", + name="xxx", + studio_url="http://127.0.0.1:5000" # AgentScope Studio 的 URL +) +``` + +注册后,可以在 Dashboard 中查看正在运行的应用程序。为了区分不同的应用程序,可以指定应用程序的 `project` 和 `name`。 + +> 注意:一旦注册了应用程序,`agentscope.agents.UserAgent` 中的用户输入就会转移到 AgentScope Studio 的 Dashboard 中,您可以在 Dashboard 中输入。 + +### 引入运行历史 + +在 AgentScope 中,运行历史默认会保存在 `./runs` 目录下。为了引入运行历史,可以在 `agentscope.studio.init()` 函数中指定 `run_dirs` 参数: + +```python +import agentscope + +agentscope.studio.init( + run_dirs = ["xxx/runs",] +) +``` + +## About Workstation + +Workstation 是为零代码用户设计的,可以通过**拖拽**的方式构建多智能体应用程序。 + +> 注意:Workstation 仍处于快速迭代阶段,界面和功能可能会有所变化。欢迎任何反馈、贡献或建议! + +### 快速使用 + +AgentScope Studio中,拖过点击 workstation 图标进入 Workstation 界面。 +它由侧边栏、工作区和顶部工具栏组成。 + +- **侧边栏**:提供预构建的示例,帮助开发者熟悉工作站,并提供可拖动的组件来构建应用程序。 +- **工作区**:主要工作区,可以在其中拖放组件来构建应用程序。 +- **顶部工具栏**:包含导出、加载、检查和运行等功能。 + +

+agentscope-logo +

+ +#### 内置样例 + +对于初学者,建议从预构建的示例开始,可以直接点击示例以将其导入到中央工作区。或者,为了获得更有结构化的学习体验,您可以选择跟随每个示例链接的教程。这些教程将逐步引导您如何在 AgentScope Workstation 上构建每个多智能体应用程序。 + +#### 构建应用程序 + +要构建应用程序,请按照以下步骤操作: +- **选择和拖动组件**:从侧边栏中选择您想要的组件,然后将其拖放到中央工作区。 +- **连接节点**:大多数节点都有输入和输出点。单击一个组件的输出点,然后将其拖动到另一个组件的输入点,以创建消息流管道。这个过程允许不同的节点传递消息。 +- **配置节点**:将节点拖放到工作区后,单击任何节点以填写其配置设置。可以自定义提示、参数和其他属性。 + +#### 运行应用程序 + +构建应用程序后,单击“运行”按钮。 +在运行之前,Workstation 将检查您的应用程序是否存在任何错误。如果有任何错误,您将被提示在继续之前纠正它们。 +之后,应用程序将在与 AgentScope Studio 相同的 Python 环境中执行,并且可以在 Dashboard 中找到它。 + +#### 导入/导出应用程序 + +AgentScope Workstation 支持导入和导出应用程序。 +单击“导出 HTML”或“导出 Python”按钮,以生成可以分发给社区或本地保存的代码。 +需要进一步编辑应用程序,只需单击“导入 HTML”按钮,将之前导出的 HTML 代码上传回 AgentScope Workstation。 + +#### 检查应用程序 + +构建应用程序后,可以单击“检查”按钮来验证应用程序结构的正确性。将执行以下检查规则,不用担心这些规则过于复杂,Workstation 将会自动执行检查并给出提示。 + +- Model 和 Agent 的存在:每个应用程序必须包含至少一个 model 节点和一个 agent 节点。 +- 单连接策略:每个组件的输入不应该有多个连接。 +- 必填字段验证:所有必填字段必须填充,以确保每个节点具有正确运行所需的参数。 +- 一致的配置命名:Agent 节点使用的“Model config name”必须对应于 Model 节点中定义的“Config Name”。 +- 节点嵌套正确:ReActAgent 等节点应仅包含工具节点。类似地,IfElsePipeline 等 Pipeline 节点应包含正确数量的元素(不超过 2 个),而 ForLoopPipeline、WhileLoopPipeline 和 MsgHub 应遵循一个元素的规则(必须是 SequentialPipeline 作为子节点)。 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/advance.rst b/docs/sphinx_doc/zh_CN/source/tutorial/advance.rst deleted file mode 100644 index 17ab3d8c8..000000000 --- a/docs/sphinx_doc/zh_CN/source/tutorial/advance.rst +++ /dev/null @@ -1,15 +0,0 @@ -进阶使用 -==================== - -.. toctree:: - :maxdepth: 2 - - 201-agent.md - 202-pipeline.md - 203-model.md - 203-parser.md - 204-service.md - 205-memory.md - 206-prompt.md - 207-monitor.md - 208-distribute.md diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/main.md b/docs/sphinx_doc/zh_CN/source/tutorial/main.md index 3a45ee7f2..f3c605949 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/main.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/main.md @@ -10,26 +10,23 @@ AgentScope是一款全新的Multi-Agent框架,专为应用开发者打造, ## 教程大纲 -### 快速上手 - -- [关于AgentScope](101-agentscope-zh) -- [安装](102-installation-zh) -- [快速开始](103-example-zh) -- [创造您的第一个应用](104-usecase-zh) -- [日志和WebUI](105-logging-zh) - -### 进阶使用 - -- [定制你自己的Agent](201-agent-zh) -- [Pipeline和MsgHub](202-pipeline-zh) -- [模型](203-model-zh) -- [服务函数](204-service-zh) -- [记忆](205-memory-zh) -- [提示工程](206-prompt-zh) -- [监控器](207-monitor-zh) -- [分布式](208-distribute-zh) +- [关于AgentScope](101-agentscope.md) +- [安装](102-installation.md) +- [快速开始](103-example.md) +- [模型](203-model.md) +- [提示工程](206-prompt.md) +- [Agent](201-agent.md) +- [记忆](205-memory.md) +- [结果解析](203-parser.md) +- [工具](204-service.md) +- [Pipeline和MsgHub](202-pipeline.md) +- [分布式](208-distribute.md) +- [AgentScope Studio](209-gui.md) +- [日志](105-logging.md) +- [监控器](207-monitor.md) +- [样例:狼人杀游戏](104-usecase.md) ### 参与贡献 -- [加入AgentScope社区](301-community-zh) -- [贡献到AgentScope](302-contribute-zh) +- [加入AgentScope社区](301-community.md) +- [贡献到AgentScope](302-contribute.md) \ No newline at end of file diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/quick_start.rst b/docs/sphinx_doc/zh_CN/source/tutorial/quick_start.rst deleted file mode 100644 index afbef5de7..000000000 --- a/docs/sphinx_doc/zh_CN/source/tutorial/quick_start.rst +++ /dev/null @@ -1,11 +0,0 @@ -快速上手 -=============== - -.. toctree:: - :maxdepth: 2 - - 101-agentscope.md - 102-installation.md - 103-example.md - 104-usecase.md - 105-logging.md \ No newline at end of file diff --git a/examples/conversation_basic/conversation.py b/examples/conversation_basic/conversation.py index b482b557e..0cc3c7ca0 100644 --- a/examples/conversation_basic/conversation.py +++ b/examples/conversation_basic/conversation.py @@ -28,6 +28,7 @@ def main() -> None: "headers": {}, }, ], + project="Multi-Agent Conversation", ) # Init two agents diff --git a/examples/conversation_nl2sql/react_nl2sql.ipynb b/examples/conversation_nl2sql/react_nl2sql.ipynb index 9773bc744..a28b7c36f 100644 --- a/examples/conversation_nl2sql/react_nl2sql.ipynb +++ b/examples/conversation_nl2sql/react_nl2sql.ipynb @@ -49,6 +49,7 @@ "from agentscope.models import load_model_by_config_name\n", "agentscope.init(\n", " model_configs=\"./configs/model_configs.json\",\n", + " project=\"Conversation with NL2SQL\",\n", ")\n", "loaded_model = load_model_by_config_name('gpt-4')" ] diff --git a/examples/conversation_self_organizing/auto-discussion.py b/examples/conversation_self_organizing/auto-discussion.py index b30e8ee33..6470884be 100644 --- a/examples/conversation_self_organizing/auto-discussion.py +++ b/examples/conversation_self_organizing/auto-discussion.py @@ -26,7 +26,11 @@ "json_args": {}, }, ] -agentscope.init(model_configs=model_configs) + +agentscope.init( + model_configs=model_configs, + project="Self-Organizing Conversation", +) # init the self-organizing conversation diff --git a/examples/conversation_with_RAG_agents/rag_example.py b/examples/conversation_with_RAG_agents/rag_example.py index 1e2b4c6d3..d000f459c 100644 --- a/examples/conversation_with_RAG_agents/rag_example.py +++ b/examples/conversation_with_RAG_agents/rag_example.py @@ -31,6 +31,7 @@ def main() -> None: "api_key": f"{os.environ.get('DASHSCOPE_API_KEY')}", }, ], + project="Conversation with RAG agents", ) with open("./agent_config.json", "r", encoding="utf-8") as f: diff --git a/examples/conversation_with_customized_services/main.ipynb b/examples/conversation_with_customized_services/main.ipynb index eb7908d70..b9e4e4aa5 100644 --- a/examples/conversation_with_customized_services/main.ipynb +++ b/examples/conversation_with_customized_services/main.ipynb @@ -289,7 +289,11 @@ "\n", "import agentscope\n", "\n", - "agentscope.init(model_configs=YOUR_MODEL_CONFIGURATION)\n", + "agentscope.init(\n", + " model_configs=YOUR_MODEL_CONFIGURATION,\n", + " project=\"Conversation with services\"\n", + ")\n", + "\n", "agent = ReActAgent(\n", " name=\"assistant\",\n", " model_config_name=YOUR_MODEL_CONFIGURATION_NAME,\n", diff --git a/examples/conversation_with_gpt-4o/conversation_with_gpt-4o.py b/examples/conversation_with_gpt-4o/conversation_with_gpt-4o.py index 470f1de32..3a6174f93 100644 --- a/examples/conversation_with_gpt-4o/conversation_with_gpt-4o.py +++ b/examples/conversation_with_gpt-4o/conversation_with_gpt-4o.py @@ -17,7 +17,10 @@ }, } -agentscope.init(model_configs=model_config) +agentscope.init( + model_configs=model_config, + project="Conversation with GPT-4o", +) # Require user to input URL, and press enter to skip the URL input user = UserAgent("user", require_url=True) diff --git a/examples/conversation_with_langchain/conversation_with_langchain.py b/examples/conversation_with_langchain/conversation_with_langchain.py index 57958154f..5d9f9c6b3 100644 --- a/examples/conversation_with_langchain/conversation_with_langchain.py +++ b/examples/conversation_with_langchain/conversation_with_langchain.py @@ -67,7 +67,9 @@ def reply(self, x: Optional[dict] = None) -> Msg: # Build a conversation between user and assistant agent # init AgentScope -agentscope.init() +agentscope.init( + project="Conversation with LangChain", +) # Create an instance of the langchain agent agent = LangChainAgent(name="Assistant") diff --git a/examples/conversation_with_mentions/main.py b/examples/conversation_with_mentions/main.py index 4835b3306..94352adc9 100644 --- a/examples/conversation_with_mentions/main.py +++ b/examples/conversation_with_mentions/main.py @@ -30,6 +30,7 @@ def main() -> None: npc_agents = agentscope.init( model_configs="./configs/model_configs.json", agent_configs="./configs/agent_configs.json", + project="Conversation with Mentions", ) user = UserAgent() diff --git a/examples/conversation_with_react_agent/code/conversation_with_react_agent.py b/examples/conversation_with_react_agent/code/conversation_with_react_agent.py index 67c5f4f77..8eb1205c0 100644 --- a/examples/conversation_with_react_agent/code/conversation_with_react_agent.py +++ b/examples/conversation_with_react_agent/code/conversation_with_react_agent.py @@ -67,7 +67,10 @@ def execute_python_code(code: str) -> ServiceResponse: # pylint: disable=C0301 service_toolkit.add(read_text_file) service_toolkit.add(write_text_file) -agentscope.init(model_configs=YOUR_MODEL_CONFIGURATION) +agentscope.init( + model_configs=YOUR_MODEL_CONFIGURATION, + project="Conversation with ReActAgent", +) # Create agents agent = ReActAgent( diff --git a/examples/conversation_with_react_agent/main.ipynb b/examples/conversation_with_react_agent/main.ipynb index 4cb498833..f58726262 100644 --- a/examples/conversation_with_react_agent/main.ipynb +++ b/examples/conversation_with_react_agent/main.ipynb @@ -304,7 +304,10 @@ "from agentscope.agents import ReActAgent\n", "import agentscope\n", "\n", - "agentscope.init(model_configs=YOUR_MODEL_CONFIGURATION)\n", + "agentscope.init(\n", + " model_configs=YOUR_MODEL_CONFIGURATION,\n", + " project=\"Conversation with ReActAgent\",\n", + ")\n", "\n", "agent = ReActAgent(\n", " name=\"assistant\",\n", diff --git a/examples/swe_agent/main.ipynb b/examples/conversation_with_swe-agent/main.ipynb similarity index 98% rename from examples/swe_agent/main.ipynb rename to examples/conversation_with_swe-agent/main.ipynb index ea716a954..b4782f4a8 100644 --- a/examples/swe_agent/main.ipynb +++ b/examples/conversation_with_swe-agent/main.ipynb @@ -68,7 +68,10 @@ "\n", "import agentscope\n", "\n", - "agentscope.init(model_configs=YOUR_MODEL_CONFIGURATION)\n", + "agentscope.init(\n", + " model_configs=YOUR_MODEL_CONFIGURATION,\n", + " project=\"Conversation with SWE-agent\",\n", + ")\n", "\n", "agent = SWEAgent(\n", " name=\"assistant\",\n", diff --git a/examples/swe_agent/swe_agent.py b/examples/conversation_with_swe-agent/swe_agent.py similarity index 100% rename from examples/swe_agent/swe_agent.py rename to examples/conversation_with_swe-agent/swe_agent.py diff --git a/examples/swe_agent/swe_agent_prompts.py b/examples/conversation_with_swe-agent/swe_agent_prompts.py similarity index 100% rename from examples/swe_agent/swe_agent_prompts.py rename to examples/conversation_with_swe-agent/swe_agent_prompts.py diff --git a/examples/swe_agent/swe_agent_service_func.py b/examples/conversation_with_swe-agent/swe_agent_service_func.py similarity index 100% rename from examples/swe_agent/swe_agent_service_func.py rename to examples/conversation_with_swe-agent/swe_agent_service_func.py diff --git a/examples/distributed_basic/distributed_dialog.py b/examples/distributed_basic/distributed_dialog.py index ab0de4235..62351f660 100644 --- a/examples/distributed_basic/distributed_dialog.py +++ b/examples/distributed_basic/distributed_dialog.py @@ -35,6 +35,7 @@ def setup_assistant_server(assistant_host: str, assistant_port: int) -> None: """Set up assistant rpc server""" agentscope.init( model_configs="configs/model_configs.json", + project="Distributed Conversation", ) assistant_server_launcher = RpcAgentServerLauncher( host=assistant_host, @@ -48,6 +49,7 @@ def run_main_process(assistant_host: str, assistant_port: int) -> None: """Run dialog main process""" agentscope.init( model_configs="configs/model_configs.json", + project="Distributed Conversation", ) assistant_agent = DialogAgent( name="Assistant", diff --git a/examples/distributed_debate/distributed_debate.py b/examples/distributed_debate/distributed_debate.py index a4e0a4287..5d0449c24 100644 --- a/examples/distributed_debate/distributed_debate.py +++ b/examples/distributed_debate/distributed_debate.py @@ -72,6 +72,7 @@ def setup_server(parsed_args: argparse.Namespace) -> None: """Setup rpc server for participant agent""" agentscope.init( model_configs="configs/model_configs.json", + project="Distributed Conversation", ) host = getattr(parsed_args, f"{parsed_args.role}_host") port = getattr(parsed_args, f"{parsed_args.role}_port") @@ -89,6 +90,7 @@ def run_main_process(parsed_args: argparse.Namespace) -> None: pro_agent, con_agent, judge_agent = agentscope.init( model_configs="configs/model_configs.json", agent_configs="configs/debate_agent_configs.json", + project="Distributed Conversation", ) pro_agent = pro_agent.to_dist( host=parsed_args.pro_host, diff --git a/examples/distributed_search/README.md b/examples/distributed_parallel_optimization/README.md similarity index 100% rename from examples/distributed_search/README.md rename to examples/distributed_parallel_optimization/README.md diff --git a/examples/distributed_search/answerer_agent.py b/examples/distributed_parallel_optimization/answerer_agent.py similarity index 100% rename from examples/distributed_search/answerer_agent.py rename to examples/distributed_parallel_optimization/answerer_agent.py diff --git a/examples/distributed_search/configs/model_configs.json b/examples/distributed_parallel_optimization/configs/model_configs.json similarity index 100% rename from examples/distributed_search/configs/model_configs.json rename to examples/distributed_parallel_optimization/configs/model_configs.json diff --git a/examples/distributed_search/main.py b/examples/distributed_parallel_optimization/main.py similarity index 98% rename from examples/distributed_search/main.py rename to examples/distributed_parallel_optimization/main.py index e03c713f3..5a847cd6d 100644 --- a/examples/distributed_search/main.py +++ b/examples/distributed_parallel_optimization/main.py @@ -34,6 +34,7 @@ def parse_args() -> argparse.Namespace: args = parse_args() agentscope.init( model_configs="configs/model_configs.json", + project="Parallel Optimization", ) WORKER_NUM = 3 diff --git a/examples/distributed_search/searcher_agent.py b/examples/distributed_parallel_optimization/searcher_agent.py similarity index 100% rename from examples/distributed_search/searcher_agent.py rename to examples/distributed_parallel_optimization/searcher_agent.py diff --git a/examples/game_gomoku/main.ipynb b/examples/game_gomoku/main.ipynb index 3d13ada4f..b3b31831a 100644 --- a/examples/game_gomoku/main.ipynb +++ b/examples/game_gomoku/main.ipynb @@ -365,7 +365,10 @@ "source": [ "import agentscope\n", "\n", - "agentscope.init(model_configs=YOUR_MODEL_CONFIGURATION)\n", + "agentscope.init(\n", + " model_configs=YOUR_MODEL_CONFIGURATION,\n", + " project=\"Gomoku\", \n", + ")\n", "\n", "piece_black = NAME_TO_PIECE[NAME_BLACK]\n", "piece_white = NAME_TO_PIECE[NAME_WHITE]\n", diff --git a/examples/game_werewolf/werewolf.py b/examples/game_werewolf/werewolf.py index 10c55956f..4962f2851 100644 --- a/examples/game_werewolf/werewolf.py +++ b/examples/game_werewolf/werewolf.py @@ -29,6 +29,7 @@ def main() -> None: survivors = agentscope.init( model_configs="./configs/model_configs.json", agent_configs="./configs/agent_configs.json", + project="Werewolf", ) roles = ["werewolf", "werewolf", "villager", "villager", "seer", "witch"] From d3c66f47f1327d58b68b37371a0a3ff1209390d6 Mon Sep 17 00:00:00 2001 From: DavdGao Date: Fri, 7 Jun 2024 15:49:21 +0800 Subject: [PATCH 2/7] reformat --- docs/sphinx_doc/en/source/tutorial/209-gui.md | Bin 7246 -> 7224 bytes .../zh_CN/source/tutorial/209-gui.md | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sphinx_doc/en/source/tutorial/209-gui.md b/docs/sphinx_doc/en/source/tutorial/209-gui.md index 6092b33dbea039aef663cdc46b55ff8924c54c09..8ea9d15223db8676d5b3228c9535b0a44477f884 100644 GIT binary patch delta 96 zcmX?SvBP460P|)+=0l9KTnbR2R8di(55h&IdBsX#;n>Z;S-O}ux3McQZeGsulx1@- r?|G)pu>y*Wo9hL|nKn-sp2$2|Q@nQba`7vSn` Date: Fri, 7 Jun 2024 15:54:48 +0800 Subject: [PATCH 3/7] Modify into pip install agentscope --pre --- README.md | 2 +- README_ZH.md | 2 +- docs/sphinx_doc/en/source/tutorial/102-installation.md | 4 ++-- docs/sphinx_doc/zh_CN/source/tutorial/102-installation.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c7d587548..76d402f0f 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ pip install -e .\[distribute\] - Install AgentScope from pip: ```bash -pip install agentscope +pip install agentscope --pre ``` ## Quick Start diff --git a/README_ZH.md b/README_ZH.md index 2b96f496d..47ea8cc03 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -173,7 +173,7 @@ pip install -e .\[distribute\] - 从pip安装的AgentScope ```bash -pip install agentscope +pip install agentscope --pre ``` ## 快速开始 diff --git a/docs/sphinx_doc/en/source/tutorial/102-installation.md b/docs/sphinx_doc/en/source/tutorial/102-installation.md index 2a68124f4..e1f16d305 100644 --- a/docs/sphinx_doc/en/source/tutorial/102-installation.md +++ b/docs/sphinx_doc/en/source/tutorial/102-installation.md @@ -41,9 +41,9 @@ If you prefer to install AgentScope from Pypi, you can do so easily using `pip`: ```bash # For centralized multi-agent applications -pip install agentscope +pip install agentscope --pre # For distributed multi-agent applications -pip install agentscope[distribute] # On Mac use `pip install agentscope\[distribute\]` +pip install agentscope[distribute] --pre # On Mac use `pip install agentscope\[distribute\] --pre` ``` ### Install from Source diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/102-installation.md b/docs/sphinx_doc/zh_CN/source/tutorial/102-installation.md index fbfc7f355..ad1ac3659 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/102-installation.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/102-installation.md @@ -60,10 +60,10 @@ pip install -e .[distribute] # 在Mac上使用`pip install -e .\[distribute\]` ```bash # 针对本地化的multi-agent应用 -pip install agentscope +pip install agentscope --pre # 为分布式multi-agent应用 -pip install agentscope[distribute] # 在Mac上使用`pip install agentscope\[distribute\]` +pip install agentscope[distribute] --pre # 在Mac上使用`pip install agentscope\[distribute\] --pre` ``` [[返回顶端]](#102-installation-zh) From fec6ce598b3b1388b1ed8c85ec9691261cb888ee Mon Sep 17 00:00:00 2001 From: DavdGao Date: Sun, 9 Jun 2024 16:25:41 +0800 Subject: [PATCH 4/7] Remove the original README.md, and add additional guidance in tutorial. --- docs/sphinx_doc/en/source/tutorial/209-gui.md | Bin 7224 -> 7430 bytes .../zh_CN/source/tutorial/209-gui.md | 6 + src/agentscope/web/README.md | 127 ------------------ 3 files changed, 6 insertions(+), 127 deletions(-) delete mode 100644 src/agentscope/web/README.md diff --git a/docs/sphinx_doc/en/source/tutorial/209-gui.md b/docs/sphinx_doc/en/source/tutorial/209-gui.md index 8ea9d15223db8676d5b3228c9535b0a44477f884..aa78575943f4ea319d467ba2b3884dbdc79254b9 100644 GIT binary patch delta 219 zcmdmC(Pp(_ig>+ennGoMsX}>TUWr0UzCv<-URi1pkeQLHkXliYUsRHs0u)S11xW@} zmSp7T>3}sPC*}dga|<$afKoukUcvr;Al+%1>7_-9C7Jno2ptdu5{nhm@^fiSB-iH2;!9ZoIX_LT delta 12 TcmZp(+F`L_iumRvi6txmBC7=9 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md b/docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md index cc8c3fd6c..5806a1e9d 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/209-gui.md @@ -125,6 +125,12 @@ AgentScope Studio中,拖过点击 workstation 图标进入 Workstation 界面 AgentScope Workstation 支持导入和导出应用程序。 单击“导出 HTML”或“导出 Python”按钮,以生成可以分发给社区或本地保存的代码。 +如果要将导出的代码转换为 Python,请按以下步骤将 JSON 配置编译为 Python 代码: + +```bash +as_workflow config.json --compile ${YOUR_PYTHON_SCRIPT_NAME}.py +``` + 需要进一步编辑应用程序,只需单击“导入 HTML”按钮,将之前导出的 HTML 代码上传回 AgentScope Workstation。 #### 检查应用程序 diff --git a/src/agentscope/web/README.md b/src/agentscope/web/README.md deleted file mode 100644 index 1fa92ce7d..000000000 --- a/src/agentscope/web/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# Web UI - -## AgentScope Web UI - -A user interface for AgentScope, which is a tool for monitoring and -analyzing the communication of agents in a multi-agent application. - -### Quick Start -To start a web UI, you can run the following python code: - -```python -import agentscope - -agentscope.web.init( - path_save="YOUR_SAVE_PATH", - host="YOUR_WEB_IP", # defaults to 127.0.0.1 - port=5000 # defaults to 5000 -) -``` -The argument `path_save` refers to the saving directory of your application, -which defaults to `./runs` in AgentScope. - -Note when running AgentScope applications, the argument `save_log` of -`agentscope.init` function should be `True` to enable saving the logging files. -```python -import agentscope - -agentscope.init( - # ... - save_log=True, # defaults to True - # ... -) -``` -### A Running Example - -The home page of web UI, which lists all available projects and runs in the -given saving path. - -![The web UI](https://img.alicdn.com/imgextra/i3/O1CN01kpHFkn1HpeYEkn60I_!!6000000000807-0-tps-3104-1849.jpg) - -By clicking a running instance, we can observe more details. - -![The running details](https://img.alicdn.com/imgextra/i2/O1CN01AZtsf31MIHm4FmjjO_!!6000000001411-0-tps-3104-1849.jpg) - - -## AgentScope Studio - -A running-time interface for AgentScope, which is a tool for monitoring the -communication of agents in a multi-agent application, powered by `gradio` -and `modelscope_studio`. - -### How to Use -To start a studio, you can run the following python code: - -```python -as_studio path/to/your/script.py -``` -Remark: in `path/to/your/script.py`, there should be a `main` function. - - -### An Example (Text) - -Run the following code in the root directory of this project after you setup the configs in `examples/conversation/conversation.py`: -```python -as_studio examples/conversation_basic/conversation.py -``` -The following interface will be launched at `localhost:xxxx`. - -![](https://gw.alicdn.com/imgextra/i3/O1CN01X673v81WaHV1oCxEN_!!6000000002804-0-tps-2992-1498.jpg) - -**Principle:** When calling agent's `self.speak(msg)` method, it will output `msg.content` to the frontend. - -### Multimodal cases -`as_studio` also support multimodal cases, such as image, audio and video. - -#### Image case -If you implement a text-to-image agent, `as_studio` will display the image as follows. -![](https://img.alicdn.com/imgextra/i4/O1CN012frtbt1EXqJO1eWh2_!!6000000000362-0-tps-3028-1524.jpg) - -**Principle:** When calling agent's `self.speak(msg)` method, it will -output `msg.url` to the frontend. Here `msg.url` is a list of urls of images. - -#### Audio case -If you implement an audio agent, `as_studio` will display the audio as follows. -![](https://img.alicdn.com/imgextra/i3/O1CN01c2TV4a1XMpUNniSkB_!!6000000002910-0-tps-2998-1506.jpg) - -**Principle:** When calling agent's `self.speak(msg)` method, it will -output `msg.audio_path` to the frontend. Here `msg.audio_path` is a list of paths of audios. - -#### Video case -If you implement a video agent, `as_studio` will display the video as follows. -![](https://img.alicdn.com/imgextra/i3/O1CN01nFGfY11amQTCpRrPe_!!6000000003372-0-tps-3018-1510.jpg) - -**Principle:** When calling agent's `self.speak(msg)` method, it will -output `msg.video_path` to the frontend. Here `msg.video_path` is a list of paths of videos. - -## AgentScope Workstation -A draggable interface for building AgentScope workflow, which is a tool for generating config for running with AgentScope. -![](https://gw.alicdn.com/imgextra/i3/O1CN01uioF2Z1tYCsWgR3Cf_!!6000000005913-1-tps-2156-1080.gif) - -### How to Use -Go to the [AgentScope Workstation website](https://agentscope.aliyun.com/) and log in with GitHub. Drag modules to the canvas and fill in the blanks. Link each module to build a workflow. Click the **EXPORT** button to get the final configurations. Then save the configurations as `config.json`. Then run with the following commands: - -```bash -# Run in command line -as_workflow config.json - -# Run in as_studio (gradio ui) -as_studio config.json -``` - -Or you can run your workflow on ModelScope Studio. Click the **RUN** button. Then, fill in the `API_KEY` environment variable in ModelScope Studio. After a few minutes, enjoy your journey on AgentScope! - -You can also compile JSON configuration to Python code and run: - -```bash -# Compile -as_workflow config.json --compile ${YOUR_PYTHON_SCRIPT_NAME}.py - -# Run python workflow -python ${YOUR_PYTHON_SCRIPT_NAME}.py - -# Run workflow in as_studio (gradio ui) -as_studio ${YOUR_PYTHON_SCRIPT_NAME}.py -``` - -More examples about AgentScope Workstation are coming soon! From fcccf0d4a0e74138ebc9ed5863c874cea649b4c4 Mon Sep 17 00:00:00 2001 From: DavdGao Date: Sun, 9 Jun 2024 17:32:46 +0800 Subject: [PATCH 5/7] Update README.md and README_ZH.md; update version to 0.0.5 --- README.md | 6 ++++-- README_ZH.md | 6 ++++-- src/agentscope/_version.py | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fa35f43a8..4d2bf2ca7 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Welcome to join our community on ## News +- new**[2024-06-09]** We release **AgentScope** v0.0.5 now! In this new version, [**AgentScope Workstation**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html) is open-sourced with the refactored [**AgentScope Studio**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html), and a new [**RAG**](https://modelscope.github.io/agentscope/en/tutorial/209-rag.html) module is added in AgentScope! + - new**[2024-05-24]** We are pleased to announce that features related to the **AgentScope Workstation** will soon be open-sourced! The online website services are temporarily offline. The online website service will be upgraded and back online shortly. Stay tuned... - new**[2024-05-15]** A new **Parser Module** for **formatted response** is added in AgentScope! Refer to our [tutorial](https://modelscope.github.io/agentscope/en/tutorial/203-parser.html) for more details. The [`DictDialogAgent`](https://github.com/modelscope/agentscope/blob/main/src/agentscope/agents/dict_dialog_agent.py) and [werewolf game](https://github.com/modelscope/agentscope/tree/main/examples/game_werewolf) example are updated simultaneously. @@ -45,9 +47,9 @@ https://github.com/DavdGao/AgentScope/assets/102287034/d9acf581-20d2-4294-8d10-9 - new**[2024-05-14]** AgentScope supports **gpt-4o** as well as other OpenAI vision models now! Try gpt-4o with its [model configuration](./examples/model_configs_template/openai_chat_template.json) and new example [Conversation with gpt-4o](./examples/conversation_with_gpt-4o)! -- new**[2024-04-30]** We release **AgentScope** v0.0.4 now! +- **[2024-04-30]** We release **AgentScope** v0.0.4 now! -- new**[2024-04-27]** [AgentScope Workstation](https://agentscope.aliyun.com/) is now online! You are welcome to try building your multi-agent application simply with our *drag-and-drop platform* and ask our *copilot* questions about AgentScope! +- **[2024-04-27]** [AgentScope Workstation](https://agentscope.aliyun.com/) is now online! You are welcome to try building your multi-agent application simply with our *drag-and-drop platform* and ask our *copilot* questions about AgentScope! - **[2024-04-19]** AgentScope supports Llama3 now! We provide [scripts](https://github.com/modelscope/agentscope/blob/main/examples/model_llama3) and example [model configuration](https://github.com/modelscope/agentscope/blob/main/examples/model_llama3) for quick set-up. Feel free to try llama3 in our examples! diff --git a/README_ZH.md b/README_ZH.md index 8c4394b2a..0bb71905e 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -28,6 +28,8 @@ ## 新闻 +- new**[2024-06-09]** AgentScope v0.0.5 已经更新!在这个新版本中,我们开源了 [**AgentScope Workstation**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html),并且添加了新的 [**RAG**](https://modelscope.github.io/agentscope/en/tutorial/209-rag.html) 模块! + - new**[2024-05-24]** 我们很高兴地宣布 **AgentScope Workstation** 相关功能即将开源。我们的网站服务暂时下线。在线服务会很快升级重新上线,敬请期待... - new**[2024-05-15]** 用于解析模型格式化输出的**解析器**模块已经上线 AgentScope!更轻松的构建多智能体应用,使用方法请参考[教程](https://modelscope.github.io/agentscope/en/tutorial/203-parser.html)。与此同时,[`DictDialogAgent`](https://github.com/modelscope/agentscope/blob/main/src/agentscope/agents/dict_dialog_agent.py) 类和 [狼人杀游戏](https://github.com/modelscope/agentscope/tree/main/examples/game_werewolf) 样例也已经同步更新! @@ -36,9 +38,9 @@ - new**[2024-05-14]** AgentScope 现已支持 **gpt-4o** 等 OpenAI Vision 模型! 模型配置请见[链接](./examples/model_configs_template/openai_chat_template.json)。同时,新的样例“[与gpt-4o模型对话](./examples/conversation_with_gpt-4o)”已上线! -- new**[2024-04-30]** 我们现在发布了**AgentScope** v0.0.4版本! +- **[2024-04-30]** 我们现在发布了**AgentScope** v0.0.4版本! -- new**[2024-04-27]** [AgentScope Workstation](https://agentscope.aliyun.com/)上线了! 欢迎使用 Workstation 体验如何在*拖拉拽编程平台* 零代码搭建多智体应用,也欢迎大家通过*copilot*查询AgentScope各种小知识! +- **[2024-04-27]** [AgentScope Workstation](https://agentscope.aliyun.com/)上线了! 欢迎使用 Workstation 体验如何在*拖拉拽编程平台* 零代码搭建多智体应用,也欢迎大家通过*copilot*查询AgentScope各种小知识! - **[2024-04-19]** AgentScope现已经支持Llama3!我们提供了面向CPU推理和GPU推理的[脚本](./examples/model_llama3)和[模型配置](./examples/model_llama3),一键式开启Llama3的探索,在我们的样例中尝试Llama3吧! diff --git a/src/agentscope/_version.py b/src/agentscope/_version.py index 512ade252..62ab11836 100644 --- a/src/agentscope/_version.py +++ b/src/agentscope/_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- """ Version of AgentScope.""" -__version__ = "0.0.4" +__version__ = "0.0.5" From 0695dad831c378be8fd16c12d98938e9b25147f1 Mon Sep 17 00:00:00 2001 From: DavdGao Date: Sun, 9 Jun 2024 17:57:15 +0800 Subject: [PATCH 6/7] Update doc --- README.md | 2 +- README_ZH.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d2bf2ca7..ed41bd1a6 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Welcome to join our community on ## News -- new**[2024-06-09]** We release **AgentScope** v0.0.5 now! In this new version, [**AgentScope Workstation**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html) is open-sourced with the refactored [**AgentScope Studio**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html), and a new [**RAG**](https://modelscope.github.io/agentscope/en/tutorial/209-rag.html) module is added in AgentScope! +- new**[2024-06-09]** We release **AgentScope** v0.0.5 now! In this new version, [**AgentScope Workstation**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html) is open-sourced with the refactored [**AgentScope Studio**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html)! - new**[2024-05-24]** We are pleased to announce that features related to the **AgentScope Workstation** will soon be open-sourced! The online website services are temporarily offline. The online website service will be upgraded and back online shortly. Stay tuned... diff --git a/README_ZH.md b/README_ZH.md index 0bb71905e..a149b5cc2 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -28,7 +28,7 @@ ## 新闻 -- new**[2024-06-09]** AgentScope v0.0.5 已经更新!在这个新版本中,我们开源了 [**AgentScope Workstation**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html),并且添加了新的 [**RAG**](https://modelscope.github.io/agentscope/en/tutorial/209-rag.html) 模块! +- new**[2024-06-09]** AgentScope v0.0.5 已经更新!在这个新版本中,我们开源了 [**AgentScope Workstation**](https://modelscope.github.io/agentscope/en/tutorial/209-gui.html)! - new**[2024-05-24]** 我们很高兴地宣布 **AgentScope Workstation** 相关功能即将开源。我们的网站服务暂时下线。在线服务会很快升级重新上线,敬请期待... From 2670d5475a132ff26008e35c6ceb6711c0b11442 Mon Sep 17 00:00:00 2001 From: "panxuchen.pxc" Date: Sun, 9 Jun 2024 20:40:28 +0800 Subject: [PATCH 7/7] fix readme --- README.md | 8 ++------ README_ZH.md | 5 ++--- setup.py | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ed41bd1a6..108d7c12d 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,7 @@ Welcome to join our community on - new**[2024-05-15]** A new **Parser Module** for **formatted response** is added in AgentScope! Refer to our [tutorial](https://modelscope.github.io/agentscope/en/tutorial/203-parser.html) for more details. The [`DictDialogAgent`](https://github.com/modelscope/agentscope/blob/main/src/agentscope/agents/dict_dialog_agent.py) and [werewolf game](https://github.com/modelscope/agentscope/tree/main/examples/game_werewolf) example are updated simultaneously. - - -https://github.com/DavdGao/AgentScope/assets/102287034/d9acf581-20d2-4294-8d10-97cde6c653c7 - - + - new**[2024-05-14]** Dear AgentScope users, we are conducting a survey on **AgentScope Workstation & Copilot** user experience. We currently need your valuable feedback to help us improve the experience of AgentScope's Drag & Drop multi-agent application development and Copilot. Your feedback is valuable and the survey will take about 3~5 minutes. Please click [URL](https://survey.aliyun.com/apps/zhiliao/vgpTppn22) to participate in questionnaire surveys. Thank you very much for your support and contribution! @@ -55,7 +51,7 @@ https://github.com/DavdGao/AgentScope/assets/102287034/d9acf581-20d2-4294-8d10-9 - **[2024-04-06]** We release **AgentScope** v0.0.3 now! -- **[2024-04-06]** New examples [Gomoku](https://github.com/modelscope/agentscope/blob/main/examples/game_gomoku), [Conversation with ReAct Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_react_agent), [Conversation with RAG Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_RAG_agents) and [Distributed Parallel Search](https://github.com/modelscope/agentscope/blob/main/examples/distributed_parallel_optimization) are available now! +- **[2024-04-06]** New examples [Gomoku](https://github.com/modelscope/agentscope/blob/main/examples/game_gomoku), [Conversation with ReAct Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_react_agent), [Conversation with RAG Agent](https://github.com/modelscope/agentscope/blob/main/examples/conversation_with_RAG_agents) and [Distributed Parallel Optimization](https://github.com/modelscope/agentscope/blob/main/examples/distributed_parallel_optimization) are available now! - **[2024-03-19]** We release **AgentScope** v0.0.2 now! In this new version, AgentScope supports [ollama](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models)(A local CPU inference engine), [DashScope](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models) and Google [Gemini](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models) APIs. diff --git a/README_ZH.md b/README_ZH.md index a149b5cc2..468a056ae 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -46,7 +46,7 @@ - **[2024-04-06]** 我们现在发布了**AgentScope** v0.0.3版本! -- **[2024-04-06]** 新的样例“[五子棋](./examples/game_gomoku)”,“[与ReAct智能体对话](./examples/conversation_with_react_agent)”,“[与RAG智能体对话](./examples/conversation_with_RAG_agents)”,“[分布式并行搜索](./examples/distributed_parallel_optimization)”上线了! +- **[2024-04-06]** 新的样例“[五子棋](./examples/game_gomoku)”,“[与ReAct智能体对话](./examples/conversation_with_react_agent)”,“[与RAG智能体对话](./examples/conversation_with_RAG_agents)”,“[分布式并行优化](./examples/distributed_parallel_optimization)”上线了! - **[2024-03-19]** 我们现在发布了**AgentScope** v0.0.2版本!在这个新版本中,AgentScope支持了[ollama](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models)(本地CPU推理引擎),[DashScope](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models)和[Gemini](https://modelscope.github.io/agentscope/en/tutorial/203-model.html#supported-models) APIs。 @@ -130,7 +130,6 @@ AgentScope支持使用以下库快速部署本地模型服务。 - new[与SoftWare Engineering智能体对话](./examples/conversation_with_swe-agent/) - new[与自定义服务对话](./examples/conversation_with_customized_services/) - - 游戏 - [五子棋](./examples/game_gomoku) - [狼人杀](./examples/game_werewolf) @@ -138,7 +137,7 @@ AgentScope支持使用以下库快速部署本地模型服务。 - 分布式 - [分布式对话](./examples/distributed_conversation) - [分布式辩论](./examples/distributed_debate) - - [分布式并行搜索](./examples/distributed_parallel_optimization) + - [分布式并行优化](./examples/distributed_parallel_optimization) - [分布式大规模仿真](./examples/distributed_simulation) 更多模型API、服务和示例即将推出! diff --git a/setup.py b/setup.py index bef2b9619..fbaed22d2 100644 --- a/setup.py +++ b/setup.py @@ -110,7 +110,7 @@ keywords=["deep-learning", "multi agents", "agents"], package_dir={"": "src"}, packages=setuptools.find_packages("src"), - package_data={"agentscope.web": ["static/**/*"]}, + package_data={"agentscope.web.studio": ["static/**/*"]}, install_requires=minimal_requires, extras_require={ "distribute": distribute_requires,