ms-agent  by modelscope

Agent framework connecting models with the world

created 2 years ago
3,308 stars

Top 15.0% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

ModelScope-Agent provides a customizable and scalable framework for building AI agents. It allows users to easily create agents with capabilities like role-playing, LLM integration, tool usage, planning, and memory, connecting various models and tools for diverse applications. The framework is designed for extensibility, enabling users to integrate their own LLMs and tools.

How It Works

The core of ModelScope-Agent is its modular design, comprising an LLM component for decision-making and a function_list for available tools. Agents process user requests by leveraging the LLM to determine the appropriate tools to invoke. The framework supports a unified interface for tool and LLM registration, promoting low coupling and allowing developers to easily extend agent capabilities with custom components or pre-built tools like code interpreters, web browsers, and image generators.

Quick Start & Requirements

  • Installation: Clone the repository and install dependencies:
    git clone https://github.com/modelscope/modelscope-agent.git
    cd modelscope-agent && pip install -r requirements.txt
    
  • Prerequisites:
    • DASHSCOPE_API_KEY for Dashscope models (e.g., Qwen) and Wanx image generation.
    • AMAP_TOKEN for AMAP weather tool.
    • Python environment.
  • Resources: ModelScope Notebook with GPU environment is recommended for easier setup and execution of demos.
  • Demos & Docs: ModelScope Notebook, Quickstart Example, LLM Docs.

Highlighted Details

  • Supports integration with various LLMs including Dashscope, ModelScope, and OpenAI.
  • Offers a rich set of built-in tools: code interpreter, weather query, text-to-image, web browsing, and more.
  • Features a ModelScope-Agent-Server for using models like Qwen2 with OpenAI SDK and tool calling.
  • Includes advanced features like parallel tool calling, RAG flow upgrades, and multi-agent solutions via Ray.
  • Supports image input for RolePlay agents with models like GPT-4o.

Maintenance & Community

The project is actively developed with frequent updates and new features. Community engagement is encouraged through issue reporting and pull requests. Contact is available via email at contact@modelscope.cn and a communication group.

Licensing & Compatibility

  • License: Apache License (Version 2.0).
  • Compatibility: Permissive license suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

API keys for specific tools (Dashscope, AMAP) are required and must be configured as environment variables, which can be a setup hurdle for new users. Some advanced features and demos might require specific configurations or dependencies.

Health Check
Last commit

1 day ago

Responsiveness

1 week

Pull Requests (30d)
52
Issues (30d)
5
Star History
224 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.