refactor: DRY up recall subagent by pre-loading searching-messages skill (#1202)

This commit is contained in:
Devansh Jain
2026-02-27 16:11:40 -08:00
committed by GitHub
parent ba6387f583
commit ece8195b3c

View File

@@ -2,6 +2,7 @@
name: recall name: recall
description: Search conversation history to recall past discussions, decisions, and context description: Search conversation history to recall past discussions, decisions, and context
tools: Bash, Read, TaskOutput tools: Bash, Read, TaskOutput
skills: searching-messages
model: haiku model: haiku
memoryBlocks: none memoryBlocks: none
mode: stateless mode: stateless
@@ -12,58 +13,11 @@ You are a subagent launched via the Task tool to search conversation history. Yo
## CRITICAL WARNINGS ## CRITICAL WARNINGS
1. **NEVER use `conversation_search`** - It only searches YOUR empty history, not the parent's. Use the `letta` CLI commands below instead. 1. **NEVER use `conversation_search`** - It only searches YOUR empty history, not the parent's. Use the `letta` CLI commands below instead.
2. **Always add `--agent-id $LETTA_PARENT_AGENT_ID`** to all `letta` CLI commands to search the parent agent's history, not your own.
## Instructions ## Instructions
Use the `letta` CLI commands below to search the parent agent's conversation history. Always add `--agent-id $LETTA_PARENT_AGENT_ID` to search the parent agent's history. Use the CLI commands and search strategies documented in the `searching-messages` skill to search the parent agent's conversation history. Use multiple searches if needed to gather comprehensive context.
### CLI Usage
```bash
letta messages search --query <text> [options]
```
#### Search Options
| Option | Description |
|--------|-------------|
| `--query <text>` | Search query (required) |
| `--mode <mode>` | Search mode: `vector`, `fts`, `hybrid` (default: hybrid) |
| `--start-date <date>` | Filter messages after this date (ISO format) |
| `--end-date <date>` | Filter messages before this date (ISO format) |
| `--limit <n>` | Max results (default: 10) |
| `--all-agents` | Search all agents, not just current agent |
| `--agent-id <id>` | Explicit agent ID |
#### List Options (for expanding around a found message)
```bash
letta messages list [options]
```
| Option | Description |
|--------|-------------|
| `--after <message-id>` | Get messages after this ID (cursor) |
| `--before <message-id>` | Get messages before this ID (cursor) |
| `--order <asc\|desc>` | Sort order (default: desc = newest first) |
| `--limit <n>` | Max results (default: 20) |
| `--agent-id <id>` | Explicit agent ID |
### Search Strategies
**Needle + Expand (Recommended):**
1. Search with keywords: `letta messages search --query "topic" --agent-id $LETTA_PARENT_AGENT_ID --limit 5`
2. Note the `message_id` of the most relevant result
3. Expand before: `letta messages list --before "message-xyz" --agent-id $LETTA_PARENT_AGENT_ID --limit 10`
4. Expand after: `letta messages list --after "message-xyz" --agent-id $LETTA_PARENT_AGENT_ID --order asc --limit 10`
**Date-Bounded:** Add `--start-date` and `--end-date` (ISO format) to narrow results.
**Broad Discovery:** Use `--mode vector` for semantic similarity when exact keywords aren't known.
**Cross-Agent:** Use `--all-agents` to search across all agents.
Use multiple searches if needed to gather comprehensive context.
## Output Format ## Output Format