跳到正文
Skillpedia
智能体18k · #10645

latent-briefing

它能做什么

这个技能说明主 AI 智能体如何通过在模型缓存中压缩已积累的推理,与工作智能体共享这些推理,而不必重新发送长文本。适合令牌成本迅速攀升的多智能体系统构建者。

适用场景

  • ✓当主智能体冗长的推理使每次工作智能体调用都很昂贵时。
  • ✓当你希望工作智能体看到之前的推理,而摘要又会丢失细节时。
  • ✓当你在比较共享记忆方法与摘要或检索,用于智能体之间的交接时。

技能链接

https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/latent-briefing/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/latent-briefing/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的编排智能体把完整历史发送给每个工作智能体,成本非常高。请告诉我一种更便宜的上下文共享方法。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能描述如何缩减主智能体保存的推理,使每个工作智能体只保留与其当前子任务相关的部分。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Latent Briefing and KV Cache Memory Sharing

Hierarchical multi-agent systems often pay for the same context twice. The orchestrator accumulates a long reasoning trajectory, but each worker usually receives only a narrow text handoff such as a subtask prompt plus raw document slices. Passing the full trajectory fixes coverage but drives token cost up on every worker call. Summarization introduces latency and information loss. Retrieval helps with document access but does not preserve the orchestrator's evolving reasoning state.

Latent Briefing addresses this by sharing memory at the representation level rather than the text level. The core idea is to compact the orchestrator trajectory in the worker model's KV cache, keeping positions that are most relevant to the current worker task. The method builds on Attention Matching (AM) KV cache compaction and adapts it for inference-time multi-agent handoff with task-guided queries, a shared token mask across heads, and robust thresholding.

When to Activate

Activate this skill when:

  • Designing orchestrator-worker or supervisor-specialist systems where workers need access to prior orchestrator state without replaying the full trajectory as text
  • Evaluating alternatives to LLM summarization or RAG for cross-agent state transfer
  • Implementing or studying KV cache compaction as a first-class inference primitive, not only prefix caching of identical prompts
  • Debugging token explosion in recursive, hierarchical, or tool-heavy agent graphs
  • Interpreting benchmarks that report worker-token savings, total-token savings, compaction overhead, and accuracy together

Do not activate this skill for adjacent work owned by other skills:

  • API-only stacks where internal KV tensors are inaccessible: use context-compression, memory-systems, or multi-agent-patterns.
  • Ordinary persistent memory, entity tracking, or graph retrieval: memory-systems.
  • General multi-agent topology without representation-level state sharing: multi-agent-patterns.
  • Prefix caching, masking, or budget policy that does not transform KV state: context-optimization.

Core Concepts

The token explosion pattern. In recursive or REPL-style systems, the orchestrator repeatedly calls a worker to inspect evidence, verify hypotheses, or answer subquestions. The orchestrator's trajectory grows with partial conclusions, dead ends, tool output, and prior worker responses. If that trajectory is passed in full on every worker call, cost compounds quickly.

Representation-level sharing. Instead of summarizing the trajectory into natural language, the system operates on the worker model's KV cache. It retains the positions that the worker would attend to for the current task and drops the rest. This is more specific than ordinary prefix caching: prefix caching reuses identical prefixes, while Latent Briefing also performs task-conditioned selective retention inside the reused trajectory.

Attention Matching as the compaction engine. AM seeks a smaller cache whose attention outputs approximate the full cache. Latent Briefing adapts AM for multi-agent inference by changing the scoring signal and batching strategy:

  1. Use task-guided query vectors derived from the current worker prompt.
  2. Aggregate scores into a shared global mask instead of per-head independent subsets.
  3. Use a robust threshold such as median + tau * MAD rather than fixed top-k per head.

Reference result shape. The public write-up reports substantial worker-token reduction, material total-token savings, and low-single-digit-second compaction overhead on long-document QA workloads (claim-latent-briefing-public-results). Treat these numbers as workload-specific evidence, not a general guarantee.

Detailed Topics

Why Text-Only Mitigations Fall Short

Approach Primary weakness
LLM summarization High latency, lossy abstraction, and no guarantee the summary preserves what the next subtask needs
Retrieval / RAG Depends on chunking and embeddings; can miss cross-chunk or cross-step dependencies
Pass full trajectory Cost scales with every worker call and irrelevant context can degrade worker quality

Latent Briefing is useful when the bottleneck is not document retrieval itself, but how to transfer orchestrator state into a worker efficiently and precisely.

Recursive Orchestrator-Worker Shape

Frameworks such as **Recursive

常见问题

什么是 KV 缓存压缩?

它缩小模型为之前文本保存的记忆,因此需要重新处理或重新发送的内容更少。

它与摘要有何不同?

摘要是以文本形式写成的,可能丢失细节;而这种方法在模型层面保留相关部分。

这种方法适用于哪里?

该技能将其描述为适用于可以访问模型缓存的受控运行环境,而不是一种普通的文本提示技巧。

详情

作者的原始描述

This skill should be used when the user asks to \"share memory between agents\", \"KV cache compaction for multi-agent\", \"orchestrator worker context\", \"latent briefing\", \"reduce worker tokens\", \"cross-agent memory without summarization\", or discusses Attention Matching compaction, recursive language models with workers, or token explosion in hierarchical agents.

repo: muratcankoylan/Agent-Skills-for-Context-Engineering

热度

GitHub 星标
18k
排名
#10645
许可证
MIT
更新时间
2026/10/11

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能