docs: surface soft-delete and demote patterns via update_episode#22
Merged
mikejgray merged 1 commit intoOscillateLabsLLC:mainfrom Apr 13, 2026
Merged
Conversation
Agents can already expire episodes via update_episode but the current description doesn't mention this cleanup use case. Documents the two agent-safe patterns: soft-delete via expired_at (reversible) and demote via deprecated tag (visible but filterable). No behavior changes, only description text.
mikejgray
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agents can already expire episodes via
update_episodebut the current description — "Update metadata, tags, or expiration of an episode" — doesn't hint at the cleanup use case. This documents the two agent-safe patterns:expired_atpast timestamp (reversible — clearexpired_atto restore)deprecatedtag (visible but filterable at query time)Follows the "no delete_episode MCP tool" design from #16/#18 — permanent deletion remains a deliberate human action outside the agent's toolkit.
Changes (docs only, no behavior changes)
internal/mcp/server.go:update_episodetool description and itstags/expired_atproperty descriptions now mention soft-delete and demote use casesinternal/api/openapi.go: PUT/api/v1/memory/episodes/{id}description matchesREADME.md: new "Cleanup Patterns" section with MCP examples for soft-delete, demote, and scheduled expirationTest plan
go build ./...— compilesjust test— all existing tests pass (no test changes needed, docs-only)/openapi.jsonreflects the new descriptionupdate_episodewith pastexpired_athides the episode from default search and listing (both REST and MCP)