EXAMPLES.md
# recall worked examples
## 1. Hit on a past decision
User: "Did we ever decide how to cache sessions?"
Invocation:
```json
memory_smart_search { "query": "session caching decision", "limit": 10 }
```
Response:
```json
{
"results": [
{ "sessionId": "7f3a9c21", "type": "decision", "title": "Drop Redis for iii state store",
"narrative": "We decided to drop Redis and use the iii-engine state store for session caching.",
"importance": 8 }
]
}
```
Present:
> Yes. In session `7f3a9c21` you decided to drop Redis and use the iii-engine
> state store for session caching (importance 8).
## 2. Multiple results across sessions
User: "Recall anything about the rate limiter."
Invocation:
```json
memory_smart_search { "query": "rate limiter", "limit": 10 }
```
Response:
```json
{
"results": [
{ "sessionId": "b21d004e", "type": "code", "title": "limit.ts counts per-IP",
"narrative": "Rate limiter counts per-IP, not per-user.", "importance": 6 },
{ "sessionId": "c98f1100", "type": "conversation", "title": "Discussed sliding window",
"narrative": "Considered a sliding-window limiter, deferred.", "importance": 4 }
]
}
```
Present them grouped by session, leading with the per-IP code note.
## 3. No results
User: "Recall the GraphQL schema migration."
Invocation:
```json
memory_smart_search { "query": "graphql schema migration", "limit": 10 }
```
Response:
```json
{ "results": [] }
```
Present:
> No memories matched that. Try `schema change`, `graphql`, or `migration` as
> narrower terms, or `recap this week` to scan recent sessions.
SKILL.md
---
name: recall
description: Search agentmemory for past observations, sessions, and learnings about a topic using hybrid BM25 plus vector plus graph search. Use when the user says "recall", "what did we do about", "did we ever", "have we seen", or needs context from past sessions.
argument-hint: "[search query]"
user-invocable: true
---
The user wants to recall past context about: $ARGUMENTS
## Quick start
```json
memory_smart_search { "query": "jwt refresh token rotation", "limit": 10 }
```
Expected output:
```text
2 results across 2 sessions.
[importance 8] decision · "Rotate refresh tokens on every use" (session 7f3a9c21)
[importance 5] code · "limit.ts counts per-IP" (session b21d004e)
```
## Why
Only surface what the tool returned. Never fabricate an observation, a session
id, or an importance score. If nothing comes back, say so.
## Workflow
1. Call `memory_smart_search` with the user's text as `query` and `limit: 10`.
Pass `project` when the user scopes to a specific repo.
2. Group results by session. Records carry a provenance channel (`user`, `agent`,
`tool`, `import`, `shared`); when results conflict, prefer `user` over `agent`
inference, and flag `shared` records as another teammate's write.
3. For each observation show its type, title, and narrative.
4. Lead with the high-signal observations (importance >= 7).
5. If zero results, suggest 2-3 alternative search terms and stop. Do not guess.
## Anti-patterns
WRONG: results are empty, so you write "We probably discussed token expiry last
week" from assumption.
RIGHT: "No memories matched that query. Try `refresh token`, `session expiry`,
or `auth rotation`."
## Checklist
- Every observation shown came from the tool response.
- Results grouped by session, high-importance first.
- Empty results trigger alternative-term suggestions, not invention.
- No session id or score was paraphrased or rounded.
## See also
- `remember`: the write side; recall retrieves what it stores.
- `recap`, `handoff`, `session-history`: session-scoped views of the same data.
- `memory-discipline`: when to run this search unprompted.
## Troubleshooting
See ../_shared/TROUBLESHOOTING.md if `memory_smart_search` is not available.