基础设施Infrastructure
框架内部共享的基础设施:通用类型、异常体系、JSON/传输层、配置、日志、指标以及协议生成代码。排查底层问题时从这里入手。Shared foundations: common types, exceptions, JSON/transport, configuration, logging, metrics and generated protocol code.
心智模型Mental model
基础设施层提供通用类型、异常、序列化、传输、配置与工具函数,是其他所有功能域的共同底座。Infrastructure provides shared types, exceptions, serialization, transport, configuration and utilities underpinning every other domain.
先学什么What to learn first
- 异常类型决定重试策略:可重试错误与业务错误要分开。Exception types drive retry policy: separate retryable failures from business errors.
- 序列化边界要固定版本与字段兼容策略。Serialization boundaries need versioning and field-compatibility rules.
- 通用工具不要承载业务状态。Shared utilities must not hold business state.
生产常见坑Production pitfalls
- 捕获所有异常后静默返回,掩盖真实故障。Catching everything and returning silently hides real failures.
- 内部类型直接暴露为对外协议,升级即破坏兼容。Exposing internal types as public contracts breaks on upgrade.
域内图谱Domain map
点击节点打开 API 页面;拖拽平移,滚轮缩放。Click a node to open its API page. Drag to pan, scroll to zoom.
Python API 集Python API set 16
归入本功能域的全部 Python 公开类型,按所属包分组。Every public Python type classified into this domain, grouped by owning package.
agentscope.exception7
AgentOrientedException | class | 智能体 Oriented 异常,表示执行过程中的错误。 |
DeveloperOrientedException | class | Developer Oriented 异常,表示执行过程中的错误。 |
StructuredOutputError | class | 结构化输出错误,为框架提供通用类型与基础能力。 |
ToolGroupInactiveError | class | 工具组 Inactive 错误,为框架提供通用类型与基础能力。 |
ToolInterruptedError | class | 工具 Interrupted 错误,为框架提供通用类型与基础能力。 |
ToolJSONDecodeError | class | 工具 JSON Decode 错误,为框架提供通用类型与基础能力。 |
ToolNotFoundError | class | 工具未找到错误,为框架提供通用类型与基础能力。 |
agentscope.tui6
ChatUI | class | 聊天 UI,为框架提供通用类型与基础能力。 |
ChatUI.Confirmed | class | Confirmed,为框架提供通用类型与基础能力。 |
ChatUI.ExternalExecutionSubmitted | class | 外部执行 Submitted,为框架提供通用类型与基础能力。 |
ChatUI.InterruptRequested | class | 中断 Requested,为框架提供通用类型与基础能力。 |
ChatUI.Submitted | class | Submitted,为框架提供通用类型与基础能力。 |
MessagesUI | class | 消息 UI,为框架提供通用类型与基础能力。 |
agentscope.console1
ConsoleRenderer | class | 控制台渲染器,为框架提供通用类型与基础能力。 |
Java API 集Java API set 41
归入本功能域的全部 Java 公开类型,按包分组并标注构件。Every public Java type classified into this domain, grouped by package with its artifact.
io.agentscope.extensions.agentprotocol10
AgentFactory | interface | agentscope-extensions-agent-protocol | 定义智能体工厂契约的接口。 |
AgentProtocolAutoConfiguration | class | agentscope-extensions-agent-protocol | 智能体协议 Auto 配置,保存相关配置项。 |
AgentProtocolConstants | class | agentscope-extensions-agent-protocol | 智能体协议 Constants,为框架提供通用类型与基础能力。 |
AgentProtocolController | class | agentscope-extensions-agent-protocol | 智能体协议控制器,为框架提供通用类型与基础能力。 |
AgentProtocolEventBus | interface | agentscope-extensions-agent-protocol | 定义智能体协议事件总线契约的接口。 |
AgentProtocolProperties | class | agentscope-extensions-agent-protocol | 智能体协议属性,为框架提供通用类型与基础能力。 |
AgentProtocolTaskEventBus | class | agentscope-extensions-agent-protocol | 智能体协议任务事件总线,为框架提供通用类型与基础能力。 |
AgentRequest | record | agentscope-extensions-agent-protocol | 承载智能体请求数据的记录类型。 |
ProtocolTaskRepository | interface | agentscope-extensions-agent-protocol | 定义协议任务仓库契约的接口。 |
RuntimeContextCustomizer | interface | agentscope-extensions-agent-protocol | 定义运行时上下文 Customizer契约的接口。 |
io.agentscope.core.util8
ExceptionUtils | class | agentscope-core | 异常 Utils,为框架提供通用类型与基础能力。 |
JacksonJsonCodec | class | agentscope-core | Jackson JSON 编解码器,为框架提供通用类型与基础能力。 |
JsonCodec | interface | agentscope-core | 定义 JSON 编解码器契约的接口。 |
JsonException | class | agentscope-core | JSON 异常,表示执行过程中的错误。 |
JsonSchemaUtils | class | agentscope-core | JSON 模式 Utils,为框架提供通用类型与基础能力。 |
JsonUtils | class | agentscope-core | JSON Utils,为框架提供通用类型与基础能力。 |
MessageUtils | class | agentscope-core | 消息 Utils,为框架提供通用类型与基础能力。 |
TypeUtils | class | agentscope-core | 类型 Utils,为框架提供通用类型与基础能力。 |
io.agentscope.examples.compression.extra7
Builder | class | model-request-compression | CompressingOkHttpTransport的构建器。 |
Builder | class | model-request-compression | CompressionConfig的构建器。 |
CompressingOkHttpTransport | class | model-request-compression | Compressing Ok HTTP 传输层,为框架提供通用类型与基础能力。 |
CompressionConfig | class | model-request-compression | 用于HTTP 压缩的配置。 |
CompressionEncoding | enum | model-request-compression | 定义压缩 Encoding相关取值的枚举。 |
CompressionException | class | model-request-compression | 压缩异常,表示执行过程中的错误。 |
CompressionUtils | class | model-request-compression | 压缩 Utils,为框架提供通用类型与基础能力。 |
io.agentscope.core.shutdown6
AgentScopeJvmShutdownHook | class | agentscope-core | AgentScope Jvm Shutdown 钩子,为框架提供通用类型与基础能力。 |
AgentShuttingDownException | class | agentscope-core | 智能体 Shutting Down 异常,表示执行过程中的错误。 |
GracefulShutdownConfig | record | agentscope-core | 承载 Graceful Shutdown 配置数据的记录类型。 |
GracefulShutdownManager | class | agentscope-core | Graceful Shutdown 管理器,为框架提供通用类型与基础能力。 |
GracefulShutdownMiddleware | class | agentscope-core | Graceful Shutdown 中间件,在智能体执行流程中提供横切扩展。 |
PartialReasoningPolicy | enum | agentscope-core | 定义Partial 推理策略相关取值的枚举。 |
io.agentscope.core.interruption4
Builder | class | agentscope-core | InterruptContext的构建器。 |
InterruptContext | class | agentscope-core | 中断上下文,为框架提供通用类型与基础能力。 |
InterruptControl | class | agentscope-core | 中断 Control,为框架提供通用类型与基础能力。 |
InterruptSource | enum | agentscope-core | 定义中断来源相关取值的枚举。 |
io.agentscope.core.exception2
AgentExceptionInfo | record | agentscope-core | 承载智能体异常信息数据的记录类型。 |
CompositeAgentException | class | agentscope-core | Composite 智能体异常,表示执行过程中的错误。 |
io.agentscope.core.chat.completions.builder1
ChatCompletionsResponseBuilder | class | agentscope-extensions-chat-completions-web | 聊天补全响应构建器,用于构建并配置目标实例。 |
io.agentscope.core.chat.completions.converter1
ChatMessageConverter | class | agentscope-extensions-chat-completions-web | 聊天消息转换器,为框架提供通用类型与基础能力。 |
io.agentscope.core.chat.completions.streaming1
ChatCompletionsStreamingAdapter | class | agentscope-extensions-chat-completions-web | 聊天补全流式适配器,为框架提供通用类型与基础能力。 |
io.agentscope.examples.compression1
CompressionDemo | class | model-request-compression | 压缩 Demo,为框架提供通用类型与基础能力。 |
Python ↔ Java 对照Python ↔ Java
Python
AgentScopeExceptionset_id_factoryJava
两套实现共享同一概念模型,但在并发(async/await 与 Reactor)、打包(wheel 模块与 Maven 构件)和生命周期 API 上存在差异。需要精确签名时请使用 API 全景。The two implementations follow the same conceptual model but differ in concurrency (async/await vs Reactor), packaging (wheel modules vs Maven artifacts) and lifecycle APIs. Use the full API map to locate exact signatures.