AWS Partner Network (APN) Blog
How Temporal uses Amazon Bedrock AgentCore to create robust AI systems
By: Ruskin Dantra, Sr. Solutions Architect – AWS
By: Shun Mao, Sr. Solutions Architect – AWS
By: Justin Lim, Sr. Solutions Architect – AWS
By: Cornelia Davis, Sr. Staff Developer Advocate – Temporal
![]() |
| Temporal Technologies |
![]() |
Building durable, resilient, distributed systems has always been a challenge. When building traditional distributed systems, you must implement retry logic, circuit breakers, timeout handlers, and complex state machines to handle network failures and service outages gracefully. You often need to write more lines of code to handle these error conditions than for business logic.Agentic AI amplifies these challenges dramatically. Modern AI applications are increasingly running for extended periods of time, coordinating multiple specialized agents, each calling external systems and producing non-deterministic outputs. Where internet-based applications might have historically depended on dozens or hundreds of downstream service invocations, agents serving a user need today regularly involve an order of magnitude more calls over the network. Add human in the loop (HITL) approvals, extended reasoning chains spanning hours or days, and the need to preserve conversation history across failures, and traditional error handling approaches become unmaintainable.
In a previous blog post we covered how Temporal offers durable execution for distributed architectures. In this post, we demonstrate how Temporal integrates with Amazon Bedrock AgentCore to make your agentic workflows durable, resilient, and production ready.
Agentic AI and the durability challenge
Agentic workflows follow a common architecture practice centered around an agentic loop. Each of these agents requires many external calls to different services and systems, and like any distributed system, you need to implement robust error handling and retry mechanisms for these interactions. Your developers must manage dozens of potential failure points when implementing an agent. Moreover, modern AI applications rarely rely on a single agent for a complex business problem. For instance, a financial advisory system might orchestrate a budget analyzer, investment strategist, tax optimizer, and risk assessor. A supply chain application could coordinate demand forecasters, inventory managers, supplier negotiators, and logistics planners. This further increases the likelihood that there will be some failure that needs to be handled during a single customer interaction.
Traditional solutions require developers to write thousands of lines of defensive code: retry logic with exponential backoff, state management to track progress, timeout handlers, circuit breakers, and recovery mechanisms. In this post, we look at how Temporal helps by improving developer velocity and providing production-grade reliability to complex agentic workflow development.
Durable agentic workflows with Temporal
AgentCore is an agentic platform where developers can build, scale and operate AI agents without the need for infrastructure management. Let’s consider the following agentic use case without Temporal where you have created a multi-agent financial advisory system as shown in the following figure:
Figure 1: Multi-agent financial advisory system architecture
In the preceding diagram, each of the agents – the budget, financial analysis and the orchestrator agents – operate in a continuous cycle in which they reason, select tools, execute actions, and respond. Each consists of three core components: the model (reasoning engine), the tools (external capabilities) and the agent (agentic loop). AgentCore provides built-in resilience for agent execution. For complex multi-agent workflows involving multiple coordination points, HITL, approvals, and long-running processes, you can use workflow orchestration tools like Temporal to simplify state management and coordination. Let’s consider the same workload, now with Temporal. Your agentic orchestration logic can be managed by a Temporal workflow. In a multi-agent financial advisory system, the orchestrator agent’s workflow might look like this:
- Receive user request: “Help me plan for retirement”
- Invoke the model to reason about the request
- Delegate to the budget agent (activity: analyze current finances)
- Interact with the user to take in additional input
- Delegate to the investment agent (activity: evaluate portfolio options)
- Delegate to the tax optimizer agent (activity: identify tax-advantaged strategies)
- Synthesize the results and return a comprehensive recommendation
Figure 2: Multi-agent financial advisory system architecture with Temporal
The workflow coordinates the agent’s reasoning cycle: invoke the model to analyze the user’s request, determine which tools (or agents) to call, execute those tools (or agents), feed results back to the model for continued reasoning, and ultimately return a response. Temporal orchestrates the workflow—managing retries, pauses, human interactions, and state persistence—while AgentCore makes sure the agents themselves are trustworthy, compliance-aligned, and consistently available. Temporal activities facilitate durability through event sourcing, persisting each workflow step as an immutable event so that completed actions aren’t re-executed. Large language model (LLM) invocations, in addition to the budget and financial analysis agents, are wrapped in Temporal activities. If the LLM is being rate limited, for example, Temporal will manage retries, even taking hints from the model API response to control the retry cycle. As the workflow executes, Temporal tracks progress and automatically preserves results from the LLM and the agent invocations, allowing the workflow to pick up where it left off in the event the process is halted. Resulting in no reissuing of tokens or unexpectedly different outcomes from the LLM in these recovery scenarios. When HITL approval is needed, the combination of Temporal and AgentCore will optimize resource utilization (including freeing compute resources entirely) while waiting as long as necessary for a response from the human. When approval arrives, the workflow state is restored, and the process resumes exactly where it paused. The combination of AI optimized infrastructure management from AgentCore and application management from Temporal means companies can handle millions of complex, high-stakes, long-running workflows with confidence, knowing that failures won’t compromise security, compliance, or user experience.
Customer story
A leading global consumer packaged goods company adopted AgentCore and Temporal to modernize its AI-powered marketing and supply chain workflows. Previously, the company faced challenges with unreliable custom-built state machines and queue-based architectures that struggled to handle millions of transactions and asynchronous interactions. By integrating AgentCore secure runtime with Temporal’s workflow orchestration, the company standardized processes like real-time promotions, loyalty program management, and supply chain automation. This resulted in a 66% reduction in backend costs compared to third-party solutions, improved operational resilience, and the ability to process millions of events monthly with full auditability and observability. The architecture now supports rapid onboarding of new use cases and global scalability while also supporting compliance and governance.
Conclusion
Amazon Bedrock AgentCore powers intelligent agents at scale. Temporal makes it more straightforward to make sure those agents deliver results with enterprise-grade durability. Together, they bridge the gap between AI reasoning and reliable production systems—transforming experimental agents into mission-critical infrastructure. Get started by exploring AgentCore plus Temporal samples. You can also check out Temporal on AWS Marketplace and deepen your understanding through other tutorials and demos.
Temporal – AWS Partner Spotlight
Temporal is an AWS Advanced Technology Partner that offers a robust workflow orchestration solution. The platform delivers increased value to customers through its durable execution framework, which ensures consistency and automatically recovers from system failures.


