ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

context-aware-delegation

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.

Why use this skill?

Learn to use context-aware-delegation in OpenClaw to give sub-agents full conversation history. Reduce AI costs while maintaining deep, context-rich task execution.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/rgba-research/context-aware-delegation
Or

What This Skill Does

The context-aware-delegation skill, often referred to as "SmartBeat," is an architectural pattern designed to optimize AI agent performance and cost. It solves the critical problem where isolated processes—such as cron jobs, sub-agents, or event listeners—lack the conversational history of your primary session. By leveraging the sessions_history function, this skill allows lightweight, low-cost models like Haiku to operate with the deep, complex context usually reserved for expensive flagship models like Sonnet. You no longer have to choose between cost-efficiency and intelligence; this skill bridges the gap, allowing background tasks to remain as aware and personalized as your live interaction.

Installation

To install this skill, use the clawhub command line interface:

clawhub install openclaw/skills/skills/rgba-research/context-aware-delegation

Ensure that your environment has proper permissions to access session histories, particularly when dealing with cross-session requests to your primary agent session keys.

Use Cases

  1. Automated Reporting: Generate comprehensive daily summaries or status reports that synthesize overnight task results with the most recent human-agent conversation context.
  2. Smart Sub-Agents: Spawn sub-processes to execute technical research or code generation tasks that require specific project requirements defined in your main conversation flow.
  3. Event-Driven Intelligence: Create reactive handlers for incoming emails or messages that check if the sender's request aligns with ongoing projects previously discussed in your main session.
  4. Periodic Monitoring: Use cron jobs to monitor specific datasets or API outputs, cross-referencing findings against your active, high-priority project goals.

Example Prompts

  1. "Run a morning report at 8 AM. Use the last 50 messages from my main session history to identify pending tasks and summarize what we achieved yesterday."
  2. "Spawn a background task to draft a product page for the current project. Make sure it queries my main session history first to pull the specific user requirements we discussed."
  3. "Check for urgent emails every two hours. If an email arrives, cross-reference it with my current project priorities from our last few conversations and let me know if I need to act."

Tips & Limitations

  • Session Keys: Always ensure you are using the correct session key. You can find yours by running sessions_list(limit=10).
  • Token Limits: While sessions_history provides context, keep your limit parameters reasonable to maintain latency benefits and prevent the Haiku model from becoming overwhelmed by long historical logs.
  • Cost Efficiency: This pattern is explicitly designed to reduce costs. Use Haiku for these delegated tasks, as it is perfectly capable of synthesizing history when provided via this skill, significantly reducing your bill compared to running similar logic in a Sonnet-based session.
  • Security: Be mindful when delegating tasks across different session scopes; ensure that sensitive information in historical logs is only accessible to sub-agents you trust with that context.

Metadata

Stars1171
Views0
Updated2026-02-19
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-rgba-research-context-aware-delegation": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#context-aware#delegation#ai-optimization#automation#cost-reduction
Safety Score: 4/5

Flags: file-read, external-api