Skip to content

Build and run agents you can see, understand and trust.

7.7 KB
Raw Blame
[project]
name = "agentscope"
dynamic = ["version"]
description = "AgentScope: A Flexible yet Robust Multi-Agent Platform."
readme = "README.md"
authors = [
    { name = "SysML team of Alibaba Tongyi Lab", email = "[email protected]" }
]
license = "Apache-2.0"
keywords = ["agent", "multi-agent", "LLM", "AI"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Operating System :: OS Independent",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]
requires-python = ">=3.11"
dependencies = [
    "aioitertools",
    "anthropic",
    "certifi>=2026.10.19",
    "dashscope>=1.20.0",
    "docstring_parser",
    "filetype",
    "json5",
    "json_repair[schema]>=0.63.4",
    "mcp>=2.0.0",
    "httpx",
    "httpx2>=2.5.0",
    "numpy",
    "openai",
    "python-datauri",
    "opentelemetry-api>=1.39.0",
    "opentelemetry-sdk>=1.39.0",
    "opentelemetry-exporter-otlp>=1.39.0",
    "opentelemetry-semantic-conventions>=0.60b0",
    "python-socketio",
    "rich",
    "shortuuid",
    "python-frontmatter",
    "jinja2",
    "aiofiles",
    "tree_sitter",
    "tree_sitter_bash",
    "jsonschema",
    "referencing",
    "pypdf",
    # The IANA timezone database, which is absent on Windows and slim images
    "tzdata",
]

[project.optional-dependencies]
# ------------ Model APIs ------------
model-gemini = ["google-genai>=2.30.1"]
model-ollama = ["ollama>=0.5.4"]
model-xai = ["xai-sdk"]
classifier-jev = ["typesafe-sdk>=0.7"]
models = [
    "agentscope[model-gemini]",
    "agentscope[model-ollama]",
    "agentscope[model-xai]",
]
classifiers = ["agentscope[classifier-jev]"]
# ------------ Service ------------
service = [
    "fastapi",
    "uvicorn",
    "apscheduler",
    "ag-ui-protocol>=0.1.10",
    "aiortc>=1.14",
]
# ------------ Storage backends ------------
storage-redis = ["redis"]
# Async SQLAlchemy 2.0 + Alembic. The concrete driver
# (aiosqlite / asyncpg / aiomysql / asyncmy) is left to the user
# so the extra stays lightweight.
storage-sql = [
    "sqlalchemy[asyncio]>=2.0",
    "alembic>=1.13",
]
# S3-compatible blob store
storage-s3 = ["aioboto3"]
# ------------ Channel ------------
channel = [
    "lark-oapi>=1.4.0",
    "discord.py>=2.3",
    "dingtalk-stream>=0.24.3",
]
# ------------ Workspace (sandbox backends) ------------
workspace-docker = ["aiodocker"]
workspace-e2b = ["e2b"]
workspace-daytona = ["daytona"]
workspace-k8s = ["kubernetes-asyncio"]
workspace-opensandbox = ["opensandbox"]
workspace = [
    "agentscope[workspace-docker]",
    "agentscope[workspace-e2b]",
    "agentscope[workspace-daytona]",
    "agentscope[workspace-k8s]",
    "agentscope[workspace-opensandbox]",
]
# ------------ Tools ------------
# Ships the ``rg`` binary for the builtin Grep tool on LocalWorkspace
# (remote sandboxes install ripgrep inside the sandbox instead).
# 15.x ships wheels only for macOS-arm64 and manylinux_2_39 x86_64, so
# everything else (Windows, glibc<2.39, musl, aarch64) falls back to the
# Rust sdist and fails without a toolchain (#2504). 14.0 lacks those
# wheels too, hence the lower bound. Lift once upstream restores them.
tools = [
    "ripgrep>=14.1,<15",
]
# ------------ Realtime voice ------------
realtime = [
    "websockets>=14",
]
realtime-local = ["sounddevice"]
# ------------ Terminal UI ------------
tui = [
    "textual>=8.2,<9",
]
# ------------ A2A ------------
a2a = [
    "a2a-sdk>=1.1.1",
]
# ------------ Vector stores ------------
vdb-qdrant = ["qdrant-client"]
vdb-milvus = [
    "pymilvus>=2.4.0",
    "milvus-lite>=3.1.0",
]
vdb-mongodb = ["pymongo>=4.7"]
vdb-elasticsearch = ["elasticsearch[async]>=8.12"]
# ------------ RAG ------------
# Document parsers; pick a vector store via the vdb-* extras.
rag = [
    "pypdf",
    "python-pptx",
    "python-docx",
    "openpyxl>=3.1.5",
    "xlrd>=2.0",
    "pandas",
]
# ------------ Long-term memory ------------
# Required by `agentscope.middleware._longterm_memory.Mem0Middleware`.
# Pinned to mem0 v2.x because the middleware targets that
# architecture: ADDITIVE_EXTRACTION_PROMPT + AGENT_CONTEXT_SUFFIX
# (replaced v1's USER/AGENT_MEMORY_EXTRACTION_PROMPT split) and the
# v3 phased pipeline in `_add_to_vector_store`. Running on mem0 1.x
# wouldn't crash but the 2-tier add fallback degenerates into a
# wasted LLM call.
memory-mem0 = ["mem0ai>=2.0.0"]
# Required by `agentscope.middleware._longterm_memory.ReMeMiddleware`.
memory-reme = ["reme-ai>=0.4.0.6"]
memory = [
    "agentscope[memory-mem0]",
    "agentscope[memory-reme]",
]
# ------------ Deprecated aliases ------------
# Kept for backward compatibility; will be removed in a future
# major release. Use the prefixed names instead.
gemini = ["agentscope[model-gemini]"]
ollama = ["agentscope[model-ollama]"]
xai = ["agentscope[model-xai]"]
storage = ["agentscope[storage-redis]"]
sql = ["agentscope[storage-sql]"]
s3 = ["agentscope[storage-s3]"]
k8s = ["agentscope[workspace-k8s]"]
milvuslite = ["agentscope[vdb-milvus]"]
mongodb = ["agentscope[vdb-mongodb]"]
elasticsearch = ["agentscope[vdb-elasticsearch]"]
mem0 = ["agentscope[memory-mem0]"]
reme = ["agentscope[memory-reme]"]
# ------------ Full ------------
full = [
    "agentscope[models]",
    "agentscope[classifiers]",
    "agentscope[service]",
    "agentscope[realtime]",
    "agentscope[storage-redis]",
    "agentscope[storage-sql]",
    "agentscope[storage-s3]",
    "agentscope[channel]",
    "agentscope[workspace]",
    "agentscope[tools]",
    "agentscope[tui]",
    "agentscope[a2a]",
    "agentscope[rag]",
    "agentscope[vdb-qdrant]",
    "agentscope[vdb-milvus]",
    "agentscope[vdb-mongodb]",
    "agentscope[vdb-elasticsearch]",
    "agentscope[memory]",
]

# ------------ Development ------------
dev = [
    # Include full dependencies from local package
    "agentscope[full]",
    # Development tools
    "pre-commit",
    "pytest",
    "pytest-forked",
    "myst_parser",
    "matplotlib",
    # ``[lua]`` pulls in lupa so EVAL-based code paths are testable.
    "fakeredis[lua]",
    # SQL backend tests — SQLite via aiosqlite so no server is needed.
    "aiosqlite",
    # S3-backend testing — moto[server] spins up an in-process S3
    # (aioboto3 comes via full→storage-s3), boto3 seeds/verifies buckets.
    "moto[server,s3]",
    "boto3",
    # RAG parser tests — used to generate PDF fixtures in-memory
    "reportlab",
]

[project.urls]
Homepage = "https://github.com/agentscope-ai/agentscope"
Documentation = "https://docs.agentscope.io/"
Repository = "https://github.com/agentscope-ai/agentscope"

[tool.setuptools]
packages = { find = { where = ["src"] } }
include-package-data = true

[tool.setuptools.package-data]
# ``"*"`` applies to every discovered package. Patterns:
# - ``py.typed`` marks the typed package per PEP 561.
# - ``_models/*.yaml`` reaches into the data-only ``_models/``
#  subdirs that ship with each model provider (they have no
#   ``__init__.py`` and are not packages, but the files still
#   live alongside the parent package's source on disk).
"*" = [
    "py.typed",
    "_models/*.yaml",
    "_cosyvoice_models/*.yaml",
]
"agentscope.workspace._docker" = ["Dockerfile*.template"]
# The Alembic scaffolding for the SQL storage backend lives in the
# data-only ``_alembic/`` subtree (no ``__init__.py`` — Alembic loads
# ``env.py`` / the version scripts by file path, not import). Ship them
# explicitly so ``auto_migrate=True`` works from an installed wheel.
"agentscope.app.storage._sql" = [
    "_alembic/alembic.ini",
    "_alembic/script.py.mako",
    "_alembic/env.py",
    "_alembic/versions/*.py",
]

[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
version = {attr = "agentscope._version.__version__"}