Skip to content

Migrate DailyMemoryTask to Agents API memory compaction contract #1707

@chubes4

Description

@chubes4

Problem

DailyMemoryTask currently owns prompt construction, parsing, conservation checks, and deterministic overflow behavior directly. Agents API now has conversation compaction and should grow generic memory compaction primitives. Once those land, Data Machine should consume the substrate instead of carrying bespoke compaction mechanics.

Goal

Migrate Daily Memory compaction to the Agents API generic memory/markdown compaction contract when available.

Scope

  • Keep Data Machine responsible for:
    • reading/writing MEMORY.md
    • writing daily archive files
    • scheduling system tasks
    • selecting provider/model via existing settings
    • calling Data Machine RequestBuilder or other runtime as summarizer
  • Move/reuse from Agents API:
    • item normalization
    • markdown section boundaries
    • conservation metadata/checks
    • lifecycle events
    • deterministic overflow strategy

Acceptance Criteria

  • DailyMemoryTask delegates compaction planning/transformation to Agents API primitives.
  • Existing normal AI compaction behavior remains functionally equivalent.
  • Existing overflow behavior remains fail-safe and preserves archived content verbatim.
  • Tests cover moderate memory compaction, conservation failure, and runaway overflow.

Dependencies

  • Automattic/agents-api generic compaction item contract.
  • Automattic/agents-api conservation metadata/checks.
  • Automattic/agents-api deterministic overflow strategy.
  • Automattic/agents-api markdown-section adapter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions