searching-messages

2
1
Source

Search past messages to recall context. Use when you need to remember previous discussions, find specific topics mentioned before, pull up context from earlier in the conversation history, or find which agent discussed a topic.

Install

mkdir -p .claude/skills/searching-messages && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6658" && unzip -o skill.zip -d .claude/skills/searching-messages && rm skill.zip

Installs to .claude/skills/searching-messages

About this skill

Searching Messages

This skill helps you search through past conversations to recall context that may have fallen out of your context window.

When to Use This Skill

  • User asks "do you remember when we discussed X?"
  • You need context from an earlier conversation
  • User references something from the past that you don't have in context
  • You want to verify what was said before about a topic
  • You need to find which agent discussed a specific topic (use with finding-agents skill)

CLI Usage

letta messages search --query <text> [options]

Options

OptionDescription
--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-agentsSearch all agents, not just current agent
--agent <id>Explicit agent ID (overrides LETTA_AGENT_ID)
--agent-id <id>Alias for --agent

Search Modes

  • hybrid (default): Combines vector similarity + full-text search with RRF scoring
  • vector: Semantic similarity search (good for conceptual matches)
  • fts: Full-text search (good for exact phrases)

Companion Command: messages list

Use this to expand around a found needle by message ID cursor:

letta messages list [options]
OptionDescription
--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>Explicit agent ID (overrides LETTA_AGENT_ID)
--agent-id <id>Alias for --agent

Search Strategies

Strategy 1: Needle + Expand (Recommended)

Use when you need full conversation context around a specific topic:

  1. Find the needle - Search with keywords to discover relevant messages:

    letta messages search --query "flicker inline approval" --limit 5
    
  2. Note the message_id - Find the most relevant result and copy its message_id

  3. Expand before - Get messages leading up to the needle:

    letta messages list --before "message-xyz" --limit 10
    
  4. Expand after - Get messages following the needle (use --order asc for chronological):

    letta messages list --after "message-xyz" --order asc --limit 10
    

Strategy 2: Date-Bounded Search

Use when you know approximately when something was discussed:

letta messages search --query "topic" --start-date "2025-12-31T00:00:00Z" --end-date "2025-12-31T23:59:59Z" --limit 15

Results are sorted by relevance within the date window.

Strategy 3: Broad Discovery

Use when you're not sure what you're looking for:

letta messages search --query "vague topic" --mode vector --limit 10

Vector mode finds semantically similar messages even without exact keyword matches.

Strategy 4: Find Which Agent Discussed Something

Use with --all-agents to search across all agents and identify which one discussed a topic:

letta messages search --query "authentication refactor" --all-agents --limit 10

Results include agent_id for each message. Use this to:

  1. Find the agent that worked on a specific feature
  2. Identify the right agent to ask follow-up questions
  3. Cross-reference with the finding-agents skill to get agent details

Tip: Load both searching-messages and finding-agents skills together when you need to find and identify agents by topic.

Search Output

Returns search results with:

  • message_id - Use this for cursor-based expansion
  • message_type - user_message, assistant_message, reasoning_message
  • content or reasoning - The actual message text
  • created_at - When the message was sent (ISO format)
  • agent_id - Which agent the message belongs to

db-migrations-and-schema-changes

letta-ai

Workflows and commands for managing Alembic database migrations and schema changes in the letta-cloud core app, including using uv, just, LETTA_PG_URI, and switching between SQLite and Postgres.

334

acquiring-skills

letta-ai

Guide for safely discovering and installing skills from external repositories. Use when a user asks for something where a specialized skill likely exists (browser testing, PDF processing, document generation, etc.) and you want to bootstrap your understanding rather than starting from scratch.

153

creating-skills

letta-ai

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Letta Code's capabilities with specialized knowledge, workflows, or tool integrations.

83

initializing-memory

letta-ai

Comprehensive guide for initializing or reorganizing agent memory. Load this skill when running /init, when the user asks you to set up your memory, or when you need guidance on creating effective memory blocks.

32

syncing-memory-filesystem

letta-ai

Manage git-backed memory repos. Load this skill when working with git-backed agent memory, setting up remote memory repos, resolving sync conflicts, or managing memory via git workflows.

21

working-in-parallel

letta-ai

Guide for working in parallel with other agents. Use when another agent is already working in the same directory, or when you need to work on multiple features simultaneously. Covers git worktrees as the recommended approach.

01

You might also like

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

2,2683,903

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

3,6613,342

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

4,7072,234

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

2,2851,724

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

2,4881,553

youtube-transcribe-skill

feiskyer

Extract subtitles/transcripts from a YouTube video URL and save as a local file. Use when you need to extract subtitles from a YouTube video.

3681,447