CompactionEntry
public static final class CompactionEntry extends SessionEntry
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:255–279压缩条目,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.harness.agent.memory.session 包,继承自 SessionEntry。核心成员包括 getFirstKeptEntryId、getSummaryEntryId、CompactionEntry。
Non-destructive compaction marker. Records which entry is the first kept entry —
all entries before firstKeptEntryId are considered compacted (not visible
to the LLM) but remain in the file for full history replay.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public CompactionEntry(String id, String parentId, Instant timestamp, String firstKeptEntryId, String summaryEntryId) | 初始化 `CompactionEntry` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getFirstKeptEntryId() | 获取 `getFirstKeptEntryId`。 Returns the first kept entry id. |
public String getSummaryEntryId() | 获取摘要条目标识。 Returns the summary entry id. |
构造器详情Constructor Detail
CompactionEntry
public CompactionEntry(String id, String parentId, Instant timestamp, String firstKeptEntryId, String summaryEntryId)
初始化 CompactionEntry 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
parentId | String | 父级标识(类型 `String`)。The parent id. |
timestamp | Instant | 时间戳(类型 `Instant`)。The timestamp. |
firstKeptEntryId | String | 第一个 Kept 条目标识(类型 `String`)。The first kept entry id. |
summaryEntryId | String | 摘要条目标识(类型 `String`)。The summary entry id. |
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:260–270方法详情Method Detail
getFirstKeptEntryId
public String getFirstKeptEntryId()
获取 getFirstKeptEntryId。
Returns the first kept entry id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:272–274getSummaryEntryId
public String getSummaryEntryId()
获取摘要条目标识。
Returns the summary entry id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:276–278