home / skills / letta-ai / letta-code / finding-agents
This skill helps you locate other agents on the same Letta server, enabling memory migration and targeted agent selection.
npx playbooks add skill letta-ai/letta-code --skill finding-agentsReview the files below or copy the command above to add this skill to your agents.
---
name: finding-agents
description: 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.
---
# 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
## CLI Usage
```bash
letta agents list [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:
```bash
letta agents list --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:
```bash
letta agents list
```
## Examples
**List all agents (up to 20):**
```bash
letta agents list
```
**Find agent by exact name:**
```bash
letta agents list --name "ProjectX-v1"
```
**Search agents by name (fuzzy):**
```bash
letta agents list --query "project"
```
**Find only Letta Code agents:**
```bash
letta agents list --tags "origin:letta-code"
```
**Find agents with multiple tags:**
```bash
letta agents list --tags "frontend,production" --match-all-tags
```
**Include memory blocks in results:**
```bash
letta agents list --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)
## Related Skills
- **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:
```bash
letta messages search --query "topic" --all-agents --limit 10
```
3. Note the `agent_id` values from matching messages
4. Get agent details:
```bash
letta agents list --query "partial-name"
```
Or use the agent_id directly in the Letta API
This skill finds other agents on the same Letta server so you can inspect identities, tags, and memory blocks. It helps locate agents by exact name, fuzzy query, or tag filters and returns full agent details including IDs needed for migration. Use it when you need to list agents, locate a specific agent, or gather agent metadata for follow-up actions.
The skill queries the server agent registry and returns raw agent records with fields like id, name, description, tags, and optional memory blocks. It supports exact-name, fuzzy query, tag filters, match-all-tags behavior, pagination/limit, and an option to include memory blocks in the response. Results are the full API response so you can pass IDs or blocks to downstream workflows such as memory migration or message-based lookups.
What fields are returned for each agent?
Each agent record includes id, name, description, tags, and blocks when requested with the include-blocks option.
How do I find Letta Code-created agents?
Filter by the tag origin:letta-code to return only agents created by Letta Code tools.