Urgent.News

What's breaking now, across thousands of outlets.

AI

Build a daily dependency watcher with LangGraph and Amazon Bedrock AgentCore web search

The Web Search API in Amazon Bedrock AgentCore gives agents current, cited web results signed with the AWS credentials they already use. In this post, build a daily dependency watcher as a LangGraph graph that researches package ecosystems in parallel, keeps its rules in code, and checks every finding against its cited sources.

Dependency watchers that track changes in open source packages and container base images for a security team can be built using LangGraph and Amazon Bedrock AgentCore's web search API. This API allows agents to retrieve current web results through a single API call, signed with AWS credentials already in use, without sending queries to third-party search engines.

The search results include relevant page titles, URLs, publication dates, and extracts. The API can be accessed via Amazon Bedrock AgentCore runtime, Amazon Elastic Container Service (Amazon ECS), or through AgentCore Gateway, offering a centralized administrator source policy for multiple agents and MCP clients. When implemented in LangChain's AWS integration, the API provides current, citable search results to agents with controlled query parameters like date windows, source blocklists, and search budgets.

The example post demonstrates constructing a daily dependency watch for a security team using LangGraph on the Web Search API. The watch checks for new information affecting the packages and container images shipped by the team each morning. It simultaneously researches three package ecosystems using parallel branches and returns structured findings.

The model decides what to search for, while date windows, blocklists, search budgets, and finding checks remain controlled by code. The solution overview outlines the components and workflow, including the decision-making process by the Anthropic Claude model in Amazon Bedrock, web search calls, and data handling for finding validation and reporting.

Prerequisites for implementation include an AWS account in a region supporting the Web Search API, Python 3.10 or later, specific AWS credentials, necessary IAM permissions, and Python packages such as boto3, bedrock-agentcore, langchain-aws, langchain, and langgraph. The API usage is billed per call, with up to 12 searches per run.

The code for the solution is provided in a notebook, which automatically runs all setup and essential steps.

Written by urgent.news from AWS Machine Learning's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at aws.amazon.com →

More in AI

More from Tuesday 10 November →