77<p >
88
99<p align =" center " >
10- <a href =" https://modelscope.cn/mcp/playground " >MCP Playground</a > | <a href =" https://arxiv.org/abs/2309.00986 " >Paper</a >
10+ <a href =" https://modelscope.cn/mcp/playground " >MCP Playground</a > | <a href =" https://arxiv.org/abs/2309.00986 " >Paper</a > | < a href = " https://ms-agent-en.readthedocs.io/en/latest " >Docs</ a >
1111<br >
1212</p >
1313
@@ -152,10 +152,11 @@ export MODELSCOPE_API_KEY={your_modelscope_api_key}
152152You can find or generate your API key at https://modelscope.cn/my/myaccesstoken.
153153
154154```python
155- from ms_agent import LLMAgent
156155import asyncio
157156
158- # Configure MCP server
157+ from ms_agent import LLMAgent
158+
159+ # Configure MCP servers
159160mcp = {
160161 "mcpServers": {
161162 "fetch": {
@@ -166,13 +167,12 @@ mcp = {
166167}
167168
168169async def main():
169- # Initialize the agent with MCP configuration
170- llm_agent = LLMAgent(mcp_config=mcp)
171- # Run a task
172- await llm_agent.run(' Briefly introduce modelscope.cn' )
170+ # Use json to configure MCP
171+ llm_agent = LLMAgent(mcp_config=mcp) # Run task
172+ await llm_agent.run(' Introduce modelscope.cn' )
173173
174174if __name__ == ' __main__' :
175- # Launch the async main function
175+ # Start
176176 asyncio.run(main())
177177```
178178----
@@ -210,7 +210,8 @@ This example demonstrates how the agent remembers user preferences across sessio
210210import uuid
211211import asyncio
212212from omegaconf import OmegaConf
213- from ms_agent.agent import LLMAgent
213+ from ms_agent.agent.loader import AgentLoader
214+
214215
215216async def main():
216217 random_id = str(uuid.uuid4())
@@ -220,18 +221,18 @@ async def main():
220221 ' user_id' : ' awesome_me'
221222 }]
222223 })
223- agent1 = LLMAgent( config=default_memory)
224+ agent1 = AgentLoader.build(config_dir_or_id= ' ms-agent/simple_agent ' , config=default_memory)
224225 agent1.config.callbacks.remove(' input_callback' ) # Disable interactive input for direct output
225226
226227 await agent1.run(' I am a vegetarian and I drink coffee every morning.' )
227228 del agent1
228229 print(' ========== Data preparation completed, starting test ===========' )
229- agent2 = LLMAgent( config=default_memory)
230+ agent2 = AgentLoader.build(config_dir_or_id= ' ms-agent/simple_agent ' , config=default_memory)
230231 agent2.config.callbacks.remove(' input_callback' ) # Disable interactive input for direct output
231232
232233 res = await agent2.run(' Please help me plan tomorrow’s three meals.' )
233234 print(res)
234- assert ( ' vegan' in res[-1].content.lower() ) and ' coffee' in res[-1].content.lower()
235+ assert ' vegan' in res[-1].content.lower() and ' coffee' in res[-1].content.lower()
235236
236237asyncio.run(main())
237238```
@@ -303,11 +304,10 @@ This project provides a framework for **Doc Research**, enabling agents to auton
303304
304305**2. Local Gradio Application**
305306
306- * Research Report for [UniME: Breaking the Modality Barrier: Universal Embedding Learning
307- with Multimodal LLMs](https://arxiv.org/pdf/2504.17432)
307+ * Research Report for [UniME: Breaking the Modality Barrier: Universal Embedding Learning with Multimodal LLMs](https://arxiv.org/pdf/2504.17432)
308308<div align="center">
309309 <img src="https://github.com/user-attachments/assets/3f85ba08-6366-49b7-b551-cbe50edf6218" alt="LocalGradioApplication" width="750">
310- <p><em>Demo: UniME Research Report</em></p>
310+ <p><em>Demo: UniME Research Report</em></p>
311311</div>
312312
313313
0 commit comments