MCPcopy Index your code
hub / github.com/modelscope/ms-agent

github.com/modelscope/ms-agent @v1.6.0

repository ↗ · DeepWiki ↗ · release v1.6.0 ↗ · Ask this repo → · + Follow
2,502 symbols 9,389 edges 275 files 1,329 documented · 53% updated 2d agov1.6.0 · 2026-03-23★ 4,33111 open issues
README

MS-Agent: Lightweight Framework for Empowering Agents with Autonomous Exploration

<img src="https://modelscope.oss-cn-beijing.aliyuncs.com/modelscope.gif" width="400"/>

MCP Playground | Paper | Documentation | 中文文档

Documentation Status

modelscope%2Fms-agent | Trendshift

中文

Introduction

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.

Features

  • 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.
  • Short Video Generation:Support video generation of about 5 minutes.
  • Agent Skills: Implementation of Anthropic-Agent-Skills Protocol.
  • WebUI: Modern web interface for agent interaction with real-time WebSocket communication.
  • 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

🎉 News

  • 🚀 Mar 23, 2026: Release MS-Agent v1.6.0, which includes the following updates:
  • Context Compression: Added context compression mechanism with token usage monitoring, overflow detection, and automatic context compaction via pruning historical tool outputs and LLM-based summarization.
  • Agentic Insight v2 Enhancements: Major architecture and performance improvements to the deep research system; achieves 55.43 on DeepResearch Bench with GPT5 and Qwen3.5-plus/flash. See Agentic Insight v2.
  • Knowledge Search: Integrated Sirchmunk for intelligent retrieval over local codebases and documentation during agent conversations. See Config Docs.
  • Multimodal Model Input: Support image, video, and other multimodal inputs. See Multimodal Docs.

  • 🚀 Feb 06, 2026: Release MS-Agent v1.6.0rc1, which includes the following updates:

  • Agentic Insight v2: A fully refactored deep-research system with better performance, scalability, and trustworthiness, now available in WebUI. See Agentic Insight v2.

  • 🚀 Feb 04, 2026: Release MS-Agent v1.6.0rc0, which includes the following updates:

  • Code Genesis for complex code generation tasks, refer to Code Genesis
  • Singularity Cinema for animated video generation workflow, refactored version, refer to Singularity Cinema
  • New framework of Skills: New design of the skills system to enhance robustness and extensibility. Refer to MS-Agent Skills.
  • WebUI: A new WebUI has been added, featuring agentic chatting capabilities, complex code generation and video generation workflow.

  • 🎬 Nov 13, 2025: Release Singularity Cinema, to support short video generation for complex scenarios, check here

  • 🚀 Nov 12, 2025: Release MS-Agent v1.5.0, which includes the following updates:

  • 🔥 We present FinResearch, a multi-agent workflow tailored for financial research
  • Support financial data collection via Akshare and Baostock
  • Support DagWorkflow for workflow orchestration
  • Optimize the DeepResearch workflow for stability and efficiency
  • FinResearch official documentation: FinResearch Doc
  • DEMO: FinResearchStudio
  • Examples: FinResearchExamples

  • 🚀 Nov 07, 2025: Release MS-Agent v1.4.0, which includes the following updates:

  • 🔥 We present MS-Agent Skills, an Implementation of Anthropic-Agent-Skills Protocol.
  • 🔥 Add Docs and 中文文档
  • 🔥 Support Sandbox Framework ms-enclave

  • 🚀 Sep 22, 2025: Release MS-Agent v1.3.0, which includes the following updates:

  • 🔥 Support Code Scratch
  • Support Memory for building agents with long-term and short-term memory
  • Enhance the DeepResearch workflow
  • Support RAY for accelerating document information extraction
  • Support Anthropic API format for LLMs

  • 🚀 Aug 28, 2025: Release MS-Agent v1.2.0, which includes the following updates:

  • DocResearch now supports pushing to ModelScopeHuggingFaceGitHub for easy sharing of research reports. Refer to Doc Research for more details.
  • DocResearch now supports exporting the Markdown report to HTMLPDFPPTX and DOCX formats, refer to Doc Research for more details.
  • DocResearch now supports TXT file processing and file preprocessing, refer to Doc Research for more details.

Archive

  • 🚀 July 31, 2025: Release MS-Agent v1.1.0, which includes the following updates:
  • 🔥 Support Doc Research, demo: DocResearchStudio
  • Add General Web Search Engine for Agentic Insight (DeepResearch)
  • Add Max Continuous Runs for Agent chat with MCP.

  • 🚀 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
  • 🔥🔥🔥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 model GPT-4o. Developers can experience this feature by specifying the image_url parameter.
  • May 10, 2024: Modelscope-Agent launched a user-friendly Assistant API, and also provided a Tools 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.

Installation

Install from PyPI

# For the basic functionalities
pip install ms-agent

# For the deep research functionalities
pip install 'ms-agent[research]'

Install from source

git clone https://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:

Extension points exported contracts — how you extend this code

MessageContentProps (Interface)
(no doc)
webui/frontend/src/components/MessageContent.tsx
LayoutProps (Interface)
(no doc)
webui/frontend/src/components/Layout.tsx
ConversationViewProps (Interface)
(no doc)
webui/frontend/src/components/ConversationView.tsx
MessageBubbleProps (Interface)
(no doc)
webui/frontend/src/components/ConversationView.tsx
WorkflowViewProps (Interface)
(no doc)
webui/frontend/src/components/ConversationView.tsx

Core symbols most depended-on inside this repo

get
called by 1097
ms_agent/memory/default_memory.py
get_logger
called by 79
ms_agent/utils/logger.py
write
called by 78
webui/backend/deep_research_worker.py
parse_imports
called by 62
ms_agent/utils/parser_utils.py
load
called by 61
ms_agent/tools/docling/doc_loader.py
search
called by 51
ms_agent/tools/search/exa/search.py
add
called by 49
ms_agent/memory/default_memory.py
resolve
called by 47
ms_agent/app/fin_research.py

Shape

Method 1,692
Function 425
Class 316
Route 35
Interface 34

Languages

Python96%
TypeScript4%

Modules by API surface

ms_agent/app/fin_research.py83 symbols
webui/backend/api.py80 symbols
tests/utils/test_parse_imports.py77 symbols
ms_agent/skill/auto_skills.py60 symbols
ms_agent/agent/llm_agent.py52 symbols
examples/skills/claude_skills/docx/scripts/document.py52 symbols
tests/skills/test_claude_skills.py49 symbols
ms_agent/skill/container.py49 symbols
ms_agent/app/doc_research.py45 symbols
ms_agent/utils/parser_utils.py40 symbols
projects/deep_research/v2/tools/evidence_tool.py38 symbols
ms_agent/tools/agent_tool.py38 symbols

Dependencies from manifests, versioned

@emotion/react11.11.3 · 1×
@emotion/styled11.11.0 · 1×
@mui/icons-material5.15.6 · 1×
@mui/material5.15.6 · 1×
@types/react18.2.48 · 1×
@types/react-dom18.2.18 · 1×
@vitejs/plugin-react4.2.1 · 1×
framer-motion11.0.3 · 1×
react18.2.0 · 1×
react-dom18.2.0 · 1×
react-markdown9.0.1 · 1×

Datastores touched

mydbDatabase · 1 repos

For agents

$ claude mcp add ms-agent \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact