# MS-Agent: a harness for the long tasks, with memory and a schedule

> MS-Agent is ModelScope's Apache-2.0 Python framework for complex, long-running agentic tasks, combining models, tools, skills and sub-agents under a customizable harness that manages planning, context, permissions and execution feedback, with project memory and autonomous scheduling keeping work moving. One SDK drives its CLI, TUI and WebUI, v1.6.0 added context compression and multimodal input, and its Agentic Insight deep research system ranks second among open source entries on DeepResearch Bench.

**modelscope/ms-agent** — MS-Agent: a lightweight framework to empower agentic execution of complex tasks

- Repository: https://github.com/modelscope/ms-agent
- Website: https://ms-agent-en.readthedocs.io
- Stars: 4,406 · Forks: 527
- Language: Python
- License: Apache-2.0
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/modelscope-ms-agent

## A harness, not just a loop

MS-Agent describes itself as a modular, extensible open source agent framework built for complex, long running tasks, and the operative noun is harness. Users combine models, tools, skills and sub-agents with a customizable harness to build a productivity assistant, and the harness itself owns the hard parts, managing planning, context, permissions and execution feedback, while project memory and autonomous scheduling keep the assistant moving on work that outlives a single conversation. That framing targets the failure mode of naive agent loops, which handle a five step task and collapse on a fifty step one, and the framework's history shows the intent, it grew out of ModelScope-Agent and documents its earlier 0.8.0 era separately, with an arXiv paper recording the research lineage.

## One SDK, three faces

The interface strategy is a shared Python SDK handling execution and management for the CLI, the TUI and the WebUI, so agent logic and extensions written once run across terminals, browser workspaces and business applications with less integration and maintenance work. The three surfaces are not three products, the WebUI added in the release candidates features agentic chatting plus the complex code generation and video generation workflows, the CLI and TUI expose the same engine where terminals fit better, and extensions target the SDK rather than any face. For teams, that means an internal tool built on the SDK does not fork when someone wants a browser front end, and the examples directory mirrors the split, agent, capability, cli, skills and workflow examples all operating on the same core.

## Context compression as a headline feature

Version 1.6.0, released 2026-03-23, leads with a context compression mechanism, and its design is specific enough to trust, token usage monitoring, overflow detection, and automatic context compaction that prunes historical tool outputs and applies LLM based summarization. Long running agents die by context overflow, tool responses accumulate until the window fills, and the two pronged compaction, drop the stale raw outputs, summarize what mattered, is the standard remedy implemented as infrastructure rather than left to each developer. The same release added multimodal model input supporting image and video, integrated Sirchmunk for intelligent retrieval over local codebases and documentation during conversations, and shipped the Agentic Insight v2 improvements, four changes that together read as a framework maturing for sustained workloads.

## Agentic Insight, ranked on DeepResearch Bench

The flagship application is Agentic Insight v2, a fully refactored deep research system with better performance, scalability and trustworthiness, and its results are stated with leaderboard context, scoring 55.31 on DeepResearch Bench as number two among open source entries and number five overall with Qwen3.5-Plus and GPT 5.2 in the submitted version, and 55.43 with GPT5 and Qwen3.5-plus or flash in the release notes' configuration. Publishing the model pairing alongside the score is the honest form of benchmark reporting, since the harness and the models contribute jointly. The system lives under projects/deep_research/v2 with a WebUI entry point, turning the research workflow into something an analyst can drive rather than a script to configure.

## Skills implementing the Anthropic protocol

The skill system has a notable pedigree, MS-Agent Skills is an implementation of the Anthropic Agent Skills protocol, meaning skill definitions follow the structure Claude's ecosystem standardized rather than a local invention. Version 2, shipped in the 1.6.0 release candidates, upgraded the model to knowledge driven, describing skills as procedural knowledge with progressive disclosure, loading skill content as needed rather than up front, multi-source loading, and standard tool integration. A separate ms-agent-skills directory in the repository collects the skill assets, and the sandbox story runs alongside it through ms-enclave, the sandbox framework supported since v1.4.0 for running skill code with isolation. The memory component from v1.3.0, long-term and short-term, completes the persistence layer skills sit on.

## Agent Hub and the framework conversion zoo

The July 2026 addition of Agent Hub, exposed as ms-agent agent, addresses a workspace problem, managing agent workspace files locally and in remote ModelScope repositories, with uploads and downloads, background sync through a watch mode, status checks, backups and restoration. The striking part is the conversion support between frameworks, naming qoder, qwenpaw, openclaw, hermes, nanobot, openhuman and ms-agent as the formats it converts among, an acknowledgment that agent configurations are becoming portable artifacts people migrate between tools rather than one vendor's lock-in. An agent definition that can move between harnesses is a different kind of asset than one that cannot, and Agent Hub positions MS-Agent as the tool that respects the difference.

## Three dotenv layers and a plaintext warning

The environment template documents a deliberate layered configuration, three dotenv files read in order, the repository root .env for shared credentials, webui/.env for interface-wide overrides, and webui/backend/.env for backend-only settings, with later files overriding earlier ones and a real process environment variable always winning, and every value published into os.environ where the SDK's credential resolver and MCP dollar-brace placeholders read them. Provider entries cover an OpenAI-compatible default with base URL override, Alibaba DashScope for Qwen models with its compatible-mode endpoint, and ModelScope's own inference API. The warning attached deserves equal attention, the SDK writes resolved credentials in plaintext into MS_AGENT_HOME's settings.json, so that directory must never be shared, the kind of operational note that separates a usable framework from a leak waiting to happen.

## Projects from FinResearch to Singularity Cinema

The projects directory demonstrates the range. FinResearch, from v1.5.0 in November 2025, is a multi-agent workflow for financial research with data collection through Akshare and Baostock, DagWorkflow for orchestration, its own documentation and a hosted demo. Code Genesis handles complex code generation tasks, Singularity Cinema generates animated video for complex scenarios, and deep_research anchors the analytical side. The release history reads as an application portfolio accumulating around the core, v1.3.0 adding memory and RAY acceleration for document extraction, v1.4.0 the skills protocol and sandbox, v1.5.0 finance, v1.6.0 compression and multimodal, with release candidates in February 2026 and the final on March 23, and the repository last pushed 2026-09-21, bilingual in documentation throughout.

## Conclusion

Choose MS-Agent when agent work is measured in hours rather than turns, deep research, code generation, video pipelines, since the harness design assumes planning, memory, permissions and context pressure are the real problems, and the projects directory ships working examples of each. Choose a lighter loop framework for simple tool calling where a harness is overhead. Before adopting, note the ModelScope and DashScope provider pairing in the defaults alongside OpenAI-compatible endpoints, read the credential handling carefully, the SDK writes resolved credentials in plaintext into its settings directory, and pin to the v1.6.0 line rather than a release candidate, with the repository last pushed 2026-09-21.

## FAQ

### what is ms agent framework?

MS-Agent is the ModelScope project's modular, extensible open source agent framework for complex, long-running tasks, not a Microsoft product despite the name. It combines models, tools, skills and sub-agents under a customizable harness managing planning, context, permissions and execution feedback, with one Python SDK driving CLI, TUI and WebUI interfaces.

### How is MS-Agent installed?

Install the ms-agent package from PyPI, copy .env.example to .env and fill in the providers you use, OpenAI-compatible, DashScope or ModelScope, then run the CLI, TUI or WebUI. The Makefile offers pip install -e . for development along with documentation builds in English and Chinese.

### What is Agent Hub in MS-Agent?

Agent Hub, run through ms-agent agent, manages agent workspace files locally and in remote ModelScope repositories, supporting uploads, downloads, background sync with watch, status checks, backups and restoration, and conversion of agent configurations between frameworks including qoder, qwenpaw, openclaw, hermes, nanobot, openhuman and ms-agent formats.

## Sources

- [License: Apache-2.0](https://github.com/modelscope/ms-agent/blob/main/LICENSE)
- [modelscope/ms-agent on GitHub](https://github.com/modelscope/ms-agent)
- [Project website](https://ms-agent-en.readthedocs.io)
- [README](https://github.com/modelscope/ms-agent/blob/main/README.md)
- [Releases](https://github.com/modelscope/ms-agent/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/modelscope-ms-agent
