nielsr HF Staff commited on
Commit
d7adf7a
·
verified ·
1 Parent(s): 07beec7

Replace incorrect model card content and update license for AWorld

Browse files

This PR completely revamps the model card for this repository. The previous content incorrectly displayed information for a different project ("FunReason").

This update ensures the model card accurately reflects the "AWorld: Dynamic Multi-Agent System with Stable Maneuvering for Robust GAIA Problem Solving" project.

Key changes include:
- Replaced all incorrect model card content with details specific to the AWorld project.
- Added the correct paper title and a link to its Hugging Face paper page.
- Included the paper's abstract.
- Provided a prominent link to the official GitHub repository for AWorld.
- Integrated an overview of the AWorld framework, its agentic achievements, quick start guide, architectural principles, applications, and contributing guidelines from the GitHub README.
- Updated the license from `apache-2.0` to `mit`, as specified in the AWorld project's GitHub repository.

Please review and merge these changes to improve the clarity and accuracy of this model's documentation.

Files changed (1) hide show
  1. README.md +565 -28
README.md CHANGED
@@ -1,48 +1,585 @@
1
  ---
2
- license: apache-2.0
3
  base_model:
4
  - Qwen/Qwen2.5-Coder-7B-Instruct
5
  library_name: transformers
 
6
  pipeline_tag: text-generation
7
  ---
8
- # FunReason: Enhancing Large Language Models' Function Calling via Self-Refinement Multiscale Loss and Automated Data Refinement
9
 
10
- <p align="center">
11
- &nbsp&nbsp📊 <a href="https://huggingface.co/Bingguang/FunReason">Dataset(Coming)</a>&nbsp&nbsp | &nbsp&nbsp🤗 <a href="https://huggingface.co/Bingguang/FunReason">Hugging Face</a>&nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://arxiv.org/pdf/2505.20192">Paper</a> &nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://huggingface.co/Bingguang/FunReason">Blog(Coming)</a> &nbsp&nbsp | &nbsp&nbsp📖 <a href="https://github.com/BingguangHao/FunReason">Github</a>
12
- </p>
13
 
14
- > [!IMPORTANT]
15
- > - **We will release all the code, training dataset and model weight, waiting the confidential review of Ant Group.**
 
 
 
 
 
16
 
17
  ## Abstract
18
 
19
- The integration of large language models (LLMs) with function calling has emerged as a crucial capability for enhancing their practical utility in real-world applications. However, effectively combining reasoning processes with accurate function execution remains a significant challenge. Traditional training approaches often struggle to balance the detailed reasoning steps with the precision of function calls, leading to suboptimal performance. To address these limitations, we introduce FunReason, a novel framework that enhances LLMs' function calling capabilities through an automated data refinement strategy and a Self-Refinement Multiscale Loss (SRML) approach. FunReason leverages LLMs' natural reasoning abilities to generate high-quality training examples, focusing on query parseability, reasoning coherence, and function call precision. The SRML approach dynamically balances the contribution of reasoning processes and function call accuracy during training, addressing the inherent trade-off between these two critical aspects. FunReason achieves performance comparable to GPT-4o while effectively mitigating catastrophic forgetting during fine-tuning. FunReason provides a comprehensive solution for enhancing LLMs' function calling capabilities by introducing a balanced training methodology and a data refinement pipeline. For code and dataset, please refer to our repository at GitHub.
20
 
21
- ## Main Result
22
 
23
- <div align="center">
24
- <img src="https://github.com/BingguangHao/FunReason/blob/main/img/result.png?raw=true" width="80%" />
25
- </div>
26
 
27
- <div align="center">
28
- <img src="https://github.com/BingguangHao/FunReason/blob/main/img/code.png?raw=true" width="80%" />
29
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
 
 
 
31
 
32
- ## Usage Recommendations
 
33
 
34
- **We recommend adhering to the following configurations when utilizing the FunReason model, to achieve the expected performance:**
 
 
35
 
36
- 1. **Use the original BFCL system prompt and the chat templete of Qwen.**
37
- 2. In the model handler, the delimiter of the answer is "\n", and the last string obtained by delimiting is taken as the answer
38
- 3. **To ensure that the model engages in thorough reasoning, we recommend enforcing the model to initiate its response with "\<think\>\n" at the beginning of every output.**
 
39
 
40
- ## Citation
41
- ```md
42
- @article{FunReason,
43
- title={FunReason: Enhancing Large Language Models' Function Calling via Self-Refinement Multiscale Loss and Automated Data Refinement},
44
- author={Bingguang Hao, Maolin Wang, Zengzhuang Xu, Cunyin Peng, Yicheng Chen, Xiangyu Zhao, Jinjie Gu, Chenyi Zhuang},
45
- journal={arXiv preprint arXiv:2505.20192},
46
- year={2025}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
2
  base_model:
3
  - Qwen/Qwen2.5-Coder-7B-Instruct
4
  library_name: transformers
5
+ license: mit
6
  pipeline_tag: text-generation
7
  ---
 
8
 
9
+ # AWorld: Dynamic Multi-Agent System with Stable Maneuvering for Robust GAIA Problem Solving
 
 
10
 
11
+ This repository contains the model and code for **AWorld**, presented in the paper [AWorld: Dynamic Multi-Agent System with Stable Maneuvering for Robust GAIA Problem Solving](https://huggingface.co/papers/2508.09889).
12
+
13
+ Code: [https://github.com/inclusionAI/AWorld](https://github.com/inclusionAI/AWorld)
14
+
15
+ <div align="center">
16
+ <img src="https://github.com/inclusionAI/AWorld/raw/main/readme_assets/heading_banner.png" alt="AWorld Heading Banner" width="100%">
17
+ </div>
18
 
19
  ## Abstract
20
 
21
+ The rapid advancement of large language models (LLMs) has empowered intelligent agents to leverage diverse external tools for solving complex real-world problems. However, as agents increasingly depend on multiple tools, they encounter new challenges: extended contexts from disparate sources and noisy or irrelevant tool outputs can undermine system reliability and accuracy. These challenges underscore the necessity for enhanced stability in agent-based systems. To address this, we introduce dynamic supervision and maneuvering mechanisms, constructing a robust and dynamic Multi-Agent System (MAS) architecture within the AWorld framework. In our approach, the Execution Agent invokes the Guard Agent at critical steps to verify and correct the reasoning process, effectively reducing errors arising from noise and bolstering problem-solving robustness. Extensive experiments on the GAIA test dataset reveal that our dynamic maneuvering mechanism significantly improves both the effectiveness and stability of solutions, outperforming single-agent system (SAS) and standard tool-augmented systems. As a result, our dynamic MAS system achieved first place among open-source projects on the prestigious GAIA leaderboard. These findings highlight the practical value of collaborative agent roles in developing more reliable and trustworthy intelligent systems.
22
 
23
+ ## Overview
24
 
25
+ AWorld (Agent World) is the next-generation framework engineered for agent self-improvement at scale. We enable AI agents to continuously evolve by synthesizing their own knowledge and experiences. This core capability is powered by:
 
 
26
 
27
+ 1. **Multi-Agent Systems (MAS)**: Build complex, interacting agent societies using our plug-and-play protocols and robust context management.
28
+ 2. **Intelligence Beyond a Single Model**: Generates high-quality feedback and diverse synthetic training data that fuel individual agent evolution.
29
+ 3. **Cloud-Native for Diversity & Scale**: Delivers the high concurrency and scalability for training smarter agents and achieving self-improvement.
30
+
31
+ AWorld empowers you to rapidly build individual tool-using agents, orchestrate sophisticated multi-agent systems, train agents effectively, and synthesize the high-quality data required for continuous agent evolution – all converging towards autonomous self-improvement.
32
+
33
+ ---
34
+ **Agentic Achievements Unboxed!** 🔥
35
+
36
+ 🏅️ **[2025/08/06]** Excel in Stability with Multi-Agent System on GAIA [![][GAIA]](https://huggingface.co/spaces/gaia-benchmark/leaderboard) [![][MAS]](#) [![][Leaderboard]](#) [![][Forward]]() <br>
37
+ Achieved an average Pass@1 score of 67.89 and Pass@3 score of 83.49 across 109 tasks from the test dataset. See [more details here](./examples/gaia/README_GUARD.md). See [Technical report here](https://huggingface.co/blog/chengle/aworld-gaia).
38
+
39
+ 🚀 **[2025/07/25]** Plug-&-Play Math Mastery! [![][IMO]](https://www.imo-official.org/year_info.aspx?year=2025) [![][MAS]](#) [![][Forward]]() <br>
40
+ Built a MAS solving <span style="color: #d81b60; font-weight: bold;">5/6 IMO 2025 problems</span> in hours - proving **agent orchestration** beats solo models. Peek at the genius [under the hood](examples/imo/README.md)!
41
+
42
+ <details>
43
+ <summary style="font-size: 1.2em;font-weight: bold;"> 🌏 Click to View Previous News </summary>
44
+
45
+ 🧩 **[2025/07/23]** Build BFCL Runtimes Readily! [![][BFCL]](https://gorilla.cs.berkeley.edu/leaderboard.html) [![][Runtime]](#)
46
+ New BFCL tutorial shows how to **synthesize function calls training data in minutes**. <br>
47
+ Start cooking up your own agents [right here](examples/BFCL/README.md)!
48
+
49
+ 🏆 **[2025/07/07]** GAIA Soars to <span style="color: #d81b60; font-weight: bold;">77.08</span>! [![][GAIA]](https://huggingface.co/spaces/gaia-benchmark/leaderboard) [![][Cloud-Native]](#) [![][Leaderboard]](#)
50
+ **Cloud-native runtimes** now enable distributed agent evolution. <br>
51
+ See how diverse environments evolves smarter models [training recipe](#backward-process-design).
52
+
53
+ </details>
54
+
55
+ ## Quickstart
56
+
57
+ ### Prerequisites
58
+ > [!TIP]
59
+ > Python>=3.11
60
+ ```bash
61
+ git clone https://github.com/inclusionAI/AWorld && cd AWorld
62
+
63
+ python setup.py install
64
+ ```
65
+ ### Hello world examples
66
+ We introduce the concepts of `Agent` and `Runners` to help you get started quickly.
67
+ ```python
68
+ import os
69
+
70
+ from aworld.agents.llm_agent import Agent
71
+ from aworld.runner import Runners
72
+
73
+ summarizer = Agent(
74
+ name="Summary Agent",
75
+ system_prompt="You specialize at summarizing.",
76
+ )
77
+
78
+ result = Runners.sync_run(
79
+ input="Tell me a succint history about the universe",
80
+ agent=summarizer,
81
+ )
82
+ ```
83
+
84
+ In parallel, we introduce the concepts of `Swarm` to construct a team of agents.
85
+ ```python
86
+ import os
87
+
88
+ from aworld.agents.llm_agent import Agent
89
+ from aworld.runner import Runners
90
+ from aworld.core.agent.swarm import Swarm
91
+
92
+ researcher = Agent(
93
+ name="Research Agent",
94
+ system_prompt="You specialize at researching.",
95
+ )
96
+ summarizer = Agent(
97
+ name="Summary Agent",
98
+ system_prompt="You specialize at summarizing.",
99
+ )
100
+ # Create agent team with collaborative workflow
101
+ team = Swarm(researcher, summarizer)
102
+
103
+ result = Runners.sync_run(
104
+ input="Tell me a complete history about the universe",
105
+ swarm=team,
106
+ )
107
+ ```
108
+
109
+ Finally, run your own agents or teams
110
+ ```bash
111
+ # Set LLM credentials
112
+ export LLM_MODEL_NAME="gpt-4"
113
+ export LLM_API_KEY="your-api-key-here"
114
+ export LLM_BASE_URL="https://api.openai.com/v1"
115
 
116
+ # Run
117
+ python /path/to/agents/or/teams
118
+ ```
119
 
120
+ <details>
121
+ <summary style="font-size: 1.2em;font-weight: bold;"> 🌏 Click to View Advanced Usages </summary>
122
 
123
+ ### Pass AgentConfig Explicitly
124
+ ```python
125
+ import os
126
 
127
+ from aworld.agents.llm_agent import Agent
128
+ from aworld.runner import Runners
129
+ from aworld.config.conf import AgentConfig
130
+ from aworld.core.agent.swarm import Swarm
131
 
132
+ gpt_conf = AgentConfig(
133
+ llm_provider="openai",
134
+ llm_model_name="gpt-4o",
135
+ llm_api_key="<OPENAI_API_KEY>",
136
+ llm_temperature=0.1,
137
+ )
138
+ openrouter_conf = AgentConfig(
139
+ llm_provider="openai",
140
+ llm_model_name="google/gemini-2.5-pro",
141
+ llm_api_key="<OPENROUTER_API_KEY>",
142
+ llm_base_url="https://openrouter.ai/api/v1"
143
+ llm_temperature=0.1,
144
+ )
145
+
146
+ researcher = Agent(
147
+ name="Research Agent",
148
+ conf=gpt_conf,
149
+ system_prompt="You specialize at researching.",
150
+ )
151
+ summarizer = Agent(
152
+ name="Summary Agent",
153
+ conf=openrouter_conf,
154
+ system_prompt="You specialize at summarizing.",
155
+ )
156
+ # Create agent team with collaborative workflow
157
+ team = Swarm(researcher, summarizer)
158
+
159
+ result = Runners.sync_run(
160
+ input="Tell me a complete history about the universe",
161
+ swarm=team,
162
+ )
163
+ ```
164
+
165
+ ### Agent Equipped with MCP Tools
166
+ ```python
167
+ import os
168
+
169
+ from aworld.agents.llm_agent import Agent
170
+ from aworld.runner import Runners
171
+
172
+ mcp_config = {
173
+ "mcpServers": {
174
+ "GorillaFileSystem": {
175
+ "type": "stdio",
176
+ "command": "python",
177
+ "args": ["examples/BFCL/mcp_tools/gorilla_file_system.py"],
178
+ },
179
+ }
180
  }
181
+
182
+ file_sys = Agent(
183
+ name="file_sys_agent",
184
+ system_prompt=(
185
+ "You are a helpful agent to use "
186
+ "the standard file system to perform file operations."
187
+ ),
188
+ mcp_servers=mcp_config.get("mcpServers", []).keys(),
189
+ mcp_config=mcp_config,
190
+ )
191
+
192
+ result = Runners.sync_run(
193
+ input=(
194
+ "use mcp tools in the GorillaFileSystem server "
195
+ "to perform file operations: "
196
+ "write the content 'AWorld' into "
197
+ "the hello_world.py file with a new line "
198
+ "and keep the original content of the file. "
199
+ "Make sure the new and old "
200
+ "content are all in the file; "
201
+ "and display the content of the file"
202
+ ),
203
+ agent=file_sys,
204
+ )
205
+ ```
206
+
207
+ ### Agent Integrated with Memory
208
+ It is recommended to use `MemoryFactory` to initialize and access Memory instances.
209
+
210
+ ```python
211
+ from aworld.memory.main import MemoryFactory
212
+ from aworld.core.memory import MemoryConfig, MemoryLLMConfig
213
+
214
+ # Simple initialization
215
+ memory = MemoryFactory.instance()
216
+
217
+ # Initialization with LLM configuration
218
+ MemoryFactory.init(
219
+ config=MemoryConfig(
220
+ provider="aworld",
221
+ llm_config=MemoryLLMConfig(
222
+ provider="openai",
223
+ model_name=os.environ["LLM_MODEL_NAME"],
224
+ api_key=os.environ["LLM_API_KEY"],
225
+ base_url=os.environ["LLM_BASE_URL"]
226
+ )
227
+ )
228
+ )
229
+ memory = MemoryFactory.instance()
230
+ ```
231
+
232
+ `MemoryConfig` allows you to integrate different embedding models and vector databases.
233
+ ```python
234
+ import os
235
+
236
+ from aworld.core.memory import MemoryConfig, MemoryLLMConfig, EmbeddingsConfig, VectorDBConfig
237
+
238
+ MemoryFactory.init(
239
+ config=MemoryConfig(
240
+ provider="aworld",
241
+ llm_config=MemoryLLMConfig(
242
+ provider="openai",
243
+ model_name=os.environ["LLM_MODEL_NAME"],
244
+ api_key=os.environ["LLM_API_KEY"],
245
+ base_url=os.environ["LLM_BASE_URL"]
246
+ ),
247
+ embedding_config=EmbeddingsConfig(
248
+ provider="ollama", # or huggingface, openai, etc.
249
+ base_url="http://localhost:11434",
250
+ model_name="nomic-embed-text"
251
+ ),
252
+ vector_store_config=VectorDBConfig(
253
+ provider="chroma",
254
+ config={
255
+ "chroma_data_path": "./chroma_db",
256
+ "collection_name": "aworld",
257
+ }
258
+ )
259
+ )
260
+ )
261
+ ```
262
+
263
+ ### Mutil-Agent Systems
264
+ We present a classic topology: `Leader-Executor`.
265
+ ```python
266
+ """
267
+ Leader-Executor topology:
268
+ ┌───── plan ───┐
269
+ exec1 exec2
270
+
271
+ Each agent communicates with a single supervisor agent,
272
+ well recognized as Leader-Executor topology,
273
+ also referred to as a team topology in Aworld.
274
+ """
275
+ from aworld.agents.llm_agent import Agent
276
+ from aworld.core.agent.swarm import TeamSwarm
277
+
278
+ plan = Agent(name="plan", conf=agent_conf)
279
+ exec1 = Agent(name="exec1", conf=agent_conf)
280
+ exec2 = Agent(name="exec2", conf=agent_conf)
281
+ swarm = TeamSwarm(plan, exec1, exec2)
282
+ ```
283
+ Optionally, you can use `Handsoff` mechanism to customize your own topology.
284
+ ```python
285
+ from aworld.core.agent.swarm import HandoffSwarm
286
+ swarm = HandoffSwarm((plan, exec1), (plan, exec2))
287
+ ```
288
+
289
+ </details>
290
+
291
+ # 🏗️ Architecture Design Principles
292
+ AWorld provides a comprehensive environment that supports a diverse array of applications, such as `Product Prototype Verification`, `Foundational Model Training`, and the design of `Multi-Agent Systems (MAS)` through meta-learning.
293
+
294
+ This framework is engineered to be highly adaptable, enabling researchers and developers to explore and innovate across multiple domains, thereby advancing the capabilities and applications of multi-agent systems.
295
+
296
+ ## Concepts & Framework
297
+ | Concepts | Description |
298
+ | :-------------------------------------- | ------------ |
299
+ | [`agent`](./aworld/core/agent/base.py) | Define the foundational classes, descriptions, output parsing, and multi-agent collaboration (swarm) logic for defining, managing, and orchestrating agents in the AWorld system. |
300
+ | [`runner`](./aworld/runners) | Contains runner classes that manage the execution loop for agents in environments, handling episode rollouts and parallel training/evaluation workflows. |
301
+ | [`task`](./aworld/core/task.py) | Define the base Task class that encapsulates environment objectives, necessary tools, and termination conditions for agent interactions. |
302
+ | [`swarm`](./aworld/core/agent/swarm.py) | Implement the SwarmAgent class managing multi-agent coordination and emergent group behaviors through decentralized policies. |
303
+ | [`sandbox`](./aworld/sandbox) | Provide a controlled runtime with configurable scenarios for rapid prototyping and validation of agent behaviors. |
304
+ | [`tools`](./aworld/tools) | Offer a flexible framework for defining, adapting, and executing tools for agent-environment interaction in the AWorld system. |
305
+ | [`context`](./aworld/core/context) | Feature a comprehensive context management system for AWorld agents, enabling complete state tracking, configuration management, prompt optimization, multi-task state handling, and dynamic prompt templating throughout the agent lifecycle. |
306
+ | [`memory`](./aworld/memory) | Implement an extensible memory system for agents, supporting short-term and long-term memory, summarization, retrieval, embeddings, and integration.|
307
+ | [`trace`](./aworld/trace) | Feature an observable tracing framework for AWorld, enabling distributed tracing, context propagation, span management, and integration with popular frameworks and protocols to monitor and analyze agent, tool, and task execution.|
308
+
309
+ > 💡 Check the [examples](./examples/) directory to explore diverse AWorld applications.
310
+
311
+
312
+ ## Characteristics
313
+
314
+ | Agent Construction | Topology Orchestration | Environment |
315
+ |:---------------------------|:----------------------------|:-------------------------------|
316
+ | ✅ Integrated MCP services | ✅ Encapsulated runtime | ✅ Runtime state management |
317
+ | ✅ Multi-model providers | ✅ Flexible MAS patterns | ✅ High-concurrency support |
318
+ | ✅ Customization options | ✅ Clear state tracing | ✅ Distributed training |
319
+
320
+ ## Forward Process Design
321
+ ![](readme_assets/runtime.jpg)
322
+
323
+ Here is a forward illustration to collect BFCL forward trajectories: [`tutorial`](./examples/BFCL/README.md).
324
+
325
+ ## Backward Process Design
326
+
327
+ > During training, an action-state rollout demonstration using **AWorld's distributed environments**.
328
+
329
+ ![](readme_assets/agent_training2.jpg)
330
+
331
+ > [!NOTE]
332
+ > An illustration of training code that seamlessly integrates the RL learning framework (Swift, in this example) with AWorld as the environment is shown below. This integration enables scalable and efficient agent training through distributed environment execution. (To run high-concurrency rollouts, you need to deploy an online distributed environment. Please contact [[email protected]](mailto:[email protected]) if assistance is needed.)
333
+
334
+ <details>
335
+ <summary style="font-size: 1.2em;font-weight: bold;"> 🌏 Click to View Tutorial Example</summary>
336
+ To apply and use this integration:
337
+
338
+ 1. Clone AWorld's `agent_training_server` branch:
339
+ ```bash
340
+ git clone -b agent_training_server --single-branch https://github.com/inclusionAI/AWorld.git
341
+ ```
342
+
343
+ 2. Clone ms-swift's v3.5.2 branch (shallow clone):
344
+ ```bash
345
+ git clone -b v3.5.2 --depth=1 https://github.com/modelscope/ms-swift.git ms-swift
346
+ ```
347
+
348
+ 3. Copy patch files from AWorld to ms-swift:
349
+ ```bash
350
+ cp -r AWorld/patches ms-swift/
351
+ ```
352
+
353
+ 4. Enter the patches directory and apply the patch:
354
+ ```bash
355
+ cd ms-swift/patches
356
+ git apply 0001-feat-add-agent-training-support-with-aworld-server.patch
357
+ ```
358
+ </details>
359
+
360
+ # 🧩 Applications
361
+ AWorld allows you to construct **agents** and **multi-agent systems** with ease.
362
+
363
+ ## Multi-Agent Systems for Model Evolutions
364
+ AWorld aims to reach the limitations of models and continuously push intelligence forward by constructing diverse runtime environments, such as tools, agents, and models,
365
+
366
+ The following is a list of successful proposal (with open-source models, technical reports, and code):
367
+
368
+ | Category | Runtime | <div style="width:400px">Performance</div> | <div style="width:100px;">Key Information</div> |
369
+ | --------------- | --------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------- |
370
+ | **Tool Use** | Function call runtime construction [`tutorial`][funreason-model-url] | Competitive on BFCL benchmark <br> ![Agent Framework](readme_assets/bfclv2_leaderboard.png) | ![Dataset][huggingface-dataset-image] <br> [![Model][huggingface-model-image]][funreason-model-url] <br> [![Paper][arxiv-image]][funreason-paper-url] <br> ![Blog][blog-image] <br> [![Code][github-code-image]][funreason-code-url] |
371
+ | **Deep Search** | Search runtime to be released | SOTA on HotpotQA benchmark <br> ![Agent Framework](readme_assets/hotpotqa_benchmark.png) | [![Dataset][huggingface-dataset-image]][deepsearch-dataset-url] <br> [![Model][huggingface-model-image]][deepsearch-model-url] <br> [![Paper][arxiv-image]][deepsearch-paper-url] <br> [![Code][github-code-image]][deepsearch-code-url] |
372
+
373
+
374
+ ## Multi-Agent Systems for Applications
375
+ AWorld's plug-and-play MAS architecture enables **real-world web application development** beyond agent training.
376
+
377
+ Build production-ready systems that handle complex tasks through:
378
+ - **Code generation & execution**
379
+ - **Browser automation & tool use**
380
+ - **Multimodal understanding & generation**
381
+ - And many more to emerge!
382
+
383
+ See [Appendix: Web Client Usage](#appendix-web-client-usage) for GAIA implementation examples.
384
+
385
+
386
+ # Contributing
387
+ We warmly welcome developers to join us in building and improving AWorld! Whether you're interested in enhancing the framework, fixing bugs, or adding new features, your contributions are valuable to us.
388
+
389
+ For academic citations or wish to contact us, please use the following BibTeX entry:
390
+
391
+ ```bibtex
392
+ @software{aworld2025,
393
+ author = {Agent Team at InclusionAI},
394
+ title = {AWorld: Enabling Agent Self-Improvement through Interactive Experience with Dynamic Runtime},
395
+ year = {2025},
396
+ url = {https://github.com/inclusionAI/AWorld},
397
+ version = {0.1.0},
398
+ publisher = {GitHub},
399
+ email = {chenyi.zcy at antgroup.com}
400
+ }
401
+ ```
402
+
403
+ # Star History
404
+ ![](https://api.star-history.com/svg?repos=inclusionAI/AWorld&type=Date)
405
+
406
+ # Appendix: Web Client Usage
407
+ ![GAIA Agent Runtime Demo](readme_assets/gaia_demo.gif)
408
+
409
+ Your project structure should look like this:
410
+ ```text
411
+ agent-project-root-dir/
412
+ agent_deploy/
413
+ my_first_agent/
414
+ __init__.py
415
+ agent.py
416
+ ```
417
+
418
+ Create project folders.
419
+
420
+ ```shell
421
+ mkdir my-aworld-project && cd my-aworld-project # project-root-dir
422
+ mkdir -p agent_deploy/my_first_agent
423
+ ```
424
+
425
+ #### Step 1: Define Your Agent
426
+
427
+ Create your first agnet in `agent_deploy/my_first_agent`:
428
+
429
+ `__init__.py`: Create empty `__ini__.py` file.
430
+
431
+ ```shell
432
+ cd agent_deploy/my_first_agent
433
+ touch __init__.py
434
+ ```
435
+
436
+ `agent.py`: Define your agent logic:
437
+
438
+ ```python
439
+ import logging
440
+ import os
441
+ from aworld.cmd.data_model import BaseAWorldAgent, ChatCompletionRequest
442
+ from aworld.config.conf import AgentConfig, TaskConfig
443
+ from aworld.agents.llm_agent import Agent
444
+ from aworld.core.task import Task
445
+ from aworld.runner import Runners
446
+
447
+ logger = logging.getLogger(__name__)
448
+
449
+ class AWorldAgent(BaseAWorldAgent):
450
+ def __init__(self, *args, **kwargs):
451
+ super().__init__(*args, **kwargs)
452
+
453
+ def name(self):
454
+ return "My First Agent"
455
+
456
+ def description(self):
457
+ return "A helpful assistant that can answer questions and help with tasks"
458
+
459
+ async def run(self, prompt: str = None, request: ChatCompletionRequest = None):
460
+ # Load LLM configuration from environment variables
461
+ agent_config = AgentConfig(
462
+ llm_provider=os.getenv("LLM_PROVIDER", "openai"),
463
+ llm_model_name=os.getenv("LLM_MODEL_NAME", "gpt-4"),
464
+ llm_api_key=os.getenv("LLM_API_KEY"),
465
+ llm_base_url=os.getenv("LLM_BASE_URL"),
466
+ llm_temperature=float(os.getenv("LLM_TEMPERATURE", "0.7"))
467
+ )
468
+
469
+ # Validate required configuration
470
+ if not agent_config.llm_model_name or not agent_config.llm_api_key:
471
+ raise ValueError("LLM_MODEL_NAME and LLM_API_KEY must be set!")
472
+
473
+ # Optional: Configure MCP tools for enhanced capabilities
474
+ mcp_config = {
475
+ "mcpServers": {
476
+ "amap-mcp": {
477
+ "type": "sse",
478
+ "url": "https://mcp.example.com/sse?key=YOUR_API_KEY", # Replace Your API Key
479
+ "timeout": 30,
480
+ "sse_read_timeout": 300
481
+ }
482
+ }
483
+ }
484
+
485
+ # Create the agent instance
486
+ agent = Agent(
487
+ conf=agent_config,
488
+ name="My First Agent",
489
+ system_prompt="""You are a helpful AI assistant. Your goal is to:
490
+ - Answer questions accurately and helpfully
491
+ - Provide clear, step-by-step guidance when needed
492
+ - Be friendly and professional in your responses""",
493
+ mcp_servers=["amap-mcp"],
494
+ mcp_config=mcp_config
495
+ )
496
+
497
+ # Extract user input
498
+ user_input = prompt or (request.messages[-1].content if request else "")
499
+
500
+ # Create and execute task
501
+ task = Task(
502
+ input=user_input,
503
+ agent=agent,
504
+ conf=TaskConfig(max_steps=5),
505
+ session_id=getattr(request, 'session_id', None)
506
+ )
507
+
508
+ # Stream the agent's response
509
+ async for output in Runners.streamed_run_task(task).stream_events():
510
+ yield output
511
+ ```
512
+
513
+ #### Step 2: Run Agent
514
+
515
+ Setup environment variables:
516
+
517
+ ```shell
518
+ # Navigate back to project root
519
+ cd ${agent-project-root-dir}
520
+
521
+ # Set your LLM credentials
522
+ export LLM_MODEL_NAME="gpt-4"
523
+ export LLM_API_KEY="your-api-key-here"
524
+ export LLM_BASE_URL="https://api.openai.com/v1" # Optional for OpenAI
525
+ ```
526
+
527
+ Launch Your Agent:
528
+ ```shell
529
+ # Option 1: Launch with Web UI
530
+ aworld web
531
+ # Then open http://localhost:8000 in your browser
532
+
533
+ # Option 2: Launch REST API (For integrations)
534
+ aworld api_server
535
+ # Then visit http://localhost:8000/docs for API documentation
536
+ ```
537
+
538
+ Success! Your agent is now running and ready to chat!
539
+
540
+ ---
541
+ <!-- resource section start -->
542
+ <!-- image links -->
543
+ [arxiv-image]: https://img.shields.io/badge/Paper-arXiv-B31B1B?style=for-the-badge&logo=arxiv&logoColor=white
544
+ [blog-image]: https://img.shields.io/badge/Blog-Coming%20Soon-FF5722?style=for-the-badge&logo=blogger&logoColor=white
545
+ [deepwiki-image]: https://img.shields.io/badge/DeepWiki-Explore-blueviolet?logo=wikipedia&logoColor=white
546
+ [discord-image]: https://img.shields.io/badge/Discord-Join%20us-blue?logo=discord&logoColor=white
547
+ [github-code-image]: https://img.shields.io/badge/Code-GitHub-181717?style=for-the-badge&logo=github&logoColor=white
548
+ [huggingface-dataset-image]: https://img.shields.io/badge/Dataset-Coming%20Soon-007ACC?style=for-the-badge&logo=dataset&logoColor=white
549
+ [huggingface-model-image]: https://img.shields.io/badge/Model-Hugging%20Face-FF6B6B?style=for-the-badge&logo=huggingface&logoColor=white
550
+ [license-image]: https://img.shields.io/badge/License-MIT-yellow.svg
551
+ [twitter-image]: https://img.shields.io/twitter/follow/AWorld_AI?style=social
552
+ [wechat-image]: https://img.shields.io/badge/WeChat-Add%20us-green?logo=wechat&logoColor=white
553
+
554
+ <!-- aworld links -->
555
+ [deepwiki-url]: https://deepwiki.com/inclusionAI/AWorld
556
+ [discord-url]: https://discord.gg/b4Asj2ynMw
557
+ [license-url]: https://opensource.org/licenses/MIT
558
+ [twitter-url]: https://x.com/InclusionAI666
559
+ [wechat-url]: https://raw.githubusercontent.com/inclusionAI/AWorld/main/readme_assets/aworld_wechat.png
560
+
561
+ <!-- funreason links -->
562
+ [funreason-code-url]: https://github.com/BingguangHao/FunReason
563
+ [funreason-model-url]: https://huggingface.co/Bingguang/FunReason
564
+ [funreason-paper-url]: https://arxiv.org/pdf/2505.20192
565
+ <!-- [funreason-dataset-url]: https://github.com/BingguangHao/FunReason -->
566
+ <!-- [funreason-blog-url]: https://github.com/BingguangHao/FunReason -->
567
+
568
+ <!-- deepsearch links -->
569
+ [deepsearch-code-url]: https://github.com/inclusionAI/AgenticLearning
570
+ [deepsearch-dataset-url]: https://github.com/inclusionAI/AgenticLearning
571
+ [deepsearch-model-url]: https://huggingface.co/collections/endertzw/rag-r1-68481d7694b3fca8b809aa29
572
+ [deepsearch-paper-url]: https://arxiv.org/abs/2507.02962
573
+
574
+ <!-- badge -->
575
+ [MAS]: https://img.shields.io/badge/Mutli--Agent-System-EEE1CE
576
+ [IMO]: https://img.shields.io/badge/IMO-299D8F
577
+ [BFCL]: https://img.shields.io/badge/BFCL-8AB07D
578
+ [GAIA]: https://img.shields.io/badge/GAIA-E66F51
579
+ [Runtime]: https://img.shields.io/badge/AWorld-Runtime-287271
580
+ [Leaderboard]: https://img.shields.io/badge/Leaderboard-FFE6B7
581
+ [Benchmark]: https://img.shields.io/badge/Benchmark-FFE6B7
582
+ [Cloud-Native]: https://img.shields.io/badge/Cloud--Native-B19CD7
583
+ [Forward]: https://img.shields.io/badge/Forward-4A90E2
584
+ [Backward]: https://img.shields.io/badge/Backward-7B68EE
585
+ <!-- resource section end -->