Skip to content

Comments

Add CLI search and delete commands#155

Merged
abrookins merged 1 commit intomainfrom
feature/cli-search-delete-commands
Feb 20, 2026
Merged

Add CLI search and delete commands#155
abrookins merged 1 commit intomainfrom
feature/cli-search-delete-commands

Conversation

@abrookins
Copy link
Collaborator

Summary

Adds CLI commands for searching and deleting long-term memories, plus supporting functions.

New CLI Commands

agent-memory search

Search long-term memories with semantic similarity and filters:

agent-memory search "What did we discuss about authentication?"
agent-memory search "project deadlines" --namespace myapp --limit 5
agent-memory search --namespace myapp  # List all memories in namespace
agent-memory search -u user123 --format json

agent-memory delete

Delete memories by ID with confirmation prompts:

agent-memory delete --ids mem1,mem2,mem3
agent-memory delete --ids mem1 --yes  # Skip confirmation
agent-memory delete --ids mem1 --dry-run  # Preview only
agent-memory delete --empty-text  # Delete memories with empty text
agent-memory delete --invalid  # Delete malformed memories

agent-memory delete-session

Delete working memory sessions:

agent-memory delete-session --id session123
agent-memory delete-session --id session123 --namespace myapp

Changes

  • cli.py: Added search, delete, and delete-session commands
  • long_term_memory.py: Added delete_invalid_memories() and find_memories_with_empty_text() functions
  • Full test coverage for new CLI commands and functions

Copy link

@vishal-bala vishal-bala left a comment

Choose a reason for hiding this comment

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

LGTM 👍
(reviewed the CLI changes, but just skimmed the tests)

@abrookins abrookins merged commit 6f683b7 into main Feb 20, 2026
21 checks passed
@abrookins abrookins deleted the feature/cli-search-delete-commands branch February 20, 2026 18:43
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