Building INTERLOCK with AWS: What I Learned About Reliable AI Agents
How we used Amazon Bedrock and AWS serverless services to help AI agents work safely with shared data.
The problem: When AI agents work on the same task
AI agents are increasingly being used to automate workflows, write code, analyze information, and make decisions.
But what happens when multiple agents are working with the same information at the same time?
Imagine two AI agents managing a shared task. The first agent reads the current information and starts planning its next action. While it’s still reasoning, another agent updates that information.
The first agent may now act on outdated data without realizing anything has changed.
Traditional concurrency mechanisms can detect these conflicts, but they often require an operation to be retried. For AI agents, that can mean repeating expensive model calls and discarding useful reasoning.
This challenge inspired us to build INTERLOCK, a system designed to help AI agents coordinate changes to shared information without unnecessarily repeating work.
Introducing INTERLOCK
INTERLOCK acts as a coordination layer between AI agents and the shared data they work with.
Rather than treating every change as a reason to restart an agent’s work, INTERLOCK examines whether the change actually affects the agent’s plan.
For example, imagine an agent preparing an update to a support ticket while another agent modifies a related record.
If the change doesn’t affect the first agent’s decision, its work can continue. If it does, the system can identify which parts need to be reconsidered.
The idea is simple:
Detect changes → Understand their impact → Preserve valid work → Reconsider affected steps
This approach aims to reduce unnecessary retries while maintaining data consistency.
We designed INTERLOCK to work alongside existing agent frameworks rather than requiring developers to replace their models or applications.
How we used AWS to build INTERLOCK
We wanted an architecture that could support AI-assisted decision-making while remaining scalable, asynchronous, and cost-conscious.
AWS provided the foundation for that design.
Amazon Bedrock: Reasoning about conflicts
We used Amazon Bedrock to access foundation models for situations where determining the impact of a change requires more than a simple comparison.
Not every change needs AI reasoning. Some conflicts can be resolved using existing data relationships and deterministic checks.
For more ambiguous situations, Bedrock helps assess whether an agent’s plan may need to be reconsidered.
We also used Amazon Titan embeddings to represent information semantically, allowing the system to identify potentially related plans even when they don’t reference identical records.
One of our key design decisions was to use AI where it adds value, not simply because it’s available.
AWS Lambda: Running the application logic
AWS Lambda powers the serverless application logic behind INTERLOCK.
It allowed us to implement API operations and background processing without managing dedicated application servers.
This was particularly useful for a project where workloads can vary depending on how many agents are active and how frequently shared information changes.
Amazon SQS and EventBridge: Handling work asynchronously
We used Amazon Simple Queue Service (SQS) and Amazon EventBridge to coordinate background processing.
When an event requires further evaluation, the system can process it asynchronously instead of making every operation wait for an AI model response.
This separation helped us think more carefully about responsiveness, workload management, and reliability.
Amazon CloudFront and Amazon S3: Delivering the application
We used Amazon S3 and Amazon CloudFront to host and deliver the application’s frontend.
Together, they provided a straightforward way to make the project accessible through a public web interface.
Amazon CloudWatch and AWS Budgets: Visibility and cost awareness
We also incorporated Amazon CloudWatch for operational logging and AWS Budgets for cost monitoring.
This was especially important because AI workloads introduce a different cost consideration from traditional application requests: every unnecessary model invocation can increase token consumption.
What we learned while building it
Building INTERLOCK challenged several assumptions we initially had about AI agent systems.
Get Arpita Madhukar Kalburgi’s stories in your inbox
Join Medium for free to get updates from this writer.
1. Not every problem needs an LLM call.
One of our most important lessons was that deterministic checks should handle straightforward cases before involving a foundation model.
AI reasoning is valuable when the relationship between changes and decisions is ambiguous, but calling a model unnecessarily can increase latency and cost.
2. Parallel execution isn’t automatically more efficient.
Running multiple agents simultaneously sounds faster, but conflicts and repeated work can cancel out those gains.
We learned that the real question isn’t simply how many agents can run at once. It’s how much useful work the system preserves when those agents interact.
3. Asynchronous architecture requires careful coordination.
Using Lambda, SQS, and EventBridge helped us separate immediate operations from background evaluation.
It also reinforced the importance of designing workflows that can safely handle repeated events and recover from interruptions.
4. Cost efficiency is an architectural decision.
Working with Amazon Bedrock made us more conscious of when model inference is actually necessary.
Sometimes a simple validation step is more effective than an additional AI call. The goal is to use the model where its reasoning adds meaningful value.
5. Testing realistic scenarios matters.
We discovered that a system can appear to work correctly during simple tests while behaving differently under concurrent workloads.
That experience reinforced the importance of testing how components interact, rather than validating each service independently.
The outcome
By the end of the project, we had built a working INTERLOCK prototype that demonstrates how AI agents can coordinate around shared information.
The system combines deterministic validation, semantic analysis, and selective AI reasoning to identify potentially affected work.
We also developed a public demonstration where developers can explore the concept.
One important finding was that the approach isn’t equally beneficial for every workload.
When an agent’s reasoning is inexpensive, restarting the task may be simpler. But when an agent has already performed substantial reasoning, preserving unaffected work can become more valuable.
Understanding that trade-off was one of the most useful outcomes of the project.
What’s next?
There are several directions we’d like to explore further, including improving how the system identifies dependencies between agent decisions, reducing the cost of conflict evaluation, and making integration easier for developers using different agent frameworks.
The broader goal is to make multi-agent applications more reliable as they become part of everyday software workflows.
Final thoughts
Building INTERLOCK gave us an opportunity to explore how AWS services can support a challenge that’s becoming increasingly relevant in agentic AI: coordinating multiple intelligent systems that operate on shared information.
The biggest lesson was that building reliable AI applications involves more than choosing a capable foundation model.
It requires careful decisions about state management, concurrency, asynchronous processing, cost, and when AI reasoning is genuinely necessary.
Amazon Bedrock, Lambda, SQS, EventBridge, and other AWS services helped us bring these ideas together into a working prototype.
If you’re building multi-agent applications, I’d be interested to hear how you handle concurrent updates and avoid unnecessary repeated work.
I’m learning while I’m building.
AWS resources
- Amazon Bedrock
- AWS Lambda
- Amazon SQS
- Amazon EventBridge
- Amazon CloudWatch
- Amazon CloudFront
- AWS Serverless
Tags: AWS, Amazon Bedrock, Agentic AI, Multi-Agent Systems, Serverless, AWS Lambda, Generative AI








