AS AgentScopeAPI 手册 / API Reference

OffloadContextState

public record OffloadContextState(Map<String, List<Msg>> offloadContext) implements State
源码Source io/agentscope/core/memory/autocontext/OffloadContextState.java:35

承载卸载上下文状态数据的记录类型。位于 io.agentscope.core.memory.autocontext 包,实现 State。核心成员包括 offloadContext。

State record for persisting AutoContextMemory's offload context.

When messages are compressed with offload hints (e.g., "Use context_offload_tool to reload full content with uuid: xxx"), the original full content is stored in the offloadContext map. This state record wraps that map for session persistence.

Without persisting this state, after loading a session, the agent cannot reload offloaded content because the UUIDs reference non-existent data.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
offloadContextMap<String, List<Msg>>
执行卸载上下文相关操作。
map from UUID to the original messages that were offloaded

记录组件详情Record Component Detail

offloadContext

Map<String, List<Msg>> offloadContext

执行卸载上下文相关操作。

map from UUID to the original messages that were offloaded

源码Source io/agentscope/core/memory/autocontext/OffloadContextState.java:35
基于官方固定版本源码静态生成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.