spillwavesolutions/agent-memory/memory-query
- community
Checking that the SKILL.md file is still in the repository.
Query past conversations from the agent-memory system. Use when asked to "recall what we discussed", "search conversation history", "find previous session", "what did we talk about last week", or "get context from earlier". Provides tier-aware retrieval with automatic fallback chains, intent-based routing, and full explainability. Includes command-equivalent instructions for search, recent, and context operations.
Install
npx vskill@latest install spillwavesolutions/agent-memory/memory-querySKILL.md
Memory Query Skill
Query past conversations using intelligent tier-based retrieval with automatic fallback chains and query intent classification.
When Not to Use
- Current session context (already in memory)
- Real-time conversation (skill queries historical data only)
- Cross-project search (memory stores are per-project)
Quick Commands
Codex CLI uses skills for contextual assistance. Each command below provides the same functionality as the /memory-search, /memory-recent, and /memory-context commands available in other adapters.
Search Memories
Search conversation history by topic or keyword. Equivalent to /memory-search.
Usage:
Arguments:
| Argument | Required | Description | |
|---|---|---|---|
<query> | Yes | Topic, keywords, or natural language query | |
--top-k | No | Number of results (default: 10) | |
--agent | No | Filter by agent (e.g., codex, claude, opencode) | |
--target | No | Filter: all, toc, grip |
Example workflow:
Output format:
Recent Memories
Browse recent conversation summaries. Equivalent to /memory-recent.
Usage:
Arguments:
| Argument | Required | Description | |
|---|---|---|---|
--days | No | How many days back to look (navigate TOC accordingly) | |
--period | No | Time period to browse (e.g., 2026-W06, 2026-02) | |
--limit | No | Maximum results per level (default: 10) |
Example workflow:
Output format:
Expand Context
Retrieve full conversation context around a specific excerpt. Equivalent to /memory-context.
Usage:
Arguments:
| Argument | Required | Description | |
|---|---|---|---|
<grip_id> | Yes | Grip identifier (format: grip:{timestamp}:{ulid}) | |
--before | No | Events before excerpt (default: 2) | |
--after | No | Events after excerpt (default: 2) |
Example workflow:
Output format:
Error Handling
| Error | Cause | Resolution | |
|---|---|---|---|
| Connection refused | Daemon not running | Run memory-daemon start | |
| No results found | Query too narrow or no matching data | Broaden search terms, check different time period | |
| Invalid grip ID | Malformed grip format | Verify format: grip:{13-digit-ms}:{26-char-ulid} | |
| Tier 5 only | No search indices built | Wait for index build or run memory-daemon teleport rebuild --force | |
| Agent filter no results | No events from specified agent | Try without --agent filter or check agent name |
Prerequisites
Validation Checklist
Before presenting results:
- [ ] Daemon running:
memory-daemon statusreturns "running" - [ ] Retrieval tier detected:
retrieval statusshows tier and layers - [ ] TOC populated:
rootcommand returns year nodes - [ ] Query returns results: Check for non-empty
bulletsarrays - [ ] Grip IDs valid: Format matches
grip:{13-digit-ms}:{26-char-ulid}
Retrieval Tiers
The system automatically detects available capability tiers:
| Tier | Name | Available Layers | Best For | |
|---|---|---|---|---|
| 1 | Full | Topics + Hybrid + Agentic | Semantic exploration, topic discovery | |
| 2 | Hybrid | BM25 + Vector + Agentic | Balanced keyword + semantic | |
| 3 | Semantic | Vector + Agentic | Conceptual similarity search | |
| 4 | Keyword | BM25 + Agentic | Exact term matching | |
| 5 | Agentic | TOC navigation only | Always works (no indices) |
Check current tier:
Query Intent Classification
Queries are automatically classified by intent for optimal routing:
| Intent | Characteristics | Strategy | |
|---|---|---|---|
| Explore | "browse", "what topics", "discover" | Topics-first, broad search | |
| Answer | "what did", "how did", "find" | Precision-focused, hybrid | |
| Locate | Specific identifiers, exact phrases | BM25-first, keyword match | |
| Time-boxed | "yesterday", "last week", date refs | TOC navigation + filters |
The classifier extracts time constraints automatically:
Fallback Chains
The system automatically falls back when layers are unavailable:
Fallback triggers:
- Layer returns no results
- Layer timeout exceeded
- Layer health check failed
Explainability
Every query result includes an explanation:
Display to user:
TOC Navigation
Hierarchical time-based structure:
Node ID formats:
toc:year:2026toc:month:2026-01toc:week:2026-W04toc:day:2026-01-30
Intelligent Search
The retrieval system routes queries through optimal layers based on intent and tier.
Intent-Driven Workflow
- Classify intent - System determines query type:
``bash memory-daemon retrieval classify "What JWT discussions happened last week?" # Intent: Answer, Time: last week, Keywords: [JWT] ``
- Route through optimal layers - Automatic tier detection:
``bash memory-daemon retrieval route "JWT authentication" # Tier: 2 (Hybrid), Method: bm25_then_vector ``
- Execute with fallbacks - Automatic failover:
``bash memory-daemon teleport search "JWT authentication" --top-k 10 # Falls back to agentic if indices unavailable ``
- Expand grip for verification:
``bash memory-daemon query expand --grip-id "grip:..." --before 3 --after 3 ``
Teleport Search (BM25 + Vector)
For Tier 1-4, use teleport commands for fast index-based search:
Topic-Based Discovery (Tier 1 only)
When topics are available, explore conceptually:
Search Command Reference
Agent Navigation Loop
When answering "find discussions about X":
- Check retrieval capabilities:
``bash memory-daemon retrieval status # Returns: Tier 2 (Hybrid) - BM25 + Vector available ``
- Classify query intent:
``bash memory-daemon retrieval classify "What JWT discussions happened last week?" # Intent: Answer, Time: 2026-W04, Keywords: [JWT] ``
- Route through optimal layers:
- Tier 1-4: Use teleport for fast results
- Tier 5: Fall back to agentic TOC navigation
- Execute with stop conditions:
max_depth: How deep to drill (default: 3)max_nodes: Max nodes to visit (default: 50)timeout_ms: Query timeout (default: 5000)
- Return results with explainability:
`` Method: Hybrid (BM25 + Vector reranking) Time filter: 2026-W04 Layers: bm25 -> vector ``
Example with tier-aware routing:
Agentic Fallback (Tier 5)
When indices are unavailable:
CLI Reference
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingadapters/codex-cli/.codex/skills/memory-query/SKILL.md
Popularity
- Repository stars
- 14
- Repository forks
- 3
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/spillwavesolutions/agent-memory/memory-query)