AWS Builder Center

Investigate Before You Commit: Building Dependency Detective with AWS Strands, OpenSearch, and Finch

Dependency Detective is a local-first developer tool that investigates the blast radius of dependency changes using AST code analysis, Git history archaeology, AWS OpenSearch evidence indexing, and the AWS Strands Agents SDK built for the The First Commit Hackathon by wemakedevs.org

Introduction: The Hidden Risk of Codebase Dependencies

Every software developer knows the sinking feeling of upgrading or removing a third-party dependency. You run  npm update  or  pip install --upgrade , all unit tests pass locally, but weeks later in production, a subtle API breaking change surfaces—crashing background workers or silently dropping request interceptors.
Traditional security tools like Snyk or Dependabot alert developers to CVE vulnerability scores or version bumps. However, they stop short of answering the most critical developer question:
"If I change or remove this package, what specific lines of code and test files in MY repository will break?"
To solve this problem for the AWS First Commit Hackathon, our team built Dependency Detective: a local-first cyber-forensics tool that investigates the exact impact radius of dependency changes before you commit.



The Architectural Blueprint: Combining Static Analysis with AI Agents

To guarantee zero AI hallucinations, we designed Dependency Detective around a strict engineering principle: Deterministic Code Analysis First, AI Synthesis Second.
Here is how data flows through the application:
[ Local Source Code & Manifests ]
│
▼
[ AST Parser & NetworkX Blast Radius ]
│
├─────────────────────────────┐
▼ ▼
[ AWS OpenSearch Snippet Index ] [ AST Fact Generator ]
│ │
└──────────────┬──────────────┘
▼
[ AWS Strands Agents SDK ]
(Impact, Archaeology, Migration)
│
▼
[ React UI & Python CLI ]
  1. Manifest & AST Parsing: When a project is loaded, our AST engine parses  package.json  and  requirements.txt  manifests alongside source files (JS/TS and Python), generating a call graph.
  1. Blast Radius Computation: A NetworkX reachability graph traverses direct and transitive imports, identifying affected source files and reachable unit test suites.
  1. AWS OpenSearch Evidence Indexing: File snippets, symbol usages, and Git commit logs are indexed into local AWS OpenSearch clusters for sub-50ms hybrid keyword search.
  1. AWS Strands Agent Orchestration: Specialized AI agents powered by the AWS Strands Agents SDK query OpenSearch and execute AST tools to compile line-level evidence reports.
  1. Developer Presentation: Findings are rendered in an interactive React Cyber-Forensics Web UI and terminal CLI.



How AWS Technologies Powered Our Solution

1. Zero-Hallucination Reasoning with AWS Strands Agents SDK

Standard LLMs hallucinate non-existent imports or misquote line numbers when asked to analyze large codebases. The AWS Strands Agents SDK solved this cleanly. By registering deterministic Python tools ( get_blast_radius ,  find_usages ,  git_log ), Strands agents act as disciplined forensic investigators:
# Sample AWS Strands Tool Registration in apps/api/app/agents/strands_agents.py
@tool
def get_blast_radius(package_name: str, target_version: str) -> dict:
"""Calculates NetworkX graph reachability and affected test suites."""
return graph_engine.analyze_impact(package_name, target_version)
The agent uses LLM reasoning solely to select the right tools and synthesize structured evidence into developer-friendly recommendations—ensuring 100% factual accuracy.

2. Sub-50ms Evidence Retrieval with AWS OpenSearch

Searching across thousands of code lines and historical git commit logs requires multi-field scoring. AWS OpenSearch indexed code symbols, function declarations, and Git commit messages into structured documents. When an agent asks "Why was lodash introduced?", OpenSearch instantly retrieves the exact commit hash ( 430139c ) and rationale ("introduce lodash for search input debounce").

3. Reproducible Desktop Containers with AWS Finch

To ensure Dependency Detective runs effortlessly on any developer workstation without software conflicts, we used AWS Finch for client containerization. Using  finch-compose.yml , developers can spin up the full FastAPI backend and OpenSearch nodes locally with a single command:
finch compose -f infra/finch/finch-compose.yml up -d



Key Takeaways & Developer Learnings

Building Dependency Detective taught our team several key lessons about modern developer tooling:
  1. Ground AI in Factual Evidence: AI in developer tools is only as reliable as its underlying static analysis. Combining AST parsers with LLMs eliminates hallucination while keeping outputs human-readable.
  1. Local-First Privacy Matters: Developers are reluctant to send entire proprietary codebases to third-party SaaS platforms. By combining local OpenSearch indexing with local Finch containers, code never leaves the workstation.
  1. AWS Open Source is Production-Ready: The combination of Strands, OpenSearch, and Finch gave us an enterprise-grade agentic stack with complete open-source flexibility.



Investigate before you change your dependencies!

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article