Skip to content

Commit b7ab49c

Browse files
ok Merge branch 'main' of github.com:modelscope/ms-agent into release/1.6
2 parents 62823bd + eb1ddb0 commit b7ab49c

File tree

1 file changed

+115
-14
lines changed

1 file changed

+115
-14
lines changed

README.md

Lines changed: 115 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ MS-Agent is a lightweight framework designed to empower agents with autonomous e
4141
- **Code Generation**: Supports code generation tasks with artifacts.
4242
- **Short Video Generation**:Support video generation of about 5 minutes.
4343
- **Agent Skills**: Implementation of [Anthropic-Agent-Skills](https://docs.claude.com/en/docs/agents-and-tools/agent-skills) Protocol.
44+
- **WebUI**: Modern web interface for agent interaction with real-time WebSocket communication.
4445
- **Lightweight and Extensible**: Easy to extend and customize for various applications.
4546

4647

@@ -262,6 +263,58 @@ asyncio.run(main())
262263
</details>
263264
264265
266+
### Agent Skills
267+
268+
**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".
269+
270+
271+
#### Key Features
272+
273+
- 📜 **Standard Skill Protocol**: Fully compatible with the [Anthropic Skills](https://github.com/anthropics/skills) protocol
274+
- 🧠 **Heuristic Context Loading**: Loads only necessary context—such as `References`, `Resources`, and `Scripts` on demand
275+
- 🤖 **Autonomous Execution**: Agents autonomously analyze, plan, and decide which scripts and resources to execute based on skill definitions
276+
- 🔍 **Skill Management**: Supports batch loading of skills and can automatically retrieve and discover relevant skills based on user input
277+
- 🛡️ **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
278+
- 📁 **Multi-file Type Support**: Supports documentation, scripts, and resource files
279+
- 🧩 **Extensible Design**: The skill data structure is modularized, with implementations such as `SkillSchema` and `SkillContext` provided for easy extension and customization
280+
281+
282+
#### Quick Start
283+
284+
> 💡 Note:
285+
> 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.
286+
> 2. Agent Skills requires ms-agent >= 1.4.0
287+
288+
289+
**Installation**:
290+
291+
```shell
292+
pip install ms-agent
293+
```
294+
295+
**Usage**:
296+
297+
> This example demonstrates how to configure and run an Agent Skill that generates generative art code based on p5.js flow fields.
298+
299+
300+
Refer to: [Run Skills](projects/agent_skills/run.py)
301+
302+
303+
**Result**:
304+
305+
<div align="center">
306+
<img src="https://github.com/user-attachments/assets/9d5d78bf-c2db-4280-b780-324eab74a41e" alt="FlowFieldParticles" width="750">
307+
<p><em>Agent-Skills: Flow Field Particles</em></p>
308+
</div>
309+
310+
311+
#### References
312+
- **README**: [MS-Agent Skills](projects/agent_skills/README.md)
313+
- **Anthropic Agent Skills Official Docs**: [Anthropic-Agent-Skills](https://docs.claude.com/en/docs/agents-and-tools/agent-skills)
314+
- **Anthropic Skills GitHub Repo**: [Skills](https://github.com/anthropics/skills)
315+
316+
317+
265318
### Agentic Insight
266319
267320
#### - Lightweight, Efficient, and Extensible Multi-modal Deep Research Framework
@@ -340,36 +393,40 @@ For more details, refer to [Doc Research](projects/doc_research/README.md)
340393
341394
<br>
342395
343-
### Code Scratch
396+
### Code Genesis
344397
345-
This project provides a framework for **Code Scratch**, enabling agents to autonomously generate code projects.
398+
**Code Genesis** is a production-ready multi-agent framework that orchestrates specialized AI agents to autonomously generate complete software projects from natural language requirements.
346399
347400
#### Features
348401
349-
- 🎯 **Complex Code Generation** - Support for complex code generation tasks, especially React frontend and Node.js backend
350-
- 🔧 **Customizable Workflows** - Enable users to freely develop their own code generation workflows tailored to specific scenarios
351-
- 🏗️ **Three-Phase Architecture** - Design & Coding Phase followed by Refine Phase for robust code generation and error fixing
352-
- 📁 **Intelligent File Grouping** - Automatically groups related code files to minimize dependencies and reduce bugs
353-
- 🔄 **Auto Compilation & Fixing** - Automatic npm compilation with intelligent error analysis and iterative fixing
402+
- 🎯 **End-to-End Project Generation** - From requirement analysis to deployment-ready artifacts with minimal human intervention
403+
- 🔧 **Dual Workflow Modes** - Standard 7-agent pipeline for production systems, or streamlined 4-agent mode for rapid prototyping
404+
- 🏗️ **Topology-Aware Code Generation** - Dependency-driven scheduling eliminates hallucinated imports and enables parallel generation
405+
- 📁 **LSP-Integrated Validation** - Real-time Language Server Protocol checks ensure syntactic correctness and import resolution
406+
- 🔄 **Self-Healing Refinement** - Automated runtime verification and deployment
354407
355408
#### Demo
356409
357-
**AI Workspace Homepage**
410+
**Homepage**
358411
359-
Generate a complete ai workspace homepage with the following command:
412+
Generate a complete homepage with the following command:
360413
361414
```shell
362-
PYTHONPATH=. openai_api_key=your-api-key openai_base_url=your-api-url python ms_agent/cli/cli.py run --config projects/code_genesis --query 'Build a comprehensive AI workspace homepage' --trust_remote_code true
415+
PYTHONPATH=. openai_api_key=your-api-key openai_base_url=your-api-url python ms_agent/cli/cli.py run --config projects/code_genesis --query 'Build a static site to display skills, projects, and contact info' --trust_remote_code true
363416
```
364417
418+
<div align="center">
419+
<img src="https://github.com/user-attachments/assets/841fd06e-3611-4b27-86e0-4881963639bd" img width="2940" height="1670" alt="LocalGradioApplication" width="750">
420+
<p><em>Demo: Homepage</em></p>
421+
</div>
422+
365423
The generated code will be output to the `output` folder in the current directory.
366424
367425
**Architecture Workflow:**
368-
- **Design Phase**: Analyze requirements → Generate PRD & module design → Create implementation tasks
369-
- **Coding Phase**: Execute coding tasks in intelligent file groups → Generate complete code structure
370-
- **Refine Phase**: Auto-compilation → Error analysis → Iterative bug fixing → Human evaluation loop
426+
- **Standard Pipeline** (7 agents): User Story → Architect → File Design → File Order → Install → Coding → Refine
427+
- **Simple Pipeline** (4 agents): Orchestrator → Install → Coding → Refine
371428
372-
For more details, refer to [Code Scratch](projects/code_genesis/README.md).
429+
For more details, refer to [Code Genesis](projects/code_genesis/pr_article.md).
373430
374431
<br>
375432
@@ -438,6 +495,50 @@ aggregator:
438495
- README: [FinResearch](projects/fin_research/README.md)
439496
- Documentation: [MS-Agent Documentation](https://ms-agent-en.readthedocs.io/en/latest/Projects/FinResearch.html)
440497
498+
### WebUI
499+
500+
MS-Agent provides a modern web interface for interacting with agents. Built with React frontend and FastAPI backend, featuring real-time WebSocket communication.
501+
502+
#### Demo
503+
504+
<div align="center">
505+
<img src="https://github.com/user-attachments/assets/62026584-6c96-4a84-a849-05ae49906f48" alt="LocalGradioApplication" width="750">
506+
<p><em>Demo: WebUI</em></p>
507+
</div>
508+
509+
#### Quick Start
510+
511+
**Start WebUI:**
512+
513+
```bash
514+
ms-agent ui
515+
```
516+
517+
The browser will automatically open at http://localhost:7860
518+
519+
**Command Options:**
520+
521+
| Option | Description | Default |
522+
|--------|-------------|---------|
523+
| `--host` | Server host | 0.0.0.0 |
524+
| `--port` | Server port | 7860 |
525+
| `--production` | Production mode | False |
526+
| `--no-browser` | Don't auto-open browser | False |
527+
| `--reload` | Enable auto-reload (dev) | False |
528+
529+
**Examples:**
530+
531+
```bash
532+
# Custom port
533+
ms-agent ui --port 8080
534+
535+
# Production mode without auto browser
536+
ms-agent ui --production --no-browser
537+
```
538+
539+
540+
<br>
541+
441542
### Singularity Cinema
442543

443544
Singularity Cinema is an Agent-powered workflow for generating short videos, capable of producing high-quality complex short videos using either a single-sentence prompt or knowledge-based documents.

0 commit comments

Comments
 (0)