MS-Agent is a lightweight framework designed to empower agents with autonomous exploration capabilities. It provides a flexible and extensible architecture that allows developers to create agents capable of performing complex tasks, such as code generation, data analysis, and tool calling for general purposes with MCP (Model Calling Protocol) support.
- Multi-Agent for general purpose: Chat with agent with tool-calling capabilities based on MCP.
- Deep Research: To enable advanced capabilities for autonomous exploration and complex task execution.
- Code Generation: Supports code generation tasks with artifacts.
- Lightweight and Extensible: Easy to extend and customize for various applications.
[WARNING] For historical archive versions, please refer to: https://github.com/modelscope/ms-agent/tree/0.8.0
WeChat Group |
---|
![]() |
-
🔥July 18, 2025: Release MS-Agent v1.0.0, improve the experience of Agent chat with MCP, and update the readme for Agentic Insight.
-
🔥July 16, 2025: Release MS-Agent v1.0.0rc0, which includes the following updates:
- Support for Agent chat with MCP (Model Context Protocol)
- Support for Deep Research (Agentic Insight), refer to: Report_Demo, Script_Demo
- Support for MCP-Playground
- Add callback mechanism for Agent chat
Archive
- 🔥🔥🔥Aug 8, 2024: A new graph based code generation tool CodexGraph is released by Modelscope-Agent, it has been proved effective and versatile on various code related tasks, please check example.
- 🔥🔥Aug 1, 2024: A high efficient and reliable Data Science Assistant is running on Modelscope-Agent, please find detail in example.
- 🔥July 17, 2024: Parallel tool calling on Modelscope-Agent-Server, please find detail in doc.
- 🔥June 17, 2024: Upgrading RAG flow based on LLama-index, allow user to hybrid search knowledge by different strategies and modalities, please find detail in doc.
- 🔥June 6, 2024: With Modelscope-Agent-Server, Qwen2 could be used by OpenAI SDK with tool calling ability, please find detail in doc.
- 🔥June 4, 2024: Modelscope-Agent supported Mobile-Agent-V2arxiv,based on Android Adb Env, please check in the application.
- 🔥May 17, 2024: Modelscope-Agent supported multi-roles room chat in the gradio.
- May 14, 2024: Modelscope-Agent supported image input in
RolePlay
agents with latest OpenAI modelGPT-4o
. Developers can experience this feature by specifying theimage_url
parameter. - May 10, 2024: Modelscope-Agent launched a user-friendly
Assistant API
, and also provided aTools API
that executes utilities in isolated, secure containers, please find the document - Apr 12, 2024: The Ray version of multi-agent solution is on modelscope-agent, please find the document
- Mar 15, 2024: Modelscope-Agent and the AgentFabric (opensource version for GPTs) is running on the production environment of modelscope studio.
- Feb 10, 2024: In Chinese New year, we upgrade the modelscope agent to version v0.3 to facilitate developers to customize various types of agents more conveniently through coding and make it easier to make multi-agent demos. For more details, you can refer to #267 and #293 .
- Nov 26, 2023: AgentFabric now supports collaborative use in ModelScope's Creation Space, allowing for the sharing of custom applications in the Creation Space. The update also includes the latest GTE text embedding integration.
- Nov 17, 2023: AgentFabric released, which is an interactive framework to facilitate creation of agents tailored to various real-world applications.
- Oct 30, 2023: Facechain Agent released a local version of the Facechain Agent that can be run locally. For detailed usage instructions, please refer to Facechain Agent.
- Oct 25, 2023: Story Agent released a local version of the Story Agent for generating storybook illustrations. It can be run locally. For detailed usage instructions, please refer to Story Agent.
- Sep 20, 2023: ModelScope GPT offers a local version through gradio that can be run locally. You can navigate to the demo/msgpt/ directory and execute
bash run_msgpt.sh
. - Sep 4, 2023: Three demos, demo_qwen, demo_retrieval_agent and demo_register_tool, have been added, along with detailed tutorials provided.
- Sep 2, 2023: The preprint paper associated with this project was published.
- Aug 22, 2023: Support accessing various AI model APIs using ModelScope tokens.
- Aug 7, 2023: The initial version of the modelscope-agent repository was released.
pip install ms-agent
git clone git@github.com:modelscope/ms-agent.git
cd ms-agent
pip install -e .
Warning
As the project has been renamed to ms-agent
, for versions v0.8.0
or earlier, you can install using the following command:
pip install modelscope-agent<=0.8.0
To import relevant dependencies using modelscope_agent
:
from modelscope_agent import ...
This project supports interaction with models via the MCP (Model Context Protocol). Below is a complete example showing how to configure and run an LLMAgent with MCP support.
✅ Chat with agents using the MCP protocol: MCP Playground
By default, the agent uses ModelScope's API inference service. Before running the agent, make sure to set your ModelScope API key.
export MODELSCOPE_API_KEY={your_modelscope_api_key}
You can find or generate your API key at https://modelscope.cn/my/myaccesstoken.
from ms_agent import LLMAgent
import asyncio
# Configure MCP server
mcp = {
"mcpServers": {
"fetch": {
"type": "sse",
"url": "https://{your_mcp_url}.api-inference.modelscope.net/sse"
}
}
}
async def main():
# Initialize the agent with MCP configuration
llm_agent = LLMAgent(mcp_config=mcp)
# Run a task
await llm_agent.run('Briefly introduce modelscope.cn')
if __name__ == '__main__':
# Launch the async main function
asyncio.run(main())
💡 Tip: You can find available MCP server configurations at modelscope.cn/mcp.
For example: https://modelscope.cn/mcp/servers/@modelcontextprotocol/fetch.
Replace the url in mcp["mcpServers"]["fetch"]
with your own MCP server endpoint.
This project provides a framework for Deep Research, enabling agents to autonomously explore and execute complex tasks.
-
Autonomous Exploration - Autonomous exploration for various complex tasks
-
Multimodal - Capable of processing diverse data modalities and generating research reports rich in both text and images.
-
Lightweight & Efficient - Support "search-then-execute" mode, completing complex research tasks within few minutes, significantly reducing token consumption.
Here is a demonstration of the Agentic Insight framework in action, showcasing its capabilities in handling complex research tasks efficiently.
-
User query
-
- Chinese:
在计算化学这个领域,我们通常使用Gaussian软件模拟各种情况下分子的结构和性质计算,比如在关键词中加入'field=x+100'代表了在x方向增加了电场。但是,当体系是经典的单原子催化剂时,它属于分子催化剂,在反应环境中分子的朝向是不确定的,那么理论模拟的x方向电场和实际电场是不一致的。
请问:通常情况下,理论计算是如何模拟外加电场存在的情况?
-
- English:
In the field of computational chemistry, we often use Gaussian software to simulate the structure and properties of molecules under various conditions. For instance, adding 'field=x+100' to the keywords signifies an electric field applied along the x-direction. However, when dealing with a classical single-atom catalyst, which falls under molecular catalysis, the orientation of the molecule in the reaction environment is uncertain. This means the x-directional electric field in the theoretical simulation might not align with the actual electric field.
So, how are external electric fields typically simulated in theoretical calculations?
agentic_insight_case_chem_0718a.mp4
For more details, please refer to Deep Research.
This project is licensed under the Apache License (Version 2.0).