Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

context-aware-delegation上下文感知委托

Agent Skill

context-aware-delegation 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

28,105

周安装

1,126

GitHub Stars

公开资料未说明

下载量

9,098
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:context-aware-delegation(上下文感知委托)
来源仓库:https://github.com/rgba-research/context-aware-delegation
安装命令:
openclaw skills install context-aware-delegation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install context-aware-delegation

简介

为子代理或定时任务提供完整对话上下文。

  • 适用于多会话协作与后台作业场景。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 自动注入历史记录,保持任务连续性。
  • 需注意上下文大小限制,避免超出模型处理能力。
  • context-aware-delegation 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
context-aware-delegation
description
Give isolated sessions (cron jobs, sub-agents, event handlers) full conversation context from your main session using sessions_history. Run cheap background tasks (Haiku) with expensive context (Sonnet-level awareness) — best of both worlds.
homepage
https://gitlab.com/rgba_research/context-aware-delegation
author
RGBA Research
metadata

Context-Aware Delegation

(aka "SmartBeat")

Problem: Isolated sessions (cron jobs, sub-agents) can't see your main session conversation history. They're cheap (use Haiku) but blind to context.

Solution: Use sessions_history to give isolated sessions full awareness of what happened in your main chat — at a fraction of the cost of running everything in main session.

Quick Start

Morning Report Example

You want a daily report that includes "what we accomplished last night" — but running that in main session with Sonnet costs ~$0.30/report. Using an isolated session with Haiku costs ~$0.03, but can't see conversation history.

Solution: Isolated session queries main session history first.

// Inside your cron payload.message:
"1. Query main session history: sessions_history('agent:main:telegram:direct:{userId}', limit=50)
2. Read memory files: memory/YYYY-MM-DD.md
3. Fetch weather for Austin 78721
4. Generate report combining:
   - Recent conversation highlights
   - Memory file summaries
   - Current conditions
5. Send via Telegram + email"

Cost: ~$0.03 with Haiku (10x cheaper than Sonnet main session) Context: Full awareness of overnight work

Pattern Overview

1. Identify Main Session Key

# List sessions to find main
sessions_list(limit=10)
# Typical main session key format:
# agent:main:telegram:direct:{userId}
# agent:main:main

2. Query History from Isolated Session

// In cron job, sub-agent, or event handler:
sessions_history({
  sessionKey: "agent:main:telegram:direct:8264585335",
  limit: 50  // Last 50 messages
})

Returns conversation history even though you're in an isolated session.

3. Use Context + Execute Task

Your isolated session now has:

  • ✅ Conversation history (what was discussed)
  • ✅ Memory files (persistent notes)
  • ✅ Cheap model (Haiku)
  • ✅ Full tool access

Use Cases

Cron Jobs with Context

Morning reports:

Schedule: 8 AM daily
Model: Haiku (~$0.03/run)
Task: Read overnight work, check email, send summary
Context: Last 50 messages from main session

End-of-day summaries:

Schedule: 9 PM daily
Model: Haiku
Task: What got done today? What's pending?
Context: Today's full conversation

Periodic check-ins:

Schedule: Every 2 hours (9 AM - 9 PM)
Model: Haiku
Task: Anything urgent in email/calendar?
Context: Recent discussion about priorities

Sub-Agent Delegation

Background builds:

sessions_spawn({
  task: "Build the AREF product page based on our discussion",
  model: "haiku",
  // In the task prompt:
  // "First, query main session history to see our conversation about AREF requirements..."
})

Research tasks:

sessions_spawn({
  task: "Research Unreal Engine integration patterns. Reference our earlier discussion about AREF goals.",
  model: "haiku"
})

Event-Driven Handlers

Webhook arrives → isolated session handles it:

// Webhook payload triggers isolated session
// Session logic:
"1. Query main session to see: what did J and I agree about this client?
2. Process webhook based on that context
3. Take action or notify"

Cost Comparison

ApproachModelContextCost/RunWhen to Use
Main sessionSonnetFull~$0.30Complex interactive work
Isolated (blind)HaikuNone~$0.03Simple scheduled tasks
Context-aware delegationHaikuFull~$0.03Background tasks needing context

Savings: ~10x cheaper than main session, with same context awareness.

Implementation Tips

Finding Your Main Session Key

sessions_list({ kinds: ["main"], limit: 5 })
// Or:
sessions_list({ limit: 10 })
// Look for: agent:main:telegram:direct:{yourUserId}

How Much History?

  • 10 messages: Just recent context (~2KB)
  • 50 messages: Last few hours of work (~10KB)
  • 100 messages: Full day or multi-session context (~20KB)

Start with 50, adjust based on needs.

Combining History + Memory

Best results come from:

  1. Sessions history: Recent interactive work
  2. Memory files: Persistent decisions/notes
"1. sessions_history(limit=30) → what we discussed today
2. read memory/2026-02-13.md → decisions logged
3. Combine both sources for complete picture"

Morning Report Recipe

Complete example for daily morning report:

Cron Job Setup:

{
  schedule: { kind: "cron", expr: "0 8 * * *", tz: "America/Chicago" },
  sessionTarget: "isolated",
  payload: {
    kind: "agentTurn",
    model: "haiku",
    message: `Generate morning report:

1. Query main session: sessions_history('agent:main:telegram:direct:8264585335', limit=50)
2. Read yesterday's memory: memory/YYYY-MM-DD.md
3. Get weather: Austin 78721
4. Check email (gog or himalaya)
5. Check calendar events for today

Report format:
📍 WEATHER: [conditions]
🌙 OVERNIGHT: [from session history - what we worked on]
📝 PERSISTENT NOTES: [from memory file]
📧 EMAIL: [urgent only]
📅 CALENDAR: [today's events]
🔗 DASHBOARD: [mission control link]

Send to Telegram using message tool.

Note: Email delivery from isolated sessions requires SMTP credentials or is better handled via main session heartbeats for reliability.`
  },
  delivery: { mode: "announce", to: "8264585335", channel: "telegram" }
}

Cost: ~$0.03/report (~$1/month) Context: Full overnight work awareness Timing: Exact (8 AM every day)

Limitations

History truncation:

  • sessions_history returns limited content (typically last N messages)
  • Very long messages may be truncated
  • For deep archives, rely on memory files

Main session must exist:

  • If main session is brand new (no messages), history is empty
  • Isolated sessions can't create main session history, only read it

Not real-time:

  • History reflects state when queried
  • If main session is actively running, very latest messages might not appear immediately

Best Practices

1. Write good memory summaries Even with session history access, persistent memory files are gold. Don't rely solely on conversation history.

2. Query only what you need limit=10 for quick context, limit=50 for substantial work, limit=100 for deep dives.

3. Chain tools effectively

sessions_history → memory_get → web_search → message

Context first, then action.

4. Use Haiku for delegation, Sonnet for decisions

  • Isolated background work: Haiku
  • Interactive problem-solving: Sonnet
  • Morning reports/summaries: Haiku
  • Architecture discussions: Sonnet

Troubleshooting

"Empty session history"

  • Check session key is correct: sessions_list()
  • Main session might be new (no messages yet)
  • Use limit parameter

"Content truncated"

  • Reduce limit (fewer messages = more complete content)
  • Rely on memory files for archival data

"Isolated session can't send messages"

  • Use message tool, not sessions_send
  • Ensure delivery.mode is set in cron config OR use message tool directly

Related Patterns

  • Heartbeats: Main session periodic checks (full context, main model)
  • Sub-agents: Long-running background tasks
  • Cron jobs: Scheduled isolated work
  • Memory files: Persistent cross-session storage

Credits

Discovered by RGBA Research during OpenClaw optimization work. Published to ClawHub as open pattern for the community.

Contact: https://rgbaresearch.com License: MIT (free to use, adapt, share)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

89.7%
按下载量换算8,161

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills