Inspire AI: Transforming RVA Through Technology and Automation
Our mission is to cultivate AI literacy in the Greater Richmond Region through awareness, community engagement, education, and advocacy. In this podcast, we spotlight companies and individuals in the region who are pioneering the development and use of AI.
Your agent doesn’t fail when it gives a weird answer. It fails when it does the right thing twice. We start with a concrete reliability nightmare: an AI agent completes step 17 of a 30-step workflow, successfully sends an external message, and then the server crashes. When the system comes back, do we repeat the message, skip ahead, or stall forever because nobody knows what happened?
We unpack what “durable agents” really require in enterprise automation and agent-first architecture: long-running workflows that wait on events, hit rate limits, survive deployments, and pause for human approval. That means separating conversation state from workflow state, and treating business state, execution history, and operational status as durable, auditable sources of truth. A vector database can help with memory, but it cannot replace a workflow engine or an audit ledger.
From there, we lay out a practical design pattern: keep the model non-deterministic and flexible inside a deterministic process envelope that owns retries, timeouts, approvals, cancellation, and state transitions. We dig into side effects, idempotency keys, event ledgers, deduplication, and why some actions demand compensation thinking because they cannot be undone. We also tackle the messy reality of upgrades: what happens to thousands of in-flight tasks when prompts, tools, policies, or models change?
If you’re building reliable AI agents, workflow orchestration, or production-grade LLM systems, this is the blueprint for surviving the gap between “start” and “done.” Subscribe, share this with a teammate, and leave a review, what’s the most irreversible action you’d guard with durable execution?
Want to join a community of AI learners and enthusiasts? AI Ready RVA is leading the conversation and is rapidly rising as a hub for AI in the Richmond Region. Become a member and support our AI literacy initiatives.
Welcome back to Inspire AI, the podcast where we look beyond what AI can demonstrate today and ask what it takes to make these systems dependable tomorrow. In this episode within the miniseries Agent First Architecture, we're gonna take a look at agents that live for days, not seconds. And here's the scenario. An agent has a 30-step task. It completes step 17. Step 17 sends an external message and the message succeeds. Oh, then the server crashes. When the agent comes back, what happens? Does the agent remember? Does it repeat? Step 17? Does the customer receive the same message twice? Does the workflow resume on step 18 all by itself? Does anybody even know where the task was? Welcome to Durable Agents. Many agent demos follow a simple loop. Send something to the model, the model decides what to do, call a tool, return the result, ask the model what to do next. Repeat. That can be perfectly reasonable for short-lived tasks. But enterprise workflows aren't always short. They wait. They fail. They cross services. They require approval. They depend on events. They survive deployments. They encounter rate limits. Rate limits are system configurations to prevent high volume, unexpected volume from impacting the performance of the system. And sometimes these processes can last for days. At that point, the agent loop itself cannot be the system of record. Think
about the workflow state. Think about conversation state. Let's consider conversation state for a second. What that means is the system at any given point knows what has been said. Now compare that to workflow state. Workflow state answers the question, what has happened? And those aren't the same. Because you may have a conversation where the last statement was we should send the customer a message. Workflow state would need to know, was the message authorized? Was it actually sent? Did the external provider accept it? Are we waiting for a reply? When does the timeout expire? What happens if the customer never responds? All of that is operational state and it belongs somewhere durable. Here's a useful mental model to consider to separate agent state into categories. There's a lot of different types of states. You have a business state, which is the authoritative state of the enterprise. It's in authority over orders or cases, accounts, or transactions. Then you have the workflow state that tells us where the long-running process currently sits. Like I said before about that when I walked you through it before. The execution history records what steps and transitions occurred. And then, of course, the conversation state preserves the relevant interaction context and has a semantic memory that supports retrieval of useful knowledge, right? Putting all those into agent memory is architecturally tempting, but operationally dangerous. A vector database is not a workflow engine. I'm taking a mental note there, by the way. And a conversation transcript is not an agent audit ledger. Nothing about the model context is durable enterprise state. You need a deterministic envelope.
Here's a pattern I've found most useful to think through. Put non-deterministic intelligence, basically an agent, inside a deterministic process envelope. The model can decide which hypothesis should I investigate, which tools should I use? What should I recommend? But the deterministic workflow infrastructure manages the retries, the timeouts, the waiting, the approval, the cancellation, state transitions, and the completion of all of that. That gives the agent room to reason without asking probabilistic software to provide guarantees because you'll never get them. It's not designed to do
that. You might be thinking to yourself, well, the side effects are where things are getting hard, right? Suppose an agent analyzes something twice. It's probably fine. Suppose it retries the same record twice. Probably okay too. Suppose it sends the same payment twice. Whoop, whoop, whoop, nope, not okay. Durable systems need to distinguish computation from side effects. When an external side effect occurs, the platform needs enough information to determine whether it already happened. That's why idempotency keys, what that means, it's a unique value generated by a client sending a request so that repeating the same request produces the same result as sending it once. It prevents duplicate actions, like charging your credit card twice when a network times out or retries have to happen. Along with the keys, you have the event ledgers, deduplication, and transactional boundaries that are super, super important here. You want to make sure certain things happen exactly once. In distributed systems, the practical question is usually how do we ensure retries don't create an unacceptable duplicate effect? That's an engineering problem that most technical people are very familiar with.
But there are certain operations that simply cannot be undone. You can't unsend an email to an external customer. You can't make someone unknow information. You can't always reverse an external transaction perfectly. So agent-first workflows need compensation thinking. If step 17 can't be reversed, what corrective action is possible? Maybe the workflow sends a correction. Maybe it creates an escalation. Maybe it restores business state while preserving the immutable record of what happened. Compensation isn't pretending the first action never happened. It's defining how the system recovers when reality has already changed. Humans
should be the asynchronous dependencies. Their approval is another reason durable execution matters. Imagine an agent reaches a high-risk action at 457 on a Friday afternoon. Policy says a human must approve it, so what should happen? The process shouldn't keep the application server alive all weekend, but it should persist its state, the state being waiting for approval. Then stop consuming active compute. You don't want these agents sitting there waiting for the approval. Then on Monday morning, approval arrives from the human as an event. That's what triggers the workflow to resume. And that's a fundamental different model from a synchronous response request application. And it's probably much closer to how meaningful enterprise agents will actually operate. What
about during upgrades? We all go through them, whether you're clicking OK to have your work laptop install the latest updates, or you're managing the latest Python version for your application. These are pretty interesting problems if you think about it. You've got an agent and you're deploying a new version. Let's say it's version 18 of that agent. What do you do about the 20,000 tasks that are still running under version 17? What version resumes them? What happens if prompts change? What if tool schemas changed? What if policy changed? What if the model changed? Gosh, that's exhausting. Long-lived autonomy introduces software versioning questions we usually associate with durable workflows and distributed systems, not chatbots. Which is exactly the point. Production agents eventually become distributed systems problems. You need to design for interruption. A mature agent platform should assume the tasks can be paused, resumed, canceled, rejected, retried, escalated, reassigned, etc. etc. And of course, take into consideration the other failed states, because that will happen too. And those states need to be explicit. If the only status your agent has is running, you're missing the operational reality there. If your agent could become an irreversible action, ask this. What happens if the process crashes one millisecond after the action succeeds? If you don't have a satisfying answer, there's an architectural problem to solve. The system, not the prompt, not the model. AI engineering is becoming increasingly positioned on top of decades of lessons from distributed
systems. And we can't replace those lessons. We actually need to rediscover why they exist. Think about that. Because next episode, we'll explore what happens when all the machinery works perfectly and the agent still makes the wrong decision. You know it's gonna happen. It's probabilistic. And it goes without saying that uptime doesn't equal correctness anymore. So until next time, stay curious, keep innovating, and build agents that can survive the messy reality between starting a task and actually finishing it.