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

AWS has made the Web Search API in Amazon Bedrock AgentCore generally available, and LangChain's AWS integration now ships a web search tool that calls it. The announcement was published on the AWS Machine Learning Blog together with a worked example: a daily dependency watcher for a security team, built as a LangGraph graph that checks npm, PyPI and container base images for new advisories every morning. In the example run, three parallel research branches made 12 searches, returned 80 sources and finished in 36 seconds of wall time, against 99 seconds for the branches run one after another.
The design point of the API is that queries never leave AWS. Every request is served from a web index that Amazon operates, rather than being forwarded to a third-party search engine, and is signed with AWS Signature Version 4 using the caller's existing credentials. On Lambda, Amazon ECS or AgentCore runtime, an agent calls the API with its execution role, so there is no search API key to store or rotate. Each result carries the page title, URL, publication date and a query-relevant extract, and requests can include or exclude domains and restrict results to a publication date range.
Access control hinges on a single IAM action against a resource AWS owns, so the policy statement is identical in every account: allow bedrock-agentcore:InvokeWebSearch on arn:aws:bedrock-agentcore:us-east-1:aws:tool/web-search.v1. A second route, AgentCore Gateway, lets a platform team attach one administrator source policy to a web search target, which every agent and MCP client reaching that gateway inherits without being able to lift it. That route needs two grants on two principals: the gateway's service role needs InvokeWebSearch, and the credentials the agent signs with need InvokeGateway.
The dependency watcher shows how the pieces fit. A run starts with a watchlist and a watch window. LangGraph's Send API fans out one research branch per ecosystem. Inside each branch, an Anthropic Claude model in Amazon Bedrock decides what to search for and returns structured findings through a Pydantic response format: package, a one-line title, CVE or advisory ID where the source gives one, the severity the source states, whether the source says it is exploited, a recommended action and the source URL. Each branch caps at four searches and runs at the same time as the others, so a full run makes at most 12 searches.
The constraints that matter sit outside the model. The toolkit is created with exclude_domains, a published_after timestamp, max_searches and model_filters=False. With model filters off, the model sees only a query argument; its own arguments can narrow the blocklist and date floor but never widen them. return_sources=True makes the tool answer twice: as text for the model and as an artifact for the graph, with publication dates already parsed.
Before a branch returns, four code checks run against that branch's own search results. The cited URL must have come back from one of its searches, the source title or text must name the package as a whole word, any CVE or advisory ID in the finding must appear in that text, and the source date must fall inside the window, with a missing date counted as outside. In the example run these checks dropped two findings: one whose source did not name the package and one whose CVE ID was absent from its source. Four findings survived. After the branches merge, a keep_new step consults a LangGraph store and records new findings; two of the four were suppressed because earlier test runs had already reported them.
This is a useful illustration of a broader pattern: deterministic policy in code, model discretion limited to query formulation and summarisation. The limits are worth stating plainly, as the post does. The checks cannot confirm severity, exploitation status, affected versions or the recommended action, and they cannot prove when an issue was first disclosed, since a page the index dates this week may describe an older incident. Findings should be verified against authoritative vulnerability feeds and reviewed by a person before anyone acts.
A second run with the same input found the store already held every surviving finding, so the report came back empty. For daily scheduling, InMemoryStore is not enough; the post points to a durable store with exact key lookups, such as DynamoDBStore from langgraph-checkpoint-aws. Runtime session state is ephemeral too, so a hosted job also needs the durable store plus a schedule.
Teams adding the tool to an existing LangChain or Deep Agents app have a few practical checks. The toolkit's Region must offer the Web Search API and may differ from the model's Region. The tool is named web_search, so a colliding tool name from another search provider should be renamed. Each toolkit carries its own filters and budget, so separate rules mean separate toolkits. And all agents in an account share the Web Search quota: by default 10 requests per second per Region, so parallel branches add up. With Deep Agents, the toolkit's tools go into a subagent's tool list, and evidence checks run on the output or as middleware; the post reports a coordinator-plus-researcher setup returning a cited answer in about a minute.
Hosting is straightforward for LangGraph users: AgentCore runtime runs agents from any framework without a rewrite and offers two compute types behind the same APIs. MicroVMs, the default, isolate each session so one run cannot see another's data. Instances run agents on AWS-managed EC2 instances in the customer's account, aimed at multi-day sessions, GPU work or several agents sharing one instance. Requests are signed by the runtime execution role, and the sample's policy grants only the search permission. Steps 1-6 of the notebook create no AWS resources; the gateway step does, and the post describes deleting the target and gateway afterwards.
Why it matters: teams building agents that depend on current information now have a search path that stays inside their AWS account and IAM model, which removes key management and keeps sensitive queries off third-party search engines. The bigger lesson for developers is architectural: treating citations and source data as artifacts your code can validate, rather than text the model asserts, is what makes an agent's output auditable. Expect the 10 requests-per-second default quota and the verification gaps, especially severity and disclosure timing, to shape how these watchers are deployed in security workflows.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
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.