Skip to content

Add scheduled memory maintenance - #1

Merged
jackysp merged 1 commit into
mainfrom
agent/memory-maintenance
Aug 17, 2026
Merged

Add scheduled memory maintenance#1
jackysp merged 1 commit into
mainfrom
agent/memory-maintenance

Conversation

@jackysp

@jackysp jackysp commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What changed

  • add bounded memory_list keyset pagination with tenant/namespace-bound cursors
  • add an explicit per-tenant memory-maintenance preset
  • install a memory-only maintainer agent and a disabled-by-default weekly schedule
  • document the API, architecture, security boundary, and reliability evidence

Why

Scheduled runs could not reliably enumerate a namespace, so they could not audit, deduplicate, or conservatively maintain all durable memory while staying inside the existing run/tool/schedule/trace model.

Impact

Operators can install the preset explicitly, review its resources, and enable the schedule when desired. Installation alone creates no LLM calls or memory mutations.

Validation

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets
  • cargo test --workspace (50 passed, 1 ignored)
  • cargo clippy --workspace --all-targets -- -D warnings

Copilot AI lite review requested due to automatic review settings August 17, 2026 12:52
@jackysp
jackysp merged commit f7c6370 into main Aug 17, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class, scheduled memory maintenance by introducing a stable memory_list enumeration tool (with tenant/namespace-bound cursors) and an operator-installed preset that creates a memory-only maintainer agent plus a disabled-by-default weekly schedule. This fits the existing run/tool/schedule/trace model by making maintenance run through the same queued-run pipeline rather than adding a background worker.

Changes:

  • Add bounded, keyset-paginated memory_list with tenant/namespace-bound cursors and supporting store API + tests.
  • Add a per-tenant memory-maintenance preset endpoint that installs a memory-only agent and a disabled weekly schedule, plus server-side tests.
  • Update documentation and changelog to cover the new tool, preset API, and reliability/threat-model evidence.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Documents memory_list and the memory-maintenance preset behavior.
docs/threat-model.md Adds threat-model notes for bounded listing + preset isolation.
docs/reliability.md Adds reliability claims and references to new tests for listing + preset.
docs/http-api.md Documents the new preset endpoint and memory_list tool semantics.
docs/architecture.md Describes enumeration and scheduled maintenance in the existing run loop.
crates/agentd-store/src/lib.rs Implements keyset pagination for memory listing and adds store tests.
crates/agentd-server/src/server.rs Wires the new preset route and adds an integration test.
crates/agentd-server/src/handlers/presets.rs Implements the preset installer for agent + schedule resources.
crates/agentd-server/src/handlers/mod.rs Exposes the new presets handler module.
crates/agentd-core/src/runtime.rs Extends runtime tracing test to include memory_list tool events.
crates/agentd-core/src/lib.rs Registers memory_list in the capability dispatch.
crates/agentd-core/src/handlers/memory.rs Implements cursor encoding/decoding and the memory_list tool handler.
crates/agentd-api/src/builtin_catalog.rs Adds memory_list to the builtin tool catalog and updates catalog tests.
CHANGELOG.md Adds release notes for memory_list and the maintenance preset.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

tenant,
namespace,
after_id.as_deref(),
params.get("limit").and_then(Value::as_u64).unwrap_or(50) as usize,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants