Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on Linux
Written by AI from the README.
Saved setup from 1 h ago
Will it work on Linux?
Also: Docs ↗
Heads-upBuilding it yourself? It also needs Redis and MongoDB.
CONTRIBUTING.mdThank you for your interest in contributing to AgentScope!
As an open-source project, we warmly welcome and encourage contributions from the community. Whether you're fixing bugs, adding new features, improving documentation, or sharing ideas, your contributions help make AgentScope better for everyone.
To support the long-term, healthy growth of AgentScope and its open-source community, we keep our development plan transparent and openly tracked.
Our roadmap is public. The AgentScope development plan is published and continuously updated on our GitHub Projects page. The roadmap reflects the technical direction set by the core team, who are responsible for AgentScope's overall design and quality.
Tasks open to the community. Items labeled help wanted on the Projects
page/issues are contribution opportunities open to everyone. If one of these
interests you:
If you'd like to join the core development. We warmly welcome contributors who want to go deeper and help shape AgentScope itself. Over time, we plan to gradually invite committed contributors into the core development circle. Before reaching out, we'd like to share a few honest expectations so you can decide whether it's a good fit right now:
If this fits your situation, please reach out to the core developers — we'd love to talk.
Proposing something new. If you have an idea that isn't on the roadmap yet, please open a new issue describing your proposal. The core team will respond and discuss it with you so we can find the best path forward together.
AgentScope welcomes contributors who use AI coding assistants — Claude Code, Cursor, Codex, Copilot, and others. We just ask that they be used responsibly. AgentScope is sustained by reviewer time and community trust, and AI-assisted contributions need to honor both.
A few expectations when AI is involved in your work:
You — not the AI — are the author. Read the diff line by line, run it, and make sure you understand what changed and why before you push. "Claude Code / Cursor / Codex told me to do it" is not an acceptable answer in code review, and is not the kind of behavior that builds a healthy open-source community. PRs whose authors cannot explain their own changes will be closed.
Review your AI-generated code before opening a PR. Reviewer time is the most precious resource in this project. Don't outsource your own review to the maintainers by dumping unreviewed AI output into a PR.
Keep PRs atomic. Do not submit a 10K+-line PR produced by an AI in a single shot. Such PRs are unreviewable and will be rejected. Break the work into focused, single-purpose PRs the same way a human contributor would.
AI-assisted code follows the same rules. All of AgentScope's development principles — modularity, lazy imports, conventional commits, test coverage, no surprise API breaks — apply identically to code written with AI assistance. AI is not an excuse for skipping conventions.
The goal is simple: AI helps you move faster, but the responsibility for what lands in AgentScope still rests with you as a human contributor.
End-to-end, contributing a change to AgentScope looks like this.
Before writing code, find or open the issue that frames your work.
help wanted (see §1).
Comment on the issue to claim it before starting.git clone https://github.com/<your-username>/agentscope.git
cd agentscope
git remote add upstream https://github.com/agentscope-ai/agentscope.git
main:
git checkout main
git pull upstream main
git checkout -b feat/<short-description>
Use a branch name aligned with the change type, e.g., feat/redis-memory,
fix/react-agent-leak, docs/contributing-update.AgentScope requires Python 3.11+ (see pyproject.toml).
# Create an isolated environment (uv shown; virtualenv / conda also fine)
uv venv
source .venv/bin/activate
# Install AgentScope in editable mode with the dev extras
pip install -e ".[dev]"
# or, equivalently, with uv:
uv pip install -e ".[dev]"
# Enable the git pre-commit hooks
pre-commit install
The dev extra pulls in pre-commit, pytest, the documentation
toolchain, and the full extra (which itself includes models, service,
and storage). A single installation gives you everything needed to develop
and run the complete test suite.
A few conventions to follow while writing code:
Lazy imports for optional dependencies. Any dependency not listed in
[project.dependencies] of pyproject.toml — i.e., anything coming
from the optional groups (gemini, ollama, xai, service, storage,
etc.) — must be lazy-imported at point of use rather than at module
top level:
def some_function():
import google.genai # from the `gemini` extra — lazy-imported
# ... use google.genai here
This keeps import agentscope lightweight, and ImportError surfaces
only when a feature actually relying on the extra is invoked. If your
change requires a brand-new dependency, decide first whether it belongs
in the base [project.dependencies] (always required, kept small) or in
one of the optional extras — and discuss it in the issue before merging.
Follow the project's code style. Pre-commit handles formatting and most lint rules automatically. Don't fight the formatter.
Write unit tests alongside features. Tests live under tests/ and
follow the existing structure. Tests that rely on an optional extra
(e.g., Redis, Ollama) should skip cleanly when that extra isn't
installed.
Before opening the PR, run the same checks CI will run:
# Auto-format and lint
pre-commit run --all-files
# Run the unit tests
pytest tests
If a pre-commit hook fails, fix the issue (most fixes are applied
automatically) and re-stage the files. Don't bypass hooks with
--no-verify.
Update documentation alongside the code change.
README.md if your change affects how users get started or what
AgentScope advertises.Commit message format. We follow the Conventional Commits specification. This keeps commit history readable and enables automatic changelog generation.
<type>(<scope>): <subject>
Types:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (whitespace, formatting, etc.)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testsci: Changes to CI configuration files and scriptschore: Changes to the build process or auxiliary tools and librariesExamples:
feat(models): add support for Claude-3 model
fix(agent): resolve memory leak in ReActAgent
docs(readme): update installation instructions
refactor(formatter): simplify message formatting logic
test(models): add unit tests for OpenAI integration
Pull request title format. PR titles follow the same Conventional
Commits format and are validated automatically by GitHub Actions on PRs
against main. PRs with invalid titles will be blocked until corrected.
<type>(<scope>): <description>
Requirements:
feat, fix, docs, ci, refactor, test, chore, perf, style, build, revert-), and underscores (_) are allowedExamples:
✅ Valid:
feat(memory): add redis cache support
fix(agent): resolve memory leak in ReActAgent
docs(tutorial): update installation guide
ci(workflow): add PR title validation
refactor(my-feature): simplify logic
❌ Invalid:
feat(Memory): add cache # Scope must be lowercase
feat(MEMORY): add cache # Scope must be lowercase
feat(MyFeature): add feature # Scope must be lowercase
Open the PR. Push your branch to your fork and open a pull request
against agentscope-ai/agentscope:main. In the PR description:
Fixes #123 or Refs #123)A few cross-cutting constraints worth knowing before you start a contribution. Module-specific notices live in the corresponding module guide below.
The notes below cover the modules most commonly extended by community contributors. For other modules, please open an issue first so we can coordinate.
A chat model in AgentScope is more than a single class — to be usable
inside an Agent, it needs a small set of upstream/downstream pieces.
A complete chat-model contribution includes all of the following:
Credential class — under agentscope.credential, subclassing
CredentialBase. Carries the API key, endpoint, and other auth fields
your SDK needs.
Reference: agentscope/credential/_anthropic.py
Chat model class — under agentscope.model.<provider>/, subclassing
ChatModelBase. The implementation needs to cover:
tool_choice argumentReference: agentscope/model/_anthropic/
Model card YAML(s) — under
agentscope.model.<provider>._models/, one YAML per supported model.
Required fields: name, label, status, input_types,
output_types, context_size, output_size. Optional:
parameter_overrides, deprecated_at.
Example (claude-sonnet-4-6.yaml):
name: claude-sonnet-4-6
label: Claude Sonnet 4.6
status: active
input_types:
- text/plain
- image/jpeg
output_types:
- text/plain
context_size: 1000000
output_size: 65536
parameter_overrides:
max_tokens: {"maximum": 65536}
Formatter classes — under agentscope.formatter, both subclassing
FormatterBase. Two variants are required because some APIs treat
multi-agent conversations differently from single-user chat:
<Provider>ChatFormatter for single-user chat scenarios<Provider>MultiAgentFormatter for multi-agent scenariosEach formatter converts Msg objects into the request format the
provider's API expects.
Reference: agentscope/formatter/_anthropic_formatter.py
⚠️ PRs that add only the model class without the matching credential, model card YAML, and both formatter variants will not be merged.
AgentScope deliberately maintains a single core agent class —
agentscope.agent.Agent — that integrates all functionality of the
AgentScope library (memory, tools, MCP, formatters, models, etc.).
For specialized or domain-specific agents, please contribute them as
examples rather than as new classes in agentscope.agent.
If you believe a use case genuinely requires a new top-level agent class:
Agent capabilities is insufficient.A Workspace provides the runtime context an agent operates in (skills, scheduled tasks, etc.). Adding a new workspace backend requires two classes plus documentation:
Workspace class — under agentscope.workspace, subclassing
WorkspaceBase. Implements the storage and lifecycle semantics of
your backend.
Reference: agentscope/workspace/_local_workspace.py (LocalWorkspace)
Workspace manager class — under
agentscope/app/workspace_manager/, subclassing
WorkspaceManagerBase. Wires your workspace into the application
lifecycle.
Reference: LocalWorkspaceManager in
agentscope/app/workspace_manager/_local_workspace_manager.py.
Documentation — open a companion PR in agentscope-ai/docs describing how to configure and use your workspace.
We highly encourage contributions of new examples that showcase AgentScope's capabilities.
The examples/ directory in the main repository focuses on
demonstrating specific features and capabilities — concise,
educational reference implementations. For more complete, production-style
applications, please contribute them to
agentscope-samples
instead.
A new example should live in its own subdirectory:
examples/
└── <example-name>/
├── main.py
├── README.md # explain the example's purpose, how to run it, and expected output
└── ...
examples/agent_service/ is a good starting reference.
If you need assistance or have questions:
Thank you for contributing to AgentScope! Your efforts help build a better tool for the entire community.
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
git clone https://github.com/agentscope-ai/agentscope.git cd agentscope
Python >=3.11
sudo apt install python3 python3-venv # Debian/Ubuntu
Needs: Redis, MongoDB (no compose file — install locally or run via Docker)
python3 -m venv .venv source .venv/bin/activate pip install -e .
pytest
AgentScope requires Python 3.11 or higher.
uv pip install agentscope
# Pull the source code from GitHub
git clone -b main https://github.com/agentscope-ai/agentscope.git
# Install the package in editable mode
cd agentscope
uv pip install -e .
No reports for Linux yet.
GitManual AI Agent reads the 9 key files and writes a step-by-step guide for Linux. Once written, it's saved for everyone.