agent_capability Plugin
Agent Memory
> Agent memory ships as the `agent_memory` plugin (enabled by default). It is > the registered `memory_store` provider, so disabling it removes the memory > tools, the Memories settings page, and the memory section of agent prompts — > see the "Plugin lifecycle" section of `plugins.md`. Existing rows are untouched by disabling; removing them is > `bin/rails 'plugin:purge[agent_memory]'`. Every `AgentMemory::Entry` create/update/delete has always been recorded to the append-only `AgentMemory::AuditEvent` table (`before_content`/`after_content`/`kind`/`confidence`, actor, event type) via `AgentMemory::Entry#emit_created_audit_event` / `#emit_updated_audit_event` / `#emit_deleted_audit_event`. This feature surfaces that trail and soft-deleted memories to operators and admins.
Memory Audit History
Agent memory ships as the
agent_memoryplugin (enabled by default). It is the registeredmemory_storeprovider, so disabling it removes the memory tools, the Memories settings page, and the memory section of agent prompts — see the "Plugin lifecycle" section ofplugins.md. Existing rows are untouched by disabling; removing them isbin/rails 'plugin:purge[agent_memory]'.
Every AgentMemory::Entry create/update/delete has always been recorded to the append-only AgentMemory::AuditEvent table (before_content/after_content/kind/confidence, actor, event type) via AgentMemory::Entry#emit_created_audit_event / #emit_updated_audit_event / #emit_deleted_audit_event. This feature surfaces that trail and soft-deleted memories to operators and admins.
Backend
GET /api/v1/app/memories/:id/audit_events— returns up to 50 audit events,
oldest first within the page, including memories that have since been soft-deleted. When older events remain, next_cursor can be sent back as the before parameter to retrieve the next page. Admin-or-owner scoped, same permission model as the rest of Api::V1::App::MemoriesController (find_memory_for_owner_or_admin).
GET /api/v1/app/memories?deleted=true— lists soft-deleted memories instead
of active ones. Same admin-or-own visibility scoping as the normal listing; the response's top-level deleted boolean reflects which view was served.
GET /api/v1/app/memories/metadatareturns the reusable kinds, scopes,
repositories, and filter schema separately so page and filter requests only transfer changing row data.
- The memory index payload includes a
changedboolean per row — true when the
memory's update timestamp differs from its creation timestamp.
Frontend
The Memories settings panel (plugins/agent_memory/app/frontend/routes/Memories.tsx) shows a "Changed" badge on rows with audit history beyond creation; clicking it (or the row's "History" action) opens a modal listing each audit event's before/after content, kind, confidence, actor, and timestamp, with older events loaded on demand. A "View deleted" / "View active" toggle switches the table between the normal listing and the soft-deleted-memories view (which shows who deleted each memory and when, and hides edit/publish/delete actions).
Admin chat MCP tool
Admin chat agents can call admin_read_memory_audit_history(memory_id) to read the same audit trail for any memory, including soft-deleted ones — useful for diagnosing why a memory's content changed or was removed. Registered admin_only: true in McpToolRegistry, so it is available to any chat where the signed-in user is an admin.
Chat memory preflight
AgentMemory::Store.chat_instructions (the plugin's memory_store provider) requires a procedural preflight before consequential chat actions: drafting or submitting a Job/Epic proposal, scheduling unattended work, changing priority or dependencies, requesting an administrative repair, or any other consequential mutation. The agent must list visible user_pref memories (limit: 100), search memories with terms from the action and its subject, read any truncated match, and apply what it finds before choosing tool arguments. If the memory tools fail, the agent reports that the preflight could not be completed and skips the mutation.
It is procedural rather than classifier-based on purpose: the agent's own judgment that prior context "seems relevant" is exactly what failed (an operator-owned priority preference existed but was never queried), and a classifier, new memory kinds, applicability tags, or a two-phase tool protocol would add machinery with the same blind spot. Ordinary read-only answers stay lightweight and need no search. The guidance lives in the plugin: with Agent Memory disabled, chat prompts carry no memory section or memory-tool requirement, and coworker chats keep their own workspace-memory instructions.
Portable memory backups
Portable memory backups move one user's durable memories between compatible memory-store providers. A provider may support export, import, purge, or none of those operations independently; availability must be checked before use.
The syrus.memory-backup version 1 format is a streaming JSONL envelope. It contains a header, portable records, and a footer with record count, byte count, and a SHA-256 checksum. Import validates the complete stream, supported version, schema, checksum, and configured count/size limits before any mutation. A dry-run follows the same validation and conflict-resolution path without writing records. Import conflict policy is explicit: skip, overwrite, or fail. Results separately report created, skipped, conflicted, transformed, and failed records.
The Memories settings page identifies the active provider and exposes only the operations it declares. An uploaded backup must pass validation and a dry-run preview before the confirmation action becomes available. Providers without export or import support remain visible with an explanation rather than presenting a control that will fail later.
User offboarding records a durable purge operation for stores that declare per-user purge. Cleanup runs asynchronously on the cleanup queue, records every attempt and failure, and blocks final user deletion until it completes. An administrator may explicitly override an unresolved operation with a required, audited reason. Repeated cleanup attempts are safe; the native Agent Memory store removes the user's entries locally.
Portable records contain a stable portable UUID, kind, scope, repository owner/name reference where applicable, content, visibility, confidence, timestamps, and non-secret provenance. Providers may preserve lossless private metadata in a namespaced object. The default export excludes credentials, local database identifiers, audit rows, deleted records, and provider-private data that was not deliberately namespaced.
This format is not a Local Backups artifact. Local Backups captures a complete installation recovery point, including authoritative databases and referenced objects. A portable memory backup restores only memories for one user and cannot recover a Syrus installation.