- Your agent (Claude, Codex, GPT-4o, Gemini) needs to find code
- It calls WarpGrep with a natural language query
- WarpGrep searches in its own isolated context window, multiple turns, 8 parallel tool calls per turn
- It returns only the relevant file/line-range spans
- Your agent continues with clean context
Quick Start
- Anthropic
- OpenAI
- Vercel AI SDK
Platform Examples
- E2B
- Modal
- Daytona
- Vercel Sandbox
- Cloudflare Sandbox
- Docker/SSH
Your sandbox needs
ripgrep (rg) installed for the grep function. Most sandbox providers support apt-get install ripgrep (Ubuntu/Debian). On Amazon Linux 2023 (Vercel Sandbox), download the static binary instead.Configuration
Default Excludes
WarpGrep excludes common non-source directories by default:- Dependencies:
node_modules,bower_components,.pnpm,.yarn,vendor,Pods,.bundle - Build output:
dist,build,.next,.nuxt,out,target,.output - Python:
__pycache__,.pytest_cache,.mypy_cache,.ruff_cache,.venv,venv,site-packages - Version control:
.git,.svn,.hg - Lock files, minified files, source maps, and common binary formats
excludes to override these defaults. Your list replaces the defaults entirely — it does not merge with them.
Searching node_modules
By default,node_modules is excluded. To search inside dependencies (e.g., debugging a library or finding how a package implements something), pass an empty excludes list:
node_modules in your search when you need it. See the node_modules example.
GitHub Search Options
createGitHubSearchTool() accepts:
GitHub Search
Search public GitHub repositories. No local clone or ripgrep needed — Morph indexes the repo remotely. See the GitHub search example.Client API
Agent Tool
Each SDK adapter providescreateGitHubSearchTool():
githubTool in your tools array.
Remote Execution (Sandboxes)
When your code lives in a remote sandbox (E2B, Modal, Daytona, Docker), provide three functions that execute commands remotely. The SDK handles all parsing.sandbox.run(...) with your provider’s exec method (E2B’s sandbox.commands.run, Modal’s sandbox.exec, etc).
API Reference
Input (WarpGrepInput):
WarpGrepResult):