AgentScope 2.0 is a production-ready, multi-agent platform designed to bridge the gap between high-level agentic reasoning and robust execution. This page provides a technical guide to setting up the environment, managing dependencies via pyproject.toml, and executing your first agentic workflow using the SDK and the new Console interface.
AgentScope requires Python 3.11 or higher pyproject.toml20 It uses a modular installation approach via pyproject.toml extras to keep the core footprint minimal while supporting a vast ecosystem of models, storage backends, and sandboxes.
To install the base SDK with standard dependencies:
For advanced features like RAG, distributed services, or specific vector databases, use the following extras defined in pyproject.toml pyproject.toml51-167:
| Extra | Description | Key Dependencies |
|---|---|---|
models | Extended provider support (Gemini, Ollama, xAI) | google-genai, ollama, xai-sdk |
service | Backend Agent Service components | fastapi, uvicorn, ag-ui-protocol |
rag | Document processing pipeline | pypdf, python-pptx, pandas |
vdb-qdrant | In-memory/cloud vector search | qdrant-client |
vdb-milvus | Local/Lite vector search | milvus-lite, pymilvus |
vdb-mongodb | MongoDB Atlas vector search | pymongo |
workspace | Sandboxed execution (Docker, K8s, E2B, Daytona) | aiodocker, kubernetes-asyncio, e2b, daytona |
channel | External platform integrations | lark-oapi, discord.py |
full | All features and integrations | All above extras |
Example: Installing RAG with local Milvus support
Sources:
AgentScope uses a centralized CredentialFactory to manage API keys and provider-specific configurations. This allows for a clean separation between agent logic and sensitive configuration.
Each provider is implemented as a subclass of CredentialBase.
| Provider | Credential Class | Discriminator type |
|---|---|---|
| OpenAI | OpenAICredential | openai_credential |
| Gemini | GeminiCredential | gemini_credential |
| Anthropic | AnthropicCredential | anthropic_credential |
| DashScope | DashScopeCredential | dashscope_credential |
| Ollama | OllamaCredential | ollama_credential |
Credentials can be initialized directly or managed via environment variables.
Sources:
AgentScope bridges the gap between natural language interaction and structured code execution. The following diagrams map these conceptual spaces to specific code entities.
This diagram shows how a user's natural language input is transformed into a model call through SDK entities.
Mapping the RAG concepts to the agentscope.rag module classes src/agentscope/rag/__init__.py4-28
Sources:
AgentScope 2.0 introduces launch_console src/agentscope/console/_console.py an interactive chat loop bound to a single agent for testing without writing UI code.
For more granular control, use the ConsoleRenderer src/agentscope/console/_renderer.py1-20 to turn an AgentEvent stream into line-based terminal output src/agentscope/console/__init__.py6-9
Sources:
For Retrieval-Augmented Generation, you must select a VectorStoreBase implementation src/agentscope/rag/_vdb/_vector_store.py8
| Database | Implementation Class | Extra |
|---|---|---|
| Qdrant | QdrantStore | vdb-qdrant |
| Milvus Lite | MilvusLiteStore | vdb-milvus |
| MongoDB | MongoDBStore | vdb-mongodb |
| Elasticsearch | ElasticsearchStore | vdb-elasticsearch |
Milvus Lite allows for local file-based persistence without requiring a server pyproject.toml107
Sources:
Refresh this wiki