AWS Builder Center
From Prompt to Opportunity: Building an AI Community Scout with Amazon Bedrock AgentCore, Strands Agents, and Kiro

From Prompt to Opportunity: Building an AI Community Scout with Amazon Bedrock AgentCore, Strands Agents, and Kiro

Build an evidence-grounded AI Community Scout with Amazon Bedrock AgentCore, Strands Agents, Claude Sonnet 4.6, and Kiro. This step-by-step tutorial shows how to discover real technology community opportunities using AgentCore Web Search, validate evidence, filter and rank results deterministically, deploy with CloudFormation to AgentCore Runtime, and build a Streamlit UI—without relying on the LLM to invent events.

Series: Agentic AI (2 articles)

  1. 2
    From Prompt to Opportunity: Building an AI Community Scout with Amazon Bedrock AgentCore, Strands Agents, and Kiro This article
Community opportunities are scattered across event platforms and websites. A developer looking for an AWS meetup, an Agentic AI session, or a Kubernetes community event may have to repeat the same search across several sites.
In this tutorial, we turn that manual workflow into an evidence-grounded AI agent.
We will build Community Scout: a Python agent that accepts a natural-language request such as:
Find Agentic AI, AWS, and Kubernetes community events in Austin during the next 90 days.
The agent discovers public indexed evidence through Amazon Bedrock AgentCore Web Search, validates candidate events, normalizes them into a common model, removes duplicates, ranks them deterministically, and returns clickable source URLs.
Key design principle: the model is not the source of truth for an event. Accepted events must be grounded in retrieved evidence. When the evidence is insufficient, returning fewer results is better than inventing one.
Kiro prompts:




What You Will Build

The finished application separates agent reasoning from evidence validation.
Kiro is used during development to turn requirements into a design and implementation tasks. In production, the agent runs on Amazon Bedrock AgentCore Runtime. Strands Agents orchestrates the model/tool loop, Amazon Bedrock provides Claude Sonnet 4.6, AgentCore Gateway provides the IAM-authenticated tool boundary, and AgentCore Web Search provides public indexed evidence.

Architecture

Community Scout – AWS Architecture

Architecture diagram: insert the  Community Scout – AWS Architecture  image here in AWS Builder.



Prerequisites

You will need:
  • Python 3.12 or later
  • An AWS account with permissions to deploy the required AgentCore, IAM, CloudFormation, S3, and logging resources
  • AWS CLI installed and authenticated
  • Git
  • Kiro if you want to reproduce the spec-driven development workflow
AWS-Style Agent Architecture Table

Clone the repository:
git clone https://github.com/hastimal/bedrock-community-scout.git
cd bedrock-community-scout
Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Install the application/runtime dependencies:
pip install -r requirements.txt



Step 1 --- Start With a Kiro Specification

Instead of starting with an open-ended prompt to generate code, I started by defining the engineering contract.
The repository keeps the Kiro specification under:
.kiro/specs/community-scout-austin/
├── requirements.md
├── design.md
├── tasks.md
└── tasks.meta.json
The development workflow is:
Requirements
|
v
Design
|
v
Tasks
|
v
Implementation
|
v
Tests
|
v
AWS Deployment
A simplified version of the core requirement looks like this:
Find Agentic AI, AWS, and Kubernetes community events
in Austin during the next 90 days.

Constraints:
- Use public indexed evidence.
- Do not fabricate titles, dates, locations, or URLs.
- Preserve original source URLs.
- Filter the requested date window deterministically.
- Prefer zero results to unrelated results.
- Normalize all accepted evidence into one event model.
This matters because an AI coding workflow becomes much easier to reason about when requirements such as "never fabricate an event" are explicit engineering constraints rather than assumptions hidden inside a prompt.



Step 2 --- Define a Common Event Contract

Web evidence is inconsistent. One page may expose a clean title and date, while another may expose only a snippet.
The downstream pipeline should not depend on a platform-specific representation, so accepted evidence is normalized into a  CommonEvent  model.
A simplified representation is:
from dataclasses import dataclass
from typing import Optional

@dataclass
class CommonEvent:
title: str
start_datetime: str
city: str
source_platform: str
event_url: str

description: Optional[str] = None
end_datetime: Optional[str] = None
location_name: Optional[str] = None

match_confidence: float = 0.0
source_invocation_order: int = 0
The required fields are intentionally small:
  •  title 
  •  start_datetime 
  •  city 
  •  source_platform 
  •  event_url 
The URL is treated as evidence. The application preserves the source URL rather than asking the model to reconstruct it.



Step 3 --- Make Discovery Source-Aware

Community Scout currently targets public indexed pages from:
meetup.com
lu.ma
It does not depend on private or undocumented event-platform APIs.
Instead, the application uses AgentCore Web Search through AgentCore Gateway.
Searches are source-aware: each configured domain is searched independently so one domain does not automatically crowd the other out of the initial evidence set.
Conceptually:
SOURCES = {
"meetup": ["meetup.com"],
"luma": ["lu.ma"],
}

for source, domains in SOURCES.items():
search_args = {
"query": query_with_location_and_date_window,
"domainFilter": {
"include": domains
},
}

raw_results = web_search(search_args)

# Extract and validate evidence.
The real implementation is in:
src/tools/agentcore_web_search_event_source.py

Event dates are not page publication dates

An important detail is that an indexed page's publication date is not necessarily the event date.
Community Scout therefore places the requested start/end dates in the search query and then performs deterministic post-filtering using the event date extracted from evidence.
It does not substitute search-result publication metadata for an event start date.

Source support does not guarantee source representation

Source-aware discovery does not mean every query will contain a Meetup event and a Luma event.
AgentCore Web Search works against public indexed evidence. Index coverage changes, and sometimes one source has much stronger evidence than another.
That is expected.



Step 4 --- Put Web Search Behind AgentCore Gateway

The application should not call arbitrary web endpoints directly.
Amazon Bedrock AgentCore Gateway provides the controlled tool-access boundary.
AgentCore Runtime
|
| IAM / SigV4
v
AgentCore Gateway
|
v
AgentCore Web Search
The deployed Gateway uses AWS IAM authentication. The Runtime execution role receives permission to invoke the specific Gateway required by the application.
The repository defines AWS infrastructure with CloudFormation under:
infra/cloudformation/
The important templates include:
infra/cloudformation/gateway.yaml
infra/cloudformation/runtime.yaml
This makes the architecture reproducible and keeps the AWS console from becoming an undocumented part of the deployment process.



Step 5 --- Orchestrate the Agent With Strands Agents

Strands Agents handles the model/tool-use loop.
Claude Sonnet 4.6 on Amazon Bedrock interprets the request and can invoke the Community Scout tool.
The important architectural boundary is this:
Model reasoning does not replace deterministic evidence checks.
A simplified orchestration shape looks like:
from strands import Agent

agent = Agent(
model=bedrock_model,
tools=[community_scout_tool],
callback_handler=None,
)

result = agent(user_prompt)
See  src/scout.py  for the complete implementation.
Using  callback_handler=None  is useful in this application because intermediate model/tool output should not become the final user-facing answer. The response shown to the user should come from the grounded application pipeline.



Step 6 --- Validate Evidence Deterministically

This is the part that turns Community Scout from an LLM recommendation demo into an evidence-grounded discovery system.
Every candidate passes deterministic checks before it can become a result.
The pipeline verifies that:
  1. The event date comes from evidence.
  1. The date falls inside the requested window.
  1. The location matches Austin, Texas for the current MVP.
  1. The event-associated evidence is relevant to a requested topic.
  1. The original source URL is retained.
  1. Duplicates are collapsed deterministically.
  1. Candidates with insufficient evidence are rejected rather than completed by the model.

Topic relevance gate

A generic city discovery page can mention both an AI meetup and an unrelated social event.
That means topic relevance cannot be determined from arbitrary text elsewhere on a page. It must be tied to event-associated evidence such as the title and relevant description/snippet.
A simplified topic vocabulary is:
TOPIC_TERMS = {
"Agentic AI": [
"agentic ai",
"ai agent",
"ai agents",
"autonomous agent",
"llm agent",
"multi-agent",
],
"AWS": [
"aws",
"amazon web services",
"bedrock",
"agentcore",
"lambda",
"ec2",
"eks",
"sagemaker",
"cloudformation",
],
"Kubernetes": [
"kubernetes",
"k8s",
"kubectl",
"kubecon",
"eks",
"gke",
"aks",
"kubevirt",
"helm",
],
}
This is intentionally precision-first.
If no sufficiently grounded event exists, returning zero results is preferable to filling the screen with unrelated events.



Step 7 --- Normalize, Deduplicate, and Rank

After evidence validation, all events enter the same deterministic pipeline.
Validated evidence
|
v
Normalization
|
v
Deduplication
|
v
Ranking
|
v
Grounded response
The current ranking algorithm allocates up to 80 points to topic relevance and up to 20 points to recency.
relevance_score = topic_score + recency_score

topic_score = (
matched_topics / total_topics
) * 80

recency_score = max(
0,
20 * (1 - days_until_event / 365)
)
The final score is constrained to the expected range, and ties are broken using deterministic event data such as  start_datetime .
Why not simply ask the LLM to rank the events?
Because deterministic ranking is:
  • reproducible
  • testable
  • explainable
  • easier to debug
The model helps interpret intent and use tools; application code owns the final ranking contract.



Step 8 --- Test Before Deploying

Run the full test suite:
pytest tests/
The repository includes:
  • unit tests
  • integration tests
  • property-based tests
Coverage includes important behaviors such as:
  • time-window filtering
  • topic relevance
  • source-aware discovery
  • normalization
  • deduplication
  • byte-for-byte URL preservation
  • Web Search response parsing
  • UI response decoding
  • discovery diagnostics
  • end-to-end pipeline behavior
  • tool failure containment
At the time this tutorial was prepared, the repository reported:
203 tests passing
Run  pytest tests/  to reproduce the current count because the test suite will evolve with the project.



Step 9 --- Deploy to Amazon Bedrock AgentCore Runtime

Community Scout uses AgentCore Runtime direct-code deployment.
The repository includes packaging and deployment scripts:
scripts/package-runtime.sh
scripts/deploy-runtime.sh
Deploy the Runtime:
./scripts/deploy-runtime.sh
The deployment process:
Application source
|
v
Package Python Runtime artifact
|
v
Upload ZIP to Amazon S3
|
v
Deploy CloudFormation
|
v
Amazon Bedrock AgentCore Runtime

A deployment lesson: version the S3 artifact key

During development, one subtle issue was especially useful to uncover.
If every deployment overwrites the same object:
community-scout-runtime.zip
the CloudFormation resource property can continue to point to exactly the same S3 bucket/key even though the object bytes changed.
Instead, Community Scout uses a unique immutable key for each deployment:
community-scout-runtime/<git-sha>-<utc-timestamp>.zip
For example:
community-scout-runtime/bbfb842-20260915T165546Z.zip
The deployment script passes that unique key into the Runtime CloudFormation configuration.
This makes the code artifact reference change between deployments and allows the Runtime deployment to advance to the new application code.
The S3 artifact bucket also has versioning enabled and public access blocked.



Step 10 --- Invoke the Deployed Runtime

Before adding a UI, test the deployed Runtime directly.
Use the Runtime ARN produced by your CloudFormation stack.
aws bedrock-agentcore invoke-agent-runtime \
--agent-runtime-arn "<RUNTIME_ARN>" \
--runtime-session-id "community-scout-demo-session-0123456789abcdef" \
--payload '{"prompt":"Find Agentic AI, AWS, and Kubernetes community events in Austin during the next 90 days."}' \
--cli-binary-format raw-in-base64-out \
--region us-east-1 \
runtime-response.json
Inspect the response:
cat runtime-response.json
A response is shaped approximately like:
Found N events in Austin, Texas:

1. [Event title](original-source-url)
- Source: Meetup
- City: Austin, Texas
- Date: YYYY-MM-DD
The exact events are intentionally not hard-coded into the tutorial because AgentCore Web Search uses live indexed evidence.
Results can change over time.



Step 11 --- Add the Streamlit Demo UI

The Streamlit layer is deliberately thin.
It lets the user select topics such as:
  • Agentic AI
  • AWS
  • Kubernetes
The MVP location is Austin, Texas and the time window is the next 90 days.
The UI then invokes the deployed AgentCore Runtime.
It does not duplicate:
  • web search
  • extraction
  • filtering
  • normalization
  • deduplication
  • ranking
Install the UI dependencies:
pip install -r requirements.txt -r requirements-ui.txt
Start the UI:
./scripts/run-ui.sh
For the live demo:
Agentic AI [x]
AWS [x]
Kubernetes [x]

Location: Austin, Texas
Window: Next 90 days

[ Find Opportunities ]
Screenshot: insert the final Streamlit Community Scout screenshot here.
This separation is useful for demonstrations because the browser experience can evolve independently while the production AWS architecture remains unchanged.



Step 12 --- Add Safe Discovery Diagnostics

When Web Search results are dynamic, observability matters.
For example, a configured source might return no events because:
  • Web Search returned no indexed pages
  • evidence lacked an event date
  • the event was outside the date window
  • location validation failed
  • topic relevance failed
  • extraction failed
  • the event was a duplicate
Community Scout can emit INFO-level diagnostic messages prefixed with:
[DISCOVERY_DIAGNOSTIC]
Useful diagnostic fields include:
source
topic
search query
domain filter
raw result count
candidate title
candidate URL
accept/reject status
rejection reason
But logs must never include:
  • AWS credentials
  • access keys
  • session tokens
  • Authorization headers
  • SigV4 signatures
  • OAuth tokens
  • cookies
  • secrets
You can inspect Runtime logs in CloudWatch with the appropriate Runtime log group:
aws logs tail "<AGENTCORE_RUNTIME_LOG_GROUP>" \
--since 10m \
--region us-east-1



Security Choices

A demo agent still benefits from production-minded security boundaries.
Community Scout uses several:

IAM authentication

AgentCore Gateway uses AWS IAM/SigV4 authentication.

Gateway as the tool boundary

Web Search access flows through AgentCore Gateway rather than being implemented as arbitrary direct scraping from the application.

Least-privilege Runtime role

The Runtime execution role is scoped to the resources the application needs, including model invocation, Gateway invocation, observability/logging, and the Runtime code artifact.

No committed AWS credentials

AWS credentials come from the standard AWS credential chain rather than being embedded in source code.

Private deployment artifacts

The Runtime artifact bucket blocks public access and uses S3 versioning.

Credential-safe diagnostics

Discovery diagnostics expose evidence and rejection decisions, not authentication material.



Why This Is More Than a Prompt Wrapped in a UI

The most important architectural decision in Community Scout is where responsibility lives.
The LLM is good at:
  • understanding a natural-language request
  • reasoning about intent
  • orchestrating tools
But it should not be trusted to invent missing event facts.
The deterministic application layer is responsible for:
  • evidence extraction
  • date validation
  • location validation
  • topic relevance
  • normalization
  • deduplication
  • ranking
  • source URL preservation
This produces a useful separation:
LLM
Interpret + orchestrate

+

Tools
Retrieve evidence

+

Deterministic code
Validate + rank

=

Grounded result
That pattern extends far beyond event discovery.



What Kiro Contributed

Kiro was used as the engineering environment for the project rather than as a production Runtime dependency.
The project moved through:
Requirements
-> Design
-> Tasks
-> Implementation
-> Tests
-> AWS infrastructure
-> Deployment
That workflow was particularly useful for requirements that must remain true throughout implementation, such as:
Never fabricate an event.

Never use a page publication date as the event date.

Preserve source URLs.

Prefer zero verified events to unrelated results.
The result is an engineering contract that can be reviewed in the repository instead of relying only on conversational context with an AI coding assistant.



Repository Structure

The important parts of the repository are:
.
├── .kiro/
│ └── specs/
│ └── community-scout-austin/
│ ├── requirements.md
│ ├── design.md
│ ├── tasks.md
│ └── tasks.meta.json
│
├── src/
│ ├── scout.py
│ ├── config.py
│ ├── validation.py
│ ├── models/
│ │ └── events.py
│ ├── tools/
│ │ ├── agentcore_web_search_event_source.py
│ │ ├── normalizer.py
│ │ └── interface.py
│ └── pipeline/
│ ├── aggregator.py
│ ├── deduplicator.py
│ ├── ranker.py
│ └── response_generator.py
│
├── ui/
│ └── app.py
│
├── tests/
│
├── infra/
│ └── cloudformation/
│
├── scripts/
│ ├── package-runtime.sh
│ ├── deploy-runtime.sh
│ └── run-ui.sh
│
├── runtime_entrypoint.py
├── requirements.txt
└── requirements-ui.txt



Limitations

It is important to be explicit about what the system is and is not.
Community Scout currently has these limitations:
  • Web Search depends on publicly indexed evidence.
  • Source coverage varies over time.
  • A configured source is not guaranteed to appear in every result set.
  • Not every event platform or event page will necessarily be discoverable.
  • Extraction quality depends on the indexed evidence available.
  • Austin, Texas is currently the fixed MVP location.
  • Community Scout is an opportunity discovery assistant, not a comprehensive event database.
These constraints are also why evidence-grounded behavior matters.



Where I Would Take It Next

The current project focuses on technology community events in Austin.
The same architecture can expand to:
  • additional cities
  • additional public event/community sources
  • CFP and Call for Speakers discovery
  • conference opportunities
  • workshops
  • hackathon judging opportunities
  • mentoring opportunities
  • richer evidence-quality scoring
  • improved event-detail extraction
  • OpenTelemetry-based tracing and observability
  • scheduled opportunity alerts
A future query could look like:
Find open Agentic AI and cloud-native Calls for Speakers in Texas over the next six months.
Or:
Find hackathons where I can volunteer as an AI or cloud judge.
The underlying architecture does not have to change dramatically. The main changes are the discovery contract, evidence validation rules, and ranking policy.



Conclusion

Agentic applications become much more useful when model reasoning is paired with explicit evidence and deterministic guardrails.
In Community Scout:
  • Amazon Bedrock AgentCore Runtime hosts the deployed agent.
  • Strands Agents coordinates model/tool interaction.
  • Claude Sonnet 4.6 on Amazon Bedrock provides the reasoning layer.
  • AgentCore Gateway provides the secure tool boundary.
  • AgentCore Web Search retrieves public indexed evidence.
  • Python application code validates, normalizes, deduplicates, and ranks events.
  • AWS CloudFormation makes the infrastructure reproducible.
  • Kiro helps turn requirements into design, tasks, implementation, tests, and infrastructure as code.
  • Streamlit provides a thin demo UI.
The result is not simply:
Prompt -> LLM -> answer
It is:
Prompt
-> Agent
-> Tool
-> Evidence
-> Deterministic validation
-> Grounded answer
That is the pattern I would reuse for any AI discovery workflow where a verifiable answer matters more than a plausible one.



Source Code

The complete project is available on GitHub:



Author

Hastimal Jangid
Cloud, Data & AI Architect | Researcher | Technical Speaker Co-Founder, RankRabbit.AI

Series: Agentic AI (2 articles)

  1. 2
    From Prompt to Opportunity: Building an AI Community Scout with Amazon Bedrock AgentCore, Strands Agents, and Kiro This article
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