Skip to main content

Installation

AgentScope requires Python 3.11+, and you can install it from PyPI or from source. It’s recommended to install AgentScope by using uv.

From PyPI

From Source

Verify Installation

To ensure AgentScope is installed successfully, check via executing the following code:

Your First Agent

The snippet below builds the minimal agent: a DashScope credential, the matching chat model, an empty toolkit, and an Agent. The agent exposes two entry points — reply returns the final message, while reply_stream yields incremental events as the agent reasons and acts.
Set DASHSCOPE_API_KEY in your environment before running the script. To use a different provider, swap DashScopeCredential and DashScopeChatModel for the matching pair (e.g. OpenAICredential and OpenAIChatModel).

Extra Dependencies

To satisfy the requirements of different functionalities, AgentScope provides extra dependencies that can be installed based on your needs.
  • full: including extra dependencies for model APIs, tool functions and more.
  • dev: development dependencies, including testing and documentation tools.
For example, when installing the full dependencies, the installation command varies depending on your operating system.
  • For Windows users:
  • For Mac and Linux users: