Skip to content

Commit cf86ae8

Browse files
author
alcholiclg
committed
Merge branch 'main' of https://github.com/modelscope/ms-agent into feat/code_tool
Merge branch 'main' of https://github.com/modelscope/ms-agent into feat/code_tool
2 parents 957e751 + ab70350 commit cf86ae8

69 files changed

Lines changed: 17872 additions & 60 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 125 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
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> | <a href="https://ms-agent-en.readthedocs.io/en/latest">Docs</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">Docs</a>
1111
<br>
1212
</p>
1313

1414
<p align="center">
15-
<img src="https://img.shields.io/badge/python-%E2%89%A53.8-5be.svg">
16-
<a href='https://modelscope-agent.readthedocs.io/en/latest/?badge=latest'>
17-
<img src='https://readthedocs.org/projects/modelscope-agent/badge/?version=latest' alt='Documentation Status' />
15+
<img src="https://img.shields.io/badge/python-%E2%89%A53.10-5be.svg">
16+
<a href='https://ms-agent-en.readthedocs.io/en/latest/'>
17+
<img src='https://readthedocs.org/projects/ms-agent/badge/?version=latest' alt='Documentation Status' />
1818
</a>
19-
<a href="https://github.com/modelscope/modelscope-agent/actions?query=branch%3Amaster+workflow%3Acitest++"><img src="https://img.shields.io/github/actions/workflow/status/modelscope/modelscope-agent/citest.yaml?branch=master&logo=github&label=CI"></a>
20-
<a href="https://github.com/modelscope/modelscope-agent/blob/main/LICENSE"><img src="https://img.shields.io/github/license/modelscope/modelscope-agent"></a>
21-
<a href="https://github.com/modelscope/modelscope-agent/pulls"><img src="https://img.shields.io/badge/PR-welcome-55EB99.svg"></a>
22-
<a href="https://pypi.org/project/modelscope-agent/"><img src="https://badge.fury.io/py/modelscope-agent.svg"></a>
23-
<a href="https://pepy.tech/project/modelscope-agent"><img src="https://pepy.tech/badge/modelscope-agent"></a>
19+
<a href="https://github.com/modelscope/ms-agent/actions?query=branch%3Amaster+workflow%3Acitest++"><img src="https://img.shields.io/github/actions/workflow/status/modelscope/ms-agent/citest.yaml?branch=master&logo=github&label=CI"></a>
20+
<a href="https://github.com/modelscope/ms-agent/blob/main/LICENSE"><img src="https://img.shields.io/github/license/modelscope/ms-agent"></a>
21+
<a href="https://github.com/modelscope/ms-agent/pulls"><img src="https://img.shields.io/badge/PR-welcome-55EB99.svg"></a>
22+
<a href="https://pypi.org/project/ms-agent/"><img src="https://badge.fury.io/py/ms-agent.svg"></a>
23+
<a href="https://pepy.tech/project/ms-agent"><img src="https://static.pepy.tech/badge/ms-agent"></a>
2424
</p>
2525

2626
<p align="center">
27-
<a href="https://trendshift.io/repositories/323" target="_blank"><img src="https://trendshift.io/api/badge/repositories/323" alt="modelscope%2Fmodelscope-agent | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
27+
<a href="https://trendshift.io/repositories/323" target="_blank"><img src="https://trendshift.io/api/badge/repositories/323" alt="modelscope%2Fms-agent | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
2828
</p>
2929

3030
## Introduction
@@ -47,26 +47,29 @@ MS-Agent is a lightweight framework designed to empower agents with autonomous e
4747

4848

4949
## 🎉 News
50-
* 🚀Sep 22, 2025: Release MS-Agent v1.3.0, which includes the following updates:
50+
51+
* 🚀 Oct 30, 2025: Release MS-Agent v1.4.0, which includes the following updates:
52+
- 🔥 We present [**MS-Agent Skills**](projects/agent_skills/README.md), an **Implementation** of [Anthropic-Agent-Skills](https://docs.claude.com/en/docs/agents-and-tools/agent-skills) Protocol.
53+
* 🚀 Sep 22, 2025: Release MS-Agent v1.3.0, which includes the following updates:
5154
- 🔥 Support [Code Scratch](projects/code_scratch/README.md)
5255
- Support `Memory` for building agents with long-term and short-term memory
5356
- Enhance the DeepResearch workflow
5457
- Support RAY for accelerating document information extraction
5558
- Support Anthropic API format for LLMs
5659

57-
* 🚀Aug 28, 2025: Release MS-Agent v1.2.0, which includes the following updates:
60+
* 🚀 Aug 28, 2025: Release MS-Agent v1.2.0, which includes the following updates:
5861
- DocResearch now supports pushing to `ModelScope``HuggingFace``GitHub` for easy sharing of research reports. Refer to [Doc Research](projects/doc_research/README.md) for more details.
5962
- DocResearch now supports exporting the Markdown report to `HTML``PDF``PPTX` and `DOCX` formats, refer to [Doc Research](projects/doc_research/README.md) for more details.
6063
- DocResearch now supports `TXT` file processing and file preprocessing, refer to [Doc Research](projects/doc_research/README.md) for more details.
6164

62-
* 🚀July 31, 2025: Release MS-Agent v1.1.0, which includes the following updates:
65+
* 🚀 July 31, 2025: Release MS-Agent v1.1.0, which includes the following updates:
6366
- 🔥 Support [Doc Research](projects/doc_research/README.md), demo: [DocResearchStudio](https://modelscope.cn/studios/ms-agent/DocResearch)
6467
- Add `General Web Search Engine` for Agentic Insight (DeepResearch)
6568
- Add `Max Continuous Runs` for Agent chat with MCP.
6669

67-
* 🚀July 18, 2025: Release MS-Agent v1.0.0, improve the experience of Agent chat with MCP, and update the readme for [Agentic Insight](projects/deep_research/README.md).
70+
* 🚀 July 18, 2025: Release MS-Agent v1.0.0, improve the experience of Agent chat with MCP, and update the readme for [Agentic Insight](projects/deep_research/README.md).
6871

69-
* 🚀July 16, 2025: Release MS-Agent v1.0.0rc0, which includes the following updates:
72+
* 🚀 July 16, 2025: Release MS-Agent v1.0.0rc0, which includes the following updates:
7073
- Support for Agent chat with MCP (Model Context Protocol)
7174
- Support for Deep Research (Agentic Insight), refer to: [Report_Demo](projects/deep_research/examples/task_20250617a/report.md), [Script_Demo](projects/deep_research/run.py)
7275
- Support for [MCP-Playground](https://modelscope.cn/mcp/playground)
@@ -138,7 +141,7 @@ pip install -e .
138141
139142
## Quickstart
140143
141-
### Agent chat
144+
### Agent Chat
142145
This project supports interaction with models via the MCP (Model Context Protocol). Below is a complete example showing
143146
how to configure and run an LLMAgent with MCP support.
144147
@@ -239,6 +242,91 @@ asyncio.run(main())
239242
240243
</details>
241244
245+
246+
### Agent Skills
247+
248+
**MS-Agent Skills** is an **Implementation** of the [**Anthropic-Agent-Skills**](https://docs.claude.com/en/docs/agents-and-tools/agent-skills) protocol, enabling agents to autonomously explore and execute complex tasks by leveraging predefined or custom "skills".
249+
250+
251+
#### Key Features
252+
253+
- 📜 **Standard Skill Protocol**: Fully compatible with the [Anthropic Skills](https://github.com/anthropics/skills) protocol
254+
- 🧠 **Heuristic Context Loading**: Loads only necessary context—such as `References`, `Resources`, and `Scripts` on demand
255+
- 🤖 **Autonomous Execution**: Agents autonomously analyze, plan, and decide which scripts and resources to execute based on skill definitions
256+
- 🔍 **Skill Management**: Supports batch loading of skills and can automatically retrieve and discover relevant skills based on user input
257+
- 🛡️ **Code Execution Environment**: Optional local direct code execution or secure sandboxed execution via [**ms-enclave**](https://github.com/modelscope/ms-enclave), with automatic dependency installation and environment isolation
258+
- 📁 **Multi-file Type Support**: Supports documentation, scripts, and resource files
259+
- 🧩 **Extensible Design**: The skill data structure is modularized, with implementations such as `SkillSchema` and `SkillContext` provided for easy extension and customization
260+
261+
262+
#### Quick Start
263+
264+
> 💡 Note:
265+
> 1. Before running the following examples, ensure that you have set the `OPENAI_API_KEY` and `OPENAI_BASE_URL` environment variables to access the required model APIs.
266+
> 2. Agent Skills requires ms-agent >= 1.4.0
267+
268+
269+
**Installation**:
270+
271+
```shell
272+
pip install ms-agent
273+
```
274+
275+
**Usage**:
276+
277+
> This example demonstrates how to configure and run an Agent Skill that generates generative art code based on p5.js flow fields.
278+
279+
```python
280+
import os
281+
from ms_agent.agent import create_agent_skill
282+
283+
284+
def main():
285+
"""
286+
Main function to create and run an agent with skills.
287+
"""
288+
work_dir: str = 'temp_workspace'
289+
skills_dir: str = '/path/to/skills' # Refer to `https://github.com/modelscope/ms-agent/tree/main/projects/agent_skills/skills`
290+
model_name: str = 'qwen-max-latest'
291+
292+
agent = create_agent_skill(
293+
skills=skills_dir,
294+
model=model_name,
295+
api_key=os.getenv('OPENAI_API_KEY'),
296+
base_url=os.getenv(
297+
'OPENAI_BASE_URL',
298+
'https://dashscope.aliyuncs.com/compatible-mode/v1'),
299+
stream=True,
300+
use_sandbox=True, # Note: Make sure the `Docker Daemon` is running if use_sandbox=True
301+
work_dir=work_dir,
302+
)
303+
304+
user_query: str = 'Create generative art using p5.js with seeded randomness, flow fields, and particle systems, please fill in the details and provide the complete code based on the templates.'
305+
306+
response = agent.run(user_query)
307+
print(f'\n\n** Agent skill results: {response}\n')
308+
309+
310+
if __name__ == '__main__':
311+
312+
main()
313+
```
314+
315+
**Result**:
316+
317+
<div align="center">
318+
<img src="https://github.com/user-attachments/assets/9d5d78bf-c2db-4280-b780-324eab74a41e" alt="FlowFieldParticles" width="750">
319+
<p><em>Agent-Skills: Flow Field Particles</em></p>
320+
</div>
321+
322+
323+
#### References
324+
- **README**: [MS-Agent Skills](projects/agent_skills/README.md)
325+
- **Anthropic Agent Skills Official Docs**: [Anthropic-Agent-Skills](https://docs.claude.com/en/docs/agents-and-tools/agent-skills)
326+
- **Anthropic Skills GitHub Repo**: [Skills](https://github.com/anthropics/skills)
327+
328+
329+
242330
### Agentic Insight
243331
244332
#### - Lightweight, Efficient, and Extensible Multi-modal Deep Research Framework
@@ -276,9 +364,11 @@ So, how are external electric fields typically simulated in theoretical calculat
276364
```
277365
278366
#### Report
367+
279368
<https://github.com/user-attachments/assets/b1091dfc-9429-46ad-b7f8-7cbd1cf3209b>
280369
281370
371+
282372
For more details, please refer to [Deep Research](projects/deep_research/README.md).
283373
284374
<br>
@@ -352,10 +442,29 @@ For more details, refer to [Code Scratch](projects/code_scratch/README.md).
352442
353443
1. A news collection agent [ms-agent/newspaper](https://www.modelscope.cn/models/ms-agent/newspaper/summary)
354444
445+
446+
## Outlook
447+
448+
We are committed to continuously improving and expanding the MS-Agent framework to push the boundaries of large models and AI agents. Our future roadmap includes:
449+
450+
- [ ] **FinResearch** – A financial deep-research agent dedicated to in-depth analysis and research in the finance domain.
451+
- [ ] **Multimodal Agentic Search** – Supporting large-scale multimodal document retrieval and generation of search results combining text and images.
452+
- [ ] Enhanced **Agent Skills** – Providing a richer set of predefined skills and tools to expand agent capabilities and enabling multi-skill collaboration for complex task execution.
453+
- [ ] **Agent-Workstation** - An unified WebUI with one-click local deployment support with combining all agent capabilities of MS-Agent, such as AgentChat, MCP, AgentSkills, DeepResearch, DocResearch, CodeScratch, etc.
454+
455+
355456
## License
356457
357458
This project is licensed under the [Apache License (Version 2.0)](https://github.com/modelscope/modelscope/blob/master/LICENSE).
358459
359460
## Star History
360461
361462
[![Star History Chart](https://api.star-history.com/svg?repos=modelscope/modelscope-agent&type=Date)](https://star-history.com/#modelscope/modelscope-agent&Date)
463+
464+
465+
---
466+
467+
<p align="center">
468+
<em> ❤️ Thanks for visiting ✨ MS-Agent !</em><br><br>
469+
<img src="https://visitor-badge.laobi.icu/badge?page_id=modelscope.ms-agent&style=for-the-badge&color=00d4ff" alt="Views">
470+
</p>

0 commit comments

Comments
 (0)