Agent skill

Morph Warpgrep

by letta-ai in letta-ai/skills

Integration guide for Morph's WarpGrep (fast agentic code search) and Fast Apply (10,500 tok/s code editing).

MITAuto-check: notesDevelopment

Install Morph Warpgrep

skills CLI
$ npx skills add letta-ai/skills --skill morph-warpgrep -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install letta-ai/skills morph-warpgrep --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/letta-ai/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tools/morph-warpgrep .claude/skills/morph-warpgrep && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
morph-warpgrep
GitHub stars
149
Token cost
~3.1k tokens
SKILL.md length
485 words
Files
3 (incl. scripts)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Integration guide for Morph's WarpGrep (fast agentic code search) and Fast Apply (10,500 tok/s code editing).

  • Works in 4 steps: Get a Morph API key from… → Set environment variable → Install the Morph SDK → …
  • Building coding agents that need fast
  • SKILL.md covers Prerequisites, Quick Test, When to Use and Quick Start: WarpGrep, plus 10 more sections
  • Runs TypeScript scripts from its folder; calls bun, npm and brew; reaches github.com and api.morphllm.com; needs MORPH_API_KEY

What it does

Morph Warpgrep is an agent skill from letta-ai/skills. Integration guide for Morph's WarpGrep (fast agentic code search) and Fast Apply (10,500 tok/s code editing). Use when building coding agents that need fast, accurate code search or need to apply AI-generated edits to code efficiently. Particularly useful for large codebases, deep logic queries, bug tracing, and code path analysis.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/test-warpgrep.ts`).

It sits in Development, covering Codebase onboarding. It works with Letta. The repository describes itself as: A shared repository for skills. Intended to be used with Letta Code, Claude Code, Codex CLI, and other agents that support skills. The licence is MIT.

When your agent uses it

  • Building coding agents that need fast
  • Accurate code search
  • Need to apply AI-generated edits to code efficiently

Example prompts

  • “/morph-warpgrep”

Requirements

  • Node.js
  • A credential in MORPH_API_KEY

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Get a Morph API key from https://www.morphllm.com/dashboard
  2. Set environment variable
  3. Install the Morph SDK
  4. Ensure ripgrep is installed (required for local search)

What it can do on your machine

Read from SKILL.md and the folder at commit 6785511. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • bun
    • npm
    • brew
    • apt
    • rg
    • git
    • claude
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • api.morphllm.com

    Also links to:

    • morphllm.com
    • docs.morphllm.com
    • discord.gg

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • MORPH_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Morph Warpgrep loads about 3.1k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 485 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:37
    sudo apt install ripgrep
  • NoteRuns commands with sudoSKILL.md:392
    sudo apt install ripgrep  # Ubuntu/Debian

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from letta-ai/skills at commit 6785511, republished under its MIT licence (© letta-ai). 485 words, ~3,078 tokens.

Download SKILL.mdSave it as .claude/skills/morph-warpgrep/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
morph-warpgrep
description
Integration guide for Morph's WarpGrep (fast agentic code search) and Fast Apply (10,500 tok/s code editing). Use when building coding agents that need fast, accurate code search or need to apply AI-generated edits to code efficiently. Particularly useful for large codebases, deep logic queries, bug tracing, and code path analysis.

Morph WarpGrep & Fast Apply

Morph provides two tools that significantly improve coding agent performance:

  • WarpGrep: Agentic code search that's 5x faster than regular search, uses parallel tool calls, achieves 0.73 F1 in ~4 steps
  • Fast Apply: Merges AI edits into code at 10,500 tok/s with 98% accuracy (2x faster than search-replace)

Prerequisites

  1. Get a Morph API key from https://www.morphllm.com/dashboard
  2. Set environment variable:
bash
export MORPH_API_KEY="your-api-key"
  1. Install the Morph SDK:
bash
bun add @morphllm/morphsdk
# or
npm install @morphllm/morphsdk
  1. Ensure ripgrep is installed (required for local search):
bash
# macOS
brew install ripgrep

# Ubuntu/Debian  
sudo apt install ripgrep

# Verify installation
rg --version

Quick Test

After setup, run the included test script on any local repository:

bash
# Clone a test repo (or use any existing codebase)
git clone https://github.com/letta-ai/letta-code.git test-repo

# Install SDK
cd test-repo
bun add @morphllm/morphsdk

# Run test script
export MORPH_API_KEY="your-key"
bun ../scripts/test-warpgrep.ts .

Expected output:

======================================================================
MORPH WARPGREP TEST
======================================================================
Repo: .
SDK: @morphllm/morphsdk
======================================================================

| Query                              | Result | Time   | Files |
|------------------------------------|--------|--------|-------|
| Find the main entry point          | ✅     | 5.2s   | 2     |
| Find authentication logic          | ✅     | 4.1s   | 4     |
| Find where configuration is handled | ✅     | 3.8s   | 3     |
| Find error handling patterns       | ✅     | 4.5s   | 5     |

======================================================================
Results: 4 passed, 0 failed
======================================================================

When to Use

Use WarpGrep When:
  • Searching large codebases (1000+ files)
  • Deep logic queries: bug tracing, code paths, control flow analysis
  • Need to find relevant context without polluting the context window
  • Regular grep returns too many irrelevant results
Use Fast Apply When:
  • Applying AI-generated code edits to existing files
  • Need reliable edit merging (98% accuracy vs ~70% for search-replace)
  • Working with large files where diff formats fail
Don't Use When:
  • Simple exact-match searches (regular grep/rg is free and fast enough)
  • Surface-level queries where semantic search suffices
  • Cost is a major concern (Morph API has usage costs)

Quick Start: WarpGrep

Basic Usage
typescript
import { MorphClient } from '@morphllm/morphsdk';

const morph = new MorphClient({ apiKey: process.env.MORPH_API_KEY });

const result = await morph.warpGrep.execute({
  query: 'Find authentication middleware',
  repoRoot: '.'
});

if (result.success) {
  for (const ctx of result.contexts) {
    console.log(`File: ${ctx.file}`);
    console.log(ctx.content);
  }
} else {
  console.error('Search failed');
}
Response Format
typescript
interface WarpGrepResult {
  success: boolean;
  contexts: Array<{
    file: string;    // File path relative to repo root
    content: string; // File content with relevant code
  }>;
  summary?: string;  // Human-readable summary
}
Using as an Agent Tool
typescript
import { MorphClient } from '@morphllm/morphsdk';
import Anthropic from '@anthropic-ai/sdk';

const morph = new MorphClient({ apiKey: process.env.MORPH_API_KEY });
const anthropic = new Anthropic();

// Define WarpGrep as a tool
const tools = [{
  name: 'warpgrep_search',
  description: 'Search codebase for relevant code. Use for finding implementations, tracing bugs, or understanding code flow.',
  input_schema: {
    type: 'object',
    properties: {
      query: { type: 'string', description: 'What to search for' }
    },
    required: ['query']
  }
}];

// Handle tool calls
async function handleToolCall(name: string, input: { query: string }) {
  if (name === 'warpgrep_search') {
    const result = await morph.warpGrep.execute({
      query: input.query,
      repoRoot: process.cwd()
    });
    
    if (result.success) {
      return result.contexts.map(c => `## ${c.file}\n${c.content}`).join('\n\n');
    }
    return 'No results found';
  }
}

Quick Start: Fast Apply

Fast Apply merges AI-generated edits into existing code:

typescript
import { MorphClient } from '@morphllm/morphsdk';

const morph = new MorphClient({ apiKey: process.env.MORPH_API_KEY });

const result = await morph.fastApply.apply({
  originalCode: `function divide(a, b) {
  return a / b;
}`,
  editSnippet: `function divide(a, b) {
  if (b === 0) throw new Error("Division by zero");
  return a / b;
}`
});

console.log(result.mergedCode);
Direct API (Alternative)
typescript
const response = await fetch('https://api.morphllm.com/v1/chat/completions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${process.env.MORPH_API_KEY}`
  },
  body: JSON.stringify({
    model: 'morph-v3-fast',  // or 'morph-v3-large' for complex edits
    messages: [{
      role: 'user',
      content: `<instruction>Add error handling</instruction>
<code>function divide(a, b) { return a / b; }</code>
<update>function divide(a, b) {
  if (b === 0) throw new Error("Division by zero");
  return a / b;
}</update>`
    }],
    temperature: 0
  })
});

const data = await response.json();
const mergedCode = data.choices[0].message.content;

Tested Results

Tested on the letta-code repository (~300 TypeScript files) using SDK v0.2.103:

QueryResultTimeFiles Found
"Find authentication logic"✅4.2ssrc/auth/oauth.ts, src/auth/setup.ts, +2
"Find the main CLI entry point"✅5.8ssrc/index.ts, src/cli/App.tsx
"Find where models are configured"✅3.1ssrc/agent/model.ts, src/models.json, +1
"Find how memory blocks work"✅3.9ssrc/agent/memory.ts, src/agent/memoryFilesystem.ts, +1
"Find the settings manager"✅2.9ssrc/settings-manager.ts, src/settings.ts

5/5 tests passed

Performance Summary
  • Average time: 4.0 seconds
  • Token efficiency: 39% fewer input tokens vs manual search
  • Accuracy: Finds relevant code in 2-4 turns

Show full SKILL.md (185 more words)Show less

How WarpGrep Works

WarpGrep is an agentic search that runs up to 4 turns:

┌─────────────────────────────────────────────────────────────┐
│  Turn 1: Analyze query, map repo structure, initial search  │
├─────────────────────────────────────────────────────────────┤
│  Turn 2-3: Refine search, read specific files               │
├─────────────────────────────────────────────────────────────┤
│  Turn 4: Return all relevant code locations                 │
└─────────────────────────────────────────────────────────────┘

The SDK handles the multi-turn conversation automatically, executing local tools:

ToolDescriptionImplementation
grepRegex search across filesUses ripgrep (rg)
readRead file contentsLocal filesystem
list_dirShow directory structureLocal filesystem

Architecture

┌──────────────────────────────────────────────────────────────┐
│                    Your Code / Agent                         │
└──────────────────────────┬───────────────────────────────────┘
                           │
                           ▼
┌──────────────────────────────────────────────────────────────┐
│              @morphllm/morphsdk                              │
│  ┌─────────────────────────────────────────────────────────┐ │
│  │ 1. Build repo structure                                 │ │
│  │ 2. Send query to Morph API                              │ │
│  │ 3. Execute local tools (grep, read, list_dir)           │ │
│  │ 4. Multi-turn refinement                                │ │
│  │ 5. Return relevant code contexts                        │ │
│  └─────────────────────────────────────────────────────────┘ │
└──────────────────────────┬───────────────────────────────────┘
                           │
            ┌──────────────┴──────────────┐
            ▼                             ▼
┌───────────────────────┐    ┌───────────────────────┐
│    Morph API          │    │   Local Filesystem    │
│  (morph-warp-grep-v1) │    │   (ripgrep, fs)       │
└───────────────────────┘    └───────────────────────┘

Morph's Benchmarks

From Morph's SWE-bench evaluation with Claude 4.5 Opus:

MetricWithout WarpGrepWith WarpGrepImprovement
Input Tokens14K9K39% fewer
Agent Turns35.026.026% fewer
Tasks Solved74.4%81.9%10% more

Source: Morph WarpGrep Benchmarks


Common Patterns

Reconnaissance-Then-Action
typescript
import { MorphClient } from '@morphllm/morphsdk';

const morph = new MorphClient({ apiKey: process.env.MORPH_API_KEY });

// 1. Search for relevant code
const result = await morph.warpGrep.execute({
  query: 'Where is the payment processing logic?',
  repoRoot: '.'
});

// 2. Use found contexts to inform next steps
if (result.success) {
  const relevantFiles = result.contexts.map(c => c.file);
  console.log('Found relevant files:', relevantFiles);
  // Now read/edit these specific files
}
Combining WarpGrep + Fast Apply
typescript
import { MorphClient } from '@morphllm/morphsdk';

const morph = new MorphClient({ apiKey: process.env.MORPH_API_KEY });

// 1. Find the code to modify
const search = await morph.warpGrep.execute({
  query: 'Find the user validation function',
  repoRoot: '.'
});

if (search.success && search.contexts.length > 0) {
  const targetFile = search.contexts[0];
  
  // 2. Apply an edit
  const result = await morph.fastApply.apply({
    originalCode: targetFile.content,
    editSnippet: '// Add your modified version here'
  });
  
  console.log(result.mergedCode);
}

MCP Integration

For personal use with Claude Code, Cursor, or other MCP clients:

bash
# Install MCP server
claude mcp add morph --scope user -e MORPH_API_KEY=YOUR_API_KEY --npx -y @morphllm/morphmcp

This adds a warpgrep_codebase_search tool to your MCP client.


Troubleshooting

ripgrep Not Found
bash
# Install ripgrep
brew install ripgrep  # macOS
sudo apt install ripgrep  # Ubuntu/Debian

# Verify
rg --version
API Key Issues
bash
# Verify API key works
curl -X POST https://api.morphllm.com/v1/chat/completions \
  -H "Authorization: Bearer $MORPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"morph-v3-fast","messages":[{"role":"user","content":"test"}]}'
SDK Version Issues

Ensure you're using the latest SDK:

bash
bun add @morphllm/morphsdk@latest
# or
npm install @morphllm/morphsdk@latest

Cost Considerations

  • WarpGrep uses 1-4 API calls per search (typically 2-3)
  • Fast Apply uses 1 API call per edit
  • Pricing: $0.80 per 1M tokens (input and output)
  • Monitor usage via Morph Dashboard
  • Use regular grep/ripgrep for simple exact-match searches (free)

Resources

© letta-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in tools/morph-warpgrep of letta-ai/skills.

  • SKILL.md
  • LICENSE
  • scripts/test-warpgrep.ts

Open the folder on GitHubat commit 6785511

Compare with similar skills

Morph Warpgrep next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Morph Warpgrep compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Morph Warpgrep this skillletta-ai/skills149—~3.1kAutomated safety check: NotesMIT
Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything86k—~1.2kAutomated safety check: PassMIT
Understand ExplainEgonex-AI/Understand-Anything86k—~1.3kAutomated safety check: PassMIT
Project Onboarding Guide from Knowledge GraphEgonex-AI/Understand-Anything86k—~1.2kAutomated safety check: PassMIT
GitDiagram Repository Overviewahmedkhaleel2004/gitdiagram18k—~427Automated safety check: PassMIT
Deepwiki Rssopaco/deepwiki-rs3.1k—~748Automated safety check: PassMIT

Similar skills

  • Codebase Knowledge Graph Q&A

    Egonex-AI/Understand-Anything

    Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.

    86k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Understand Explain

    Egonex-AI/Understand-Anything

    Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.

    86k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Writes an onboarding guide for new team members from a project's existing knowledge graph, after checking that the graph still matches the current commit.

    86k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • GitDiagram Repository Overview

    ahmedkhaleel2004/gitdiagram

    Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.

    18k GitHub stars~427 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Deepwiki Rs

    sopaco/deepwiki-rs

    AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation.

    3.1k GitHub stars~748 tokensUpdated 25 days ago
    DevelopmentAuto-check passed
  • Explore Codebase with Graph

    tirth8205/code-review-graph

    Navigates a codebase through the code-review-graph MCP tools: architecture overview, symbol search, caller and callee tracing, flows and oversized functions.

    32k GitHub starsUsed in 1 repo~335 tokens
    DevelopmentAuto-check passed

More from letta-ai/skills

All 22 skills in this repo
  • Visual Identity

    letta-ai/skills

    Build and maintain a persistent visual identity for your agent using Flux Kontext Pro.

    149 GitHub stars~2.6k tokensUpdated 8 days ago
    Auto-check passed
  • AI News

    letta-ai/skills

    Fetch and summarize recent AI news from curated RSS feeds (Hugging Face, VentureBeat, The Verge, OpenAI, Anthropic, DeepMind, etc.) and YouTube channels (Yannic Kilcher, Two Minute Papers, AI…

    149 GitHub stars~582 tokensUpdated 8 days ago
    Auto-check passed
  • Builds and debugs Letta Code channels, including first-party channel adapters and dynamic user channel plugins under ~/.letta/channels.

    149 GitHub stars~1.1k tokensUpdated 8 days ago
    Auto-check passed
  • Letta Configuration

    letta-ai/skills

    Configure LLM models and providers for Letta agents and servers.

    149 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check: notes
  • Migrates deprecated Letta Filesystem folders/files to MemFS using markdown document corpora, chunking, local lexical search, and QMD semantic search via the memfs-search skill.

    149 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Memfs Search

    letta-ai/skills

    Semantic search over agent memory files. An agent skill from letta-ai/skills.

    149 GitHub stars~901 tokensUpdated 8 days ago
    Auto-check passed

Works with

Categories

Questions about Morph Warpgrep

What does Morph Warpgrep do?

Integration guide for Morph's WarpGrep (fast agentic code search) and Fast Apply (10,500 tok/s code editing). Morph Warpgrep is an agent skill from letta-ai/skills. Integration guide for Morph's WarpGrep (fast agentic code search) and Fast Apply (10,500 tok/s code editing).

When should I use Morph Warpgrep?

Morph Warpgrep fits situations like: building coding agents that need fast; accurate code search; need to apply AI-generated edits to code efficiently.

How do I install Morph Warpgrep in Claude Code?

Run `npx skills add letta-ai/skills --skill morph-warpgrep -a claude-code`. Or copy the skill folder (tools/morph-warpgrep in letta-ai/skills) into .claude/skills/morph-warpgrep in your project. Claude Code loads it when a task matches its description.

How do I install Morph Warpgrep in Codex?

Run `npx skills add letta-ai/skills --skill morph-warpgrep -a codex`. Or copy the skill folder (tools/morph-warpgrep in letta-ai/skills) into .agents/skills/morph-warpgrep in your project. Codex loads it when a task matches its description.

Can I use Morph Warpgrep in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letta-ai/skills --skill morph-warpgrep -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/morph-warpgrep, .gemini/skills/morph-warpgrep, .github/skills/morph-warpgrep and .opencode/skills/morph-warpgrep in your project.

What does Morph Warpgrep need to run?

Going by SKILL.md and its folder, Morph Warpgrep needs TypeScript for the scripts in its folder, the command-line tools its instructions call (bun, npm, brew, apt, rg and git) and credentials named MORPH_API_KEY. Our summary lists: Node.js; A credential in MORPH_API_KEY.

Does Morph Warpgrep access the network?

SKILL.md names 5 domains. In commands or code: github.com and api.morphllm.com; the agent is likely to contact these when it follows the instructions. As links in the text: morphllm.com, docs.morphllm.com and discord.gg. This is read from the text; nothing was executed.

Is Morph Warpgrep safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Morph Warpgrep use?

Morph Warpgrep is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Morph Warpgrep use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Morph Warpgrep?

Skills that share tags, products or a category with Morph Warpgrep: Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 86k stars), Understand Explain (Egonex-AI/Understand-Anything, 86k stars), Project Onboarding Guide from Knowledge Graph (Egonex-AI/Understand-Anything, 86k stars) and GitDiagram Repository Overview (ahmedkhaleel2004/gitdiagram, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Morph Warpgrep?

letta-ai (a GitHub organization) maintains it in letta-ai/skills, which has 149 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 1, 2026.

Source: letta-ai/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.