Skip to content

[Feature]: Lightweight context mode for heartbeat/cron tasks (cost saving addition) #7957

@REPTILEHAUS

Description

@REPTILEHAUS

Summary

Heartbeats and cron jobs currently receive the full agent context (AGENTS.md, SOUL.md, USER.md, TOOLS.md, IDENTITY.md, etc.). For simple automated tasks, this is unnecessary overhead that:

  • Burns tokens on context that won't be used
  • Makes local/small models unusable (they truncate and hallucinate)
  • Slows down simple checks

Proposed solution

Add a lightContext: true option for heartbeat and cron configurations that only injects:

  • The task prompt itself (heartbeat prompt or cron event text)
  • HEARTBEAT.md (for heartbeats)
  • Minimal identity (agent name, basic capabilities)
  • Tool definitions

Skip: SOUL.md, USER.md, IDENTITY.md, full AGENTS.md, TOOLS.md

Example config

{
  agents: {
    defaults: {
      heartbeat: {
        every: "30m",
        lightContext: true  // <-- new option
      }
    }
  }
}

Use case

Running heartbeats on a local 0.5B model (Ollama qwen2.5:0.5b). The full context is ~11k tokens, model truncates to 4k, produces garbage. With light context, small models become viable for simple periodic checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions