finding-agents

letta-ai's avatarfrom letta-ai

Find other agents on the same server. Use when the user asks about other agents, wants to migrate memory from another agent, or needs to find an agent by name or tags.

⭐828stars🔀96forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

The Finding Agents skill is an essential utility for multi-agent orchestration within the Letta ecosystem. It enables Claude agents to discover, identify, and retrieve metadata for other agents residing on the same server. By supporting fuzzy name searches, tag-based filtering, and memory block inspection, this skill serves as a foundational tool for cross-agent communication, memory migration, and complex workflow management, ensuring seamless context sharing across an agentic workforce.

Use Cases

  • Memory Migration: Quickly locate a specific agent's ID to facilitate the transfer or sharing of memory blocks between different assistants.
  • Agent Organization & Filtering: Use custom tags (e.g., 'production', 'development', or 'origin:letta-code') to filter and manage large sets of specialized agents.
  • Contextual Discovery: Enable an agent to find 'colleague' agents when a user asks about previous interactions or tasks handled by other parts of the system.
  • System Auditing: Retrieve comprehensive agent details, including descriptions and memory configurations, to audit or debug agent deployments on a Letta server.
  • Cross-Reference Search: Combine with message searching to identify which specific agent discussed a topic and then retrieve that agent's full profile for further action.
namefinding-agents
descriptionFind other agents on the same server. Use when the user asks about other agents, wants to migrate memory from another agent, or needs to find an agent by name or tags.

Finding Agents

This skill helps you find other agents on the same Letta server.

When to Use This Skill

  • User asks about other agents they have
  • User wants to find a specific agent by name
  • User wants to list agents with certain tags
  • You need to find an agent ID for memory migration
  • You found an agent_id via message search and need details about that agent

Script Usage

npx tsx <SKILL_DIR>/scripts/find-agents.ts [options]

Options

Option Description
--name <name> Exact name match
--query <text> Fuzzy search by name
--tags <tag1,tag2> Filter by tags (comma-separated)
--match-all-tags Require ALL tags (default: ANY)
--include-blocks Include agent.blocks in response
--limit <n> Max results (default: 20)

Common Patterns

Finding Letta Code Agents

Agents created by Letta Code are tagged with origin:letta-code. To find only Letta Code agents:

npx tsx <SKILL_DIR>/scripts/find-agents.ts --tags "origin:letta-code"

This is useful when the user is looking for agents they've worked with in Letta Code CLI sessions.

Finding All Agents

If the user has agents created outside Letta Code (via ADE, SDK, etc.), search without the tag filter:

npx tsx <SKILL_DIR>/scripts/find-agents.ts

Examples

List all agents (up to 20):

npx tsx <SKILL_DIR>/scripts/find-agents.ts

Find agent by exact name:

npx tsx <SKILL_DIR>/scripts/find-agents.ts --name "ProjectX-v1"

Search agents by name (fuzzy):

npx tsx <SKILL_DIR>/scripts/find-agents.ts --query "project"

Find only Letta Code agents:

npx tsx <SKILL_DIR>/scripts/find-agents.ts --tags "origin:letta-code"

Find agents with multiple tags:

npx tsx <SKILL_DIR>/scripts/find-agents.ts --tags "frontend,production" --match-all-tags

Include memory blocks in results:

npx tsx <SKILL_DIR>/scripts/find-agents.ts --query "project" --include-blocks

Output

Returns the raw API response with full agent details. Key fields:

  • id - Agent ID (e.g., agent-abc123)
  • name - Agent name
  • description - Agent description
  • tags - Agent tags
  • blocks - Memory blocks (if --include-blocks used)
  • migrating-memory - Once you find an agent, use this skill to copy/share memory blocks
  • searching-messages - Search messages across all agents to find which agent discussed a topic. Use --all-agents to get agent_id values, then use this skill to get full agent details.

Finding Agents by Topic

If you need to find which agent worked on a specific topic:

  1. Load both skills: searching-messages and finding-agents
  2. Search messages across all agents:
    search-messages.ts --query "topic" --all-agents --limit 10
    
  3. Note the agent_id values from matching messages
  4. Get agent details:
    find-agents.ts --query "partial-name"
    
    Or use the agent_id directly in the Letta API