Introduction¶
Integrating AgentScope in Python often encounters bottlenecks not in “can it be imported,” but in version mixing: documentation points to 2.x, yet the repository still uses 1.x patterns like ReActAgent and register_tool_function; models, tools, and conversation states each have separate entry points, making a change in one area easily affect others. While consulting official documentation can solve problems, Agents often lack a task-specific checklist and a replicable minimal engineering template.
Below is an introduction to the SkillHub community Skill agentscope-builder (coordinates @user_ea778c49/agentscope-builder). It aligns AgentScope official documentation with the source code of the target version, guiding Agents to build, debug, extend, or migrate. It defaults to AgentScope 2.x and includes reference documents, a minimal single-agent template, and local validation scripts.
What is this¶
agentscope-builder is an Agent skill package based on the universal SKILL.md format, described as a “Guide to AgentScope Framework Building.” It is published by community user user_ea778c49, sourced from the community, categorized under ai-agent in SkillHub, with a current store version of 1.0.2 (the skill version noted in the SKILL body within the package is 2.0.0, with an example verification baseline of AgentScope 2.0.10, Python 3.11+, and data verification date of 2026-10-16).
Official Entries:
- API Coordinate Page:
https://api.skillhub.cn/user_ea778c49/agentscope-builder - SkillHub Display Page:
https://www.skillhub.cn/skills/user_ea778c49/agentscope-builder
The page tag includes requires_api_key=true: To run through the minimal template in the package, a model provider key must be configured (the example uses DashScope’s DASHSCOPE_API_KEY).
Core Features¶
The following content is derived from the installed skill package’s SKILL.md and accompanying files, with capabilities organized by task type.
Version Boundaries and Migration¶
- Determine the actual AgentScope version used from project dependencies, lock files, and entry points (including
importlib.metadataquery commands). - For new projects, verify public APIs against 2.x by default; for 1.x projects, follow maintenance and migration references first, and only upgrade major versions if explicitly requested by the user.
- In case of conflicting information, prioritize the public APIs, source code, and documentation of the target version; do not write application-layer conventions like QwenPaw as framework hard requirements.
2.x Development Conventions¶
The skill organizes recommended usages for 2.x and explicitly lists 1.x template patterns to avoid, such as:
- Use
agentscope.agent.Agent,await agent.reply(message)/reply_stream. - Tools are accessed via
Toolkit(tools=[FunctionTool(fn)]); skill directories and MCPs are integrated viaToolkit’sskills_or_loadersandmcps. - Sessions and context:
AgentState,ContextConfig; extension sideReActConfig,ModelConfig,InjectionConfig, and middleware. - Do not use old APIs like
ReActAgent,memory=InMemoryMemory(),register_tool_functionin 2.x templates.
Topic-based Reference Documents¶
The skill package indexes tasks under references/, read by the Agent as needed:
| Task | Reference File |
|---|---|
| Models & Formatters | references/models.md |
| Tools, Permissions, MCP, Skill Loading | references/tools-and-skills.md |
| Sessions, Compression, Long-term Memory, Middleware | references/state-and-context.md |
| Multi-Agent & Planning Pipelines | references/workflows.md |
| 1.x Maintenance & Migration | references/migration-v1.md |
| QwenPaw Project Structure | references/qwenpaw.md |
| Service Deployment & Workspace | references/service-and-workspace.md |
| Documentation & Source Code Sources | references/sources.md |
Minimal Runnable Template¶
assets/minimal-agent/ provides a complete single-agent example (main.py, requirements.txt): DashScope model, a Python tool performing calculations, and the official console; it follows default permission policies, declaring pure calculation tools as read-only.
Local Validation Scripts¶
scripts/ in the package provides three types of scripts (not replacing real integration testing, but convenient for Agent self-checks):
inspect_environment.py: Reports installed versions and public signatures; no network access, no reading credentials.validate_skill.py: Checks front matter, reference paths, and Python example syntax.smoke_test.py: Uses a fake model in an environment with AgentScope 2.0.10 installed to verify messages, tool confirmation, skill loading, and state recovery.
Installation and Enablement¶
Install SkillHub CLI¶
If skillhub is not installed locally, follow the SkillHub installation instructions (full installation includes CLI and default Skills):
command -v skillhub && skillhub --version
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
To install only the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Install agentscope-builder¶
During installation, you must use --dir to point to the current Agent’s skills directory; otherwise, the default location ./skills/ may not be recognized.
skillhub install agentscope-builder --namespace user_ea778c49 --dir <skills directory>
The SkillHub page also supports instructing the AI to install via instructions:
Please install `@user_ea778c49/agentscope-builder` based on https://skillhub.cn/install/skillhub.md.
Common client skills paths (excerpted from SkillHub installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
After installation, restarting or refreshing the Agent is usually required to load the new skill. The package’s agents/openai.yaml provides a default prompt example: use $agentscope-builder to build a runnable agent according to the current project version and verify tools and states.
Typical Usage¶
1. Workflow after Agent enables the skill¶
Once the skill is enabled, the Agent should first determine the project’s AgentScope version, then read the corresponding reference based on the table above. For new projects, the skill suggests the order: Single Agent + One Model → Register Tools → Load Skill Directories & MCP as needed → Sessions/Long-term Memory → Multi-Agent or Service Deployment.
Version check example (in the project Python environment):
python -c "from importlib.metadata import version; print(version('agentscope'))"
2. Start from the minimal template¶
After copying assets/minimal-agent/ to the new project directory:
python -m venv .venv
# After activating the virtual environment:
python -m pip install -r requirements.txt
python main.py
Set DASHSCOPE_API_KEY via the current shell; optional DASHSCOPE_MODEL. The skill explicitly requires that real credentials not be written into source code or version repositories.
3. Environment self-check¶
Replace the path with the scripts directory under your local skill installation directory:
python /path/to/agentscope-builder/scripts/inspect_environment.py
python /path/to/agentscope-builder/scripts/inspect_environment.py --module agentscope.agent.Agent
After modifying the skill or template:
python /path/to/agentscope-builder/scripts/validate_skill.py
python /path/to/agentscope-builder/scripts/smoke_test.py
Use Cases & Notes¶
Who it is for
- Creating new agents based on AgentScope 2.x in Python, wanting the Agent to write entry points, tools, and states according to official APIs, rather than mixing 1.x fragments.
- Maintaining 1.x codebases and needing to evaluate upgrade scope according to the migration documents within the skill.
- When needing model integration, MCP, multi-agent pipelines, or service deployment, wanting the Agent to read accompanying references by index rather than filling the context all at once.
Limitations and Notes
- Tag
requires_api_key=true: To run the official example model, you need your own API Key; the skill emphasizes that credentials are injected only via environment variables. - The AgentScope 2.0.10 and Python 3.11+ in the skill body are verification snapshots at the time of writing; versions and documentation should be re-confirmed in the target environment before going live (
stableandlatestmay differ). smoke_test.pydepends on the installed AgentScope 2.0.10 and cannot replace real vendor API or production deployment verification.- SkillHub page statistics (as of data fetch): Rating 100000, Downloads 1126, Installs 2; community source, maintenance rhythm and compliance requirements should be self-evaluated before use.
Conclusion¶
agentscope-builder consolidates AgentScope 2.x conventions, topic-based references, minimal templates, and validation scripts into a single Skill, suitable for handing over to coding Agents for tasks like “building the structure by version, avoiding mixing 1.x/2.x writing.” Installation and coordinates are subject to SkillHub:
https://www.skillhub.cn/skills/user_ea778c49/agentscope-builderhttps://api.skillhub.cn/user_ea778c49/agentscope-builder