feat(tools): add WarpGrep codebase search tool#4763
Draft
DhruvBhatia0 wants to merge 1 commit intocrewAIInc:mainfrom
Draft
feat(tools): add WarpGrep codebase search tool#4763DhruvBhatia0 wants to merge 1 commit intocrewAIInc:mainfrom
DhruvBhatia0 wants to merge 1 commit intocrewAIInc:mainfrom
Conversation
Add multi-turn codebase search tool powered by Morph's WarpGrep API. Users provide their own MORPH_API_KEY to search local codebases using an RL-trained grep navigation agent. The tool orchestrates a multi-turn loop: builds a file tree, sends it to the WarpGrep model, executes local ripgrep/read/list_directory commands as directed by the model, and returns relevant code spans with file paths and line numbers. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WarpGrepTool— a multi-turn codebase search tool powered by Morph's WarpGrep APIMORPH_API_KEYto search local codebases using an RL-trained grep navigation agentripgrep/read/list_directorycommands as directed, and returns relevant code spans with file paths and line numbersDetails
BaseTooldirectly (same pattern as BraveSearchTool, ParallelSearchTool)max_turns,api_timeout,rg_timeout, etc.)_resolve_path_run()call, not__init__)ruff check,ruff format,mypy --strictFiles changed
lib/crewai-tools/src/crewai_tools/tools/warpgrep_tool/warpgrep_tool.pylib/crewai-tools/src/crewai_tools/tools/warpgrep_tool/__init__.pylib/crewai-tools/src/crewai_tools/tools/warpgrep_tool/README.mdlib/crewai-tools/src/crewai_tools/tools/__init__.pylib/crewai-tools/src/crewai_tools/__init__.pyRequirements
ripgrep(rg) must be installed on the host machineMORPH_API_KEYenvironment variable (user-provided)requests, already in crewai-tools deps)Test plan
ruff check— cleanruff format— cleanmypy --strict— cleanfrom crewai_tools import WarpGrepTool— verified🤖 Generated with Claude Code