Skip to main content
Version: latest

agrag.memory.retention.RetentionMemory

RetentionMemory(store:GraphStore, project_id:str, agent_id:str) -> None

Apply retention actions to memory owned by one configured project.

Functions:

  • delete_task – Delete a task and its events and steps, and optionally its decisions.
  • redact_event – Replace an event body while keeping its identity and payload hash.

delete_task​

delete_task(name:str, include_decisions:bool = True, request_id:str | None = None) -> RetentionResult

Delete a task and its events and steps, and optionally its decisions.

Decisions in other tasks that cite deleted events or decisions are directly flagged needs_review. Their ids are returned; no transitive review propagation or queueing is performed here.

redact_event​

redact_event(event_id:str, request_id:str | None = None) -> RetentionResult

Replace an event body while keeping its identity and payload hash.

The event remains in sequence and receives a redacted_at timestamp. A retry with the same request id replays the first result.