Skip to content

Add reflection budget and cron guardrails #337

Description

@dplush

Problem

Automatic reflection / consolidation can be useful in interactive sessions, but it is risky for scheduled jobs and other high-frequency automation.

Cron-style workflows often produce repetitive, low-value context: daily briefs, watchdog output, status pings, market scans, etc. If those runs trigger expensive reflection calls or write noisy memories, users pay extra and the memory store slowly drifts toward summaries of routine automation.

Proposal

Add an explicit reflection budget / guardrail layer.

Example config:

reflect:
  max_calls_per_session: 3
  max_calls_per_day: 20
  disabled_for_cron: true
  min_turns_before_reflect: 5
  cost_budget_usd: 0.05

Or under the Hermes integration namespace if that is a better fit:

memory:
  mnemosyne:
    reflect:
      disabled_for_cron: true
      max_calls_per_session: 3

When reflection is skipped, return a structured reason instead of silently doing nothing:

{
  "status": "skipped",
  "reason": "reflect_disabled_for_cron"
}

Other useful skip reasons:

  • reflect_budget_exhausted
  • min_turns_not_reached
  • low_value_automation_context
  • cost_budget_exhausted

Why this helps

This keeps memory useful and predictable. Interactive sessions can still benefit from reflection, while cron/watchdog/briefing jobs stay cheap and do not flood memory with routine output.

It also gives operators a clear knob for production setups: memory quality first, cost second, no surprise background reflection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions