AS AgentScopeAPI 手册 / API Reference
闯关学习Learning path

12 关,把 AgentScope 装进脑子12 units to build AgentScope into your head

先建立功能域脉络,再用概念卡、闪卡和选择题巩固,最后用 20 个真实生产事故把知识压进肌肉记忆。每道题都能跳回对应 API,学完即可上手。Build the domain map first, reinforce it with concept cards, flashcards and quizzes, then lock it in with 20 real production incidents. Every question links back to the API, so you can start building immediately.

12闯关单元units
120选择题questions
20生产事故incidents
0XP
—正确率accuracy
0待复习错题wrong answers

闯关路径The path

每关约 15 分钟:读心智模型、翻概念卡、做 10 道题,再看一个生产事故。Each unit takes about 15 minutes: read the mental model, flip the concept cards, answer ten questions, then open one production scenario.

01基础设施Infrastructure

先搭骨架:一张图看懂 AgentScopeBuild the skeleton: see AgentScope as one map

先建立 15 个功能域的坐标系,再往里填 API。学完本单元,你能判断一个问题属于哪一层,以及下一步该看哪个模块。Build a coordinate system of 15 functional domains before memorizing APIs. After this unit you can locate any problem in the right layer and know which module to open next.

进度Progress0 / 10
02智能体运行时Agent runtime

智能体生命周期:一次回复到底发生了什么Agent lifecycle: what happens during one reply

沿着 reply / reply_stream 走完一次推理:组装上下文、调用模型、执行工具、回填结果、更新状态。掌握中断、观察、压缩与迭代上限。Walk one reply end to end: assemble context, call the model, run tools, feed results back and persist state. Learn interruption, observation, compression and iteration limits.

进度Progress0 / 10
03模型与向量化Models & embeddings

模型边界:ChatModel、Formatter 与凭证Model boundary: ChatModel, Formatter and credentials

模型层把各家协议收敛为统一输入输出。学完本单元,你能定位一次模型调用失败到底是凭证、请求格式、参数还是重试策略的问题。The model layer normalizes vendor protocols into unified input and output. After this unit you can tell whether a failed call is caused by credentials, request formatting, parameters or retry policy.

进度Progress0 / 10
04消息·事件·格式化Messages, events & formatting

消息与事件:系统内唯一的数据契约Messages and events: the single data contract

掌握 Msg、内容块、角色和流式事件。学完本单元,你能排查消息丢失、顺序错乱、工具结果无法回填和前端重复渲染。Master Msg, content blocks, roles and streaming events. After this unit you can debug lost messages, ordering issues, unlinked tool results and duplicated UI rendering.

进度Progress0 / 10
05工具与技能Tools & skills

工具与 MCP:让模型安全地调用外部能力Tools and MCP: let the model call external capabilities safely

工具 schema 就是提示词的一部分。学完本单元,你能设计可被正确选择、可靠执行、可观测且可权限收口的工具,并把 MCP 服务接入同一套执行体系。Tool schemas are part of the prompt. After this unit you can design tools that are selected correctly, execute reliably, stay observable and pass permission checks, and expose MCP services through the same execution system.

进度Progress0 / 10
06状态·记忆·会话State, memory & sessions

状态与记忆:让会话可恢复、可扩展State and memory: recoverable, scalable conversations

状态决定进程重启后能否接着聊,记忆决定跨会话能否记得。学完本单元,你能区分两者并避免多实例覆盖、并发写冲突和上下文膨胀。State decides whether a conversation survives a restart; memory decides whether it survives across sessions. After this unit you can separate them and avoid multi-instance overwrites, write conflicts and context bloat.

进度Progress0 / 10
07RAG 与知识库RAG & knowledge

RAG 知识库:从文档到可信回答RAG knowledge bases: from documents to trustworthy answers

把文档切分、向量化、存储、召回与重排串成一条链路。学完本单元,你能定位召回为空、答案过期和引用缺失三类高频问题。Chain parsing, chunking, embedding, storage, retrieval and reranking. After this unit you can diagnose empty recall, stale answers and missing citations.

进度Progress0 / 10
08规划与工作流Planning & workflows

规划与流水线:把复杂目标拆成可靠步骤Planning and pipelines: turn complex goals into reliable steps

固定流程用流水线,需要人工审批和状态机用 SOP。学完本单元,你能为任务选择正确编排方式,并保证每一步可重放、可观测、可终止。Use pipelines for fixed flows and SOPs for state machines with human approval. After this unit you can choose the right orchestration and keep every step replayable, observable and bounded.

进度Progress0 / 10
09多智能体与 A2AMulti-agent & A2A

多智能体与 A2A:角色、委派与边界Multi-agent and A2A: roles, delegation and boundaries

多智能体不是把 Agent 复制多份,而是设计角色、交付物和路由。学完本单元,你能避免循环委派、重复检索和无法追踪的任务链路。Multi-agent is not copying an agent many times; it is designing roles, deliverables and routing. After this unit you can avoid delegation loops, duplicate retrieval and untraceable task chains.

进度Progress0 / 10
10实时语音Realtime voice

实时语音:低延迟、可打断的交互Realtime voice: low-latency, interruptible interaction

实时链路由采集、传输、模型、播放四段组成。学完本单元,你能理解 VAD、轮次提交、打断取消和资源释放,并定位延迟与回声问题。The realtime path spans capture, transport, model and playback. After this unit you understand VAD, turn commits, barge-in cancellation and resource release, and can diagnose latency and echo issues.

进度Progress0 / 10
11运行时与部署Runtime & deployment

运行时与沙箱:把智能体安全地跑起来Runtime and sandboxes: run agents safely

运行时负责服务化、调度与部署,沙箱负责隔离执行。学完本单元,你能设计无状态服务、选择隔离后端,并建立超时、灰度与回滚机制。Runtime handles serving, scheduling and deployment; sandboxes isolate execution. After this unit you can design stateless services, choose isolation backends and add timeouts, canaries and rollback.

进度Progress0 / 10
12评估与追踪Evaluation & tracing

可观测性与生产事故:从日志到定位Observability and production incidents: from logs to root cause

线上问题不是“模型变笨了”,而是链路某一段缺信息。学完本单元,你能用 trace、hook、事件和渠道回调指标定位模型、工具、状态和平台层故障。Production issues are rarely 'the model got dumber'; some segment lacks information. After this unit you can use traces, hooks, events and channel metrics to locate model, tool, state and platform failures.

进度Progress0 / 10

它如何帮你建立脉络How this builds your mental model

  1. 第 1-6 关搭建执行主线:运行时、模型、消息、工具、MCP 与状态。Units 1-6 build the execution spine: runtime, models, messages, tools, MCP and state.
  2. 第 7-10 关扩展到 RAG、规划、多智能体与实时语音。Units 7-10 extend into RAG, planning, multi-agent and realtime voice.
  3. 第 11-12 关覆盖部署、沙箱与生产可观测性。Units 11-12 cover deployment, sandboxes and production observability.
  4. 每关结束后打开对应功能域图谱,查看 API 之间的关系。After each unit, open the linked domain graph to see how its APIs relate.

本地保存了什么What gets saved locally

答题记录、单元进度、错题、XP 与考试成绩只保存在浏览器 localStorage 中,不会上传。可使用重置按钮清空。Answers, unit progress, wrong answers, XP and exam scores are stored in your browser via localStorage. Nothing is uploaded. Use the reset button to clear everything.

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.