feat(examples): add code-reviewer quickstart#1
Draft
vadim-rl wants to merge 1 commit into
Draft
Conversation
Add a new code-reviewer quickstart that demonstrates building a code review agent using the deepagents package. The agent analyzes source code for correctness, style, and security using: - analyze_code: AST-based static analysis for naming conventions, missing docstrings, function complexity, and style violations - security_audit: Pattern-matching security scanner for eval/exec, pickle, SQL injection, shell injection, and hardcoded secrets - think_tool: Strategic reflection mechanism for quality assessment Includes a self-contained README with setup instructions and a copy-paste Python invocation example, pyproject.toml, langgraph.json, .env.example, and the full package structure following existing deep_research conventions. Updated examples/README.md to list the new quickstart.
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
Add a new
code-reviewer/quickstart example that follows the same structure and conventions as the existingdeep_research/example. This gives users a ready-to-run agent for analyzing source code correctness, style, and security.What's included
code_reviewer/tools.py— Three custom deepagent tools:analyze_code: AST-based static analysis (syntax, naming conventions, docstrings, function complexity, line length)security_audit: Regex-based security scanner (eval/exec, pickle, SQL injection, shell injection, hardcoded secrets, unsafe yaml.load)think_tool: Strategic reflection pattern (same as deep_research)code_reviewer/prompts.py— Three instruction sets mirroring the deep_research structure:REVIEW_WORKFLOW_INSTRUCTIONS: 6-step review workflowREVIEWER_INSTRUCTIONS: Sub-agent instructions with hard limitsSUBAGENT_DELEGATION_INSTRUCTIONS: Parallelization strategyagent.py— Standalone LangGraph agent definition with sub-agent supportREADME.md— Self-contained with setup (uv sync), two usage options (direct Python invocation + LangGraph server), custom model/instructions/tools sections with tablespyproject.toml,langgraph.json,.env.example— following existing patternsUpdated
examples/README.mdto list the new exampleHow to run
Then either run via LangGraph server (
langgraph dev) or use the direct Python invocation from the README.Review notes
deep_research/example exactlyexamples/README.mdast,re) — no additional external dependencies beyond the deepagents stack