Building Observable, Debuggable, and Durable Agentic Systems with Orchestration

union · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.5 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Durable orchestration for production agentic systems

Union's talk argues that once agents move from development to production, the hard problem becomes infrastructure-aware durability: agents need secure access to organizational data and tools, variable compute, parallel sub-agent/tool execution, recovery from pod/node/network failures, preservation of context, and observability across infra, logical, semantic, tool, and context layers. Standard agent evals mostly test semantic correctness, so agents often cannot reason about infrastructure failures unless the orchestrator turns failures, resources, state, and traces into usable context.

Constraints:

Architecture

Union uses Flyte 2.0 as an orchestration substrate for observable, debuggable, and durable agents. The core building blocks are replay logs for per-run step recovery, global caching for work shared across agent runs, intermediate state persistence to object storage, task environments that specify containers/dependencies/resources/IAM, trace/durability decorators for functions, infrastructure exceptions as context, code-mode and stateless code sandboxes for self-healing, and human-in-the-loop recourse when the agent lacks context. In the Dragonfly case, a tiered ambient research architecture used agent drivers, research coordinators, researchers, and tool-layer replicas to populate a SaaS product knowledge graph over 250K products, with cross-run caching, semantic thread consolidation, checkpoint recovery, full auditability, and thousands of concurrent runs.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  agent-rollout["Agent rollout"] --> flyte-2-orchestrator["Flyte 2 orchestrator"]
  flyte-2-orchestrator --> task-environment["Task environment"]
  task-environment --> kubernetes-pod["Kubernetes pod"]
  agent-rollout --> replay-log["Replay log"]
  agent-rollout --> global-cache["Global cache"]
  agent-rollout --> intermediate-state-store["Intermediate state store"]
  kubernetes-pod --> failure-context["Failure context"]
  failure-context --> resource-provisioner["Resource provisioner"]
  failure-context --> code-sandbox["Code sandbox"]
  flyte-2-orchestrator --> human-review-ui["Human review UI"]
  flyte-2-orchestrator --> trace-store["Trace store"]
  dragonfly-agent-driver["Dragonfly agent driver"] --> dragonfly-research-coordinators["Dragonfly research coordinators"]
  dragonfly-research-coordinators --> dragonfly-researchers["Dragonfly researchers"]
  dragonfly-researchers --> dragonfly-tool-layer["Dragonfly tool layer"]
  dragonfly-research-coordinators --> global-cache
  dragonfly-tool-layer --> trace-store
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Agent rollout Long-running agent execution that may call tools, sub-agents, LLMs, training jobs, or code sandboxes. Flyte 2 orchestrator, Replay log, Global cache, Intermediate state store, Failure context
Flyte 2 orchestrator Durable, dynamic, infrastructure-aware orchestration layer for agents, classical ML, data science, and ETL. Agent rollout, Task environment, Replay log, Trace store, Human review UI
Task environment Containerized execution definition with image, dependencies, resource requests, and IAM role. Flyte 2 orchestrator, Kubernetes pod, Agent rollout
Kubernetes pod Isolated container runtime for tasks, providing resource and security boundaries. Task environment, Failure context
Replay log Per-run granular record of completed agent/tool/sub-agent steps and intermediate outputs for crash recovery. Agent rollout, Flyte 2 orchestrator, Trace store
Global cache Cross-run cache for deterministic or shareable compute, IO, research, and tool outputs. Agent rollout, Dragonfly research coordinators, Dragonfly researchers
Intermediate state store Object-store-backed persistence for agent state, LLM outputs, tool outputs, and lineage artifacts. Agent rollout, Flyte 2 orchestrator
Failure context Exceptions and infrastructure errors, such as OOMs or outages, surfaced into the agent loop as actionable context. Agent rollout, Kubernetes pod, Resource provisioner, Code sandbox
Resource provisioner Mechanism for adjusting compute requests based on failures such as out-of-memory errors. Failure context, Task environment
Code sandbox Secure code-mode or stateless sandbox where agents can write, run, test, and repair code or orchestration snippets. Agent rollout, Failure context
Human review UI Final recourse for adding context, files, directories, or instructions when the agent exhausts its budget. Flyte 2 orchestrator, Agent rollout
Trace store Audit and observability layer for LLM calls, tool calls, task state, failures, and lineage. Flyte 2 orchestrator, Replay log
Dragonfly agent driver Top tier in Dragonfly's ambient research architecture, running four replicas. Dragonfly research coordinators, Global cache
Dragonfly research coordinators Coordinator tier with eight replicas that fans out and consolidates product-research threads. Dragonfly agent driver, Dragonfly researchers, Global cache
Dragonfly researchers Researcher tier with twelve replicas that performs product research through the tool layer. Dragonfly research coordinators, Dragonfly tool layer
Dragonfly tool layer Tool execution tier with twelve replicas accessible to each researcher. Dragonfly researchers, Trace store

Data flow

An agent runs inside Flyte-managed task environments, invoking tool calls, sub-agents, LLM calls, code execution, and compute-heavy jobs. Each durable function or task records granular step state into a replay log, persists intermediate values to object storage, optionally writes deterministic work into a global cache, and emits traces. When a tool call, pod, node, spot instance, memory limit, dependency, or code path fails, the exception and infrastructure context flow back to the agent loop. The agent can resume from the failed step, increase resources, regenerate code, add dependencies in a sandbox, or request human context through the UI. In Dragonfly, top-level agent drivers coordinate researchers and tool-layer replicas; cached research and checkpointed execution prevent duplicate LLM/tool work and allow failed runs to restart without losing progress.

6 supporting quotes
“a replay log is essentially a service that records the state of an agent and its subtasks at a super granular level at each step.”transcript, stated
“So in the case of a crash, it recovers. Tool call one's done already, doesn't have to do that uh recompute it.”transcript, stated
“global caching is as the name suggests is work shared across all agents and all agent runs. So in this case you see an agent where I'm calling it with the same prompt, write a report about LLMs. It does a web search that in flight you can say I want to cache”transcript, stated
“the output of that agent state is stored just to object store in S3 or something uh somewhere, right? So you just take it out for granted. You don't need to write any of your serialization deserialization code. It's just there. You get data lineage just out”transcript, stated
“you can catch an out of memory error. You can have the agent respond to that and provision more resources based on the error in the code that it wrote. And make adjustments that are sent back from in the for loop so that the the platform can provision more”transcript, stated
“back a few seconds later, and you wouldn't lose any progress. And you have full auditability. Every single LLM call or every single tool call is traced. And so, the result is I actually onboarded them, so I helped them, and within an hour, they onboarded their local Babel”transcript, stated

Why this architecture

The design treats context engineering as an infrastructure problem. If a failure wipes agent state, the prompt and context work inside the agent loop becomes worthless, so the orchestrator must persist state, trace execution, cache deterministic work, surface infra failures, and let agents recover in-line. Plain Python gives agents and humans familiar control flow; task environments add isolation and resources; replay logs and caching make failures cheap; sandboxes let agents repair code or create new tools; and human review becomes the last resort for missing context.

5 supporting quotes
“These are like the the key ones that you need when you're initially building your agent. But context engineering is also an infra problem. If a failure wipes the agent state, then all the hard earned earned context that you've implemented in your agent loop is”transcript, stated
“If a failure wipes the agent state, then all the hard earned earned context that you've implemented in your agent loop is is worthless.”transcript, stated
“use plain Python, TypeScript, JavaScript, or whatever like general-purpose programming language that an LLM knows.”transcript, stated
“exceptions are actually a perfect delivery mechanism for critical context about failures at all layers of this of the stack.”transcript, stated
“human-in-the-loop recourse is uh ultimate recourse to uh course correct an agent when it's kind of gone off the rails.”transcript, stated

Models used: LLMs · LangChain · Cursor agents · Claude Code · Flyte 2.0 · Pydantic Monty

Scale

Alternatives considered (roads not taken)

Treat agent failures mostly as semantic or tool-call problems.

Rejected because: Union argues that agents also need to survive infrastructure, network, timeout, retry-state, and system-level failures, which standard evals often ignore.

3 supporting quotes
“bit. And I think one of the problems is that there's a context of an evaluation gap. So your your evals typically test semantic correctness. Does it answer correctly? Is it hallucinating? Are I am I is the tool call arguments formatted correctly? That kind of stuff.”transcript, stated
“agents typically focus on recover recovering from these kinds of logical and semantic failures. But agents don't often directly handle or reason about surviving a network outage or a timeout or recovering from system level errors or recalling state across”transcript, stated
“agents don't often directly handle or reason about surviving a network outage or a timeout or recovering from system level errors”transcript, stated

Aim for failure-proof agents.

Rejected because: The speaker recommends cheap failures, fast recovery, and tight feedback loops instead, because production infrastructure will fail.

“Don't aim for failure-proof, aim for cheap failures, fast recovery, and a very tight quick agent loop feedback.”transcript, stated
“What you get out of all of these building blocks is an agent with a healing factor, right? It's not perfect, it's still going to fail, it's still going to fall over, but in this case, I don't expect you to read this, but this first error was an out-of-memory error. And then the red box”transcript, stated

Use a domain-specific orchestration language for agent workflows.

Rejected because: The first principle is to use plain general-purpose languages that LLMs and humans know, avoiding DSL surprises while keeping loops, conditionals, exceptions, async, and framework choice available.

“the first one is to use plain Python and the benefits of this I think are fairly obvious. You get loops, fan out, conditionals, try except uh async synchronous programming in Python and whatever the equivalents are in whatever language you choose. There are”transcript, stated
“There are no DSL surprises. There's nothing new to learn, but if you do choose to use a framework, you can use it”transcript, stated

Recompute a whole long-running agent after a late failure.

Rejected because: Replay logs record each step and intermediate output so a crashed run can resume from the failed step instead of repeating completed tool and sub-agent calls.

3 supporting quotes
“imagine this is like a thousand steps and uh I'll I'll tell you about a case study of a customer who had you know this type of very long running agent”transcript, stated
“uh recompute it. Subagent one tool call subagent call one is done, don't need to recompute. Now then it just can pick up from tool call two. Um and so imagine this is like a thousand steps and uh I'll I'll tell you about a case study of a customer who had you know”transcript, stated
“super important because at this gives you this like fine grained micro cache per run that if there are any network or system outages that you can just take for granted that your agent is going to just going to pick up from where it left off. And this is similar to go global caching, but as opposed”transcript, stated

Expose all tool orchestration through formatted tool calls.

Rejected because: Code mode can reduce the context load of tool descriptions and argument formatting by letting the agent write sandboxed Python over a toolbox.

“you replace all the context load associated with tools and formatting tool arguments and getting the results out of that.”transcript, stated
“Write Python code that's sandboxed. So, you can't do IO, you can't do network calls, you can't do extra imports.”transcript, stated

Always build deep multi-tier agent hierarchies.

Rejected because: The speaker says Dragonfly's four tiers were special for scale; most internal use cases should start with one agent and maybe one sub-agent layer.

3 supporting quotes
“and number of agent tiers are. You you showed an example of four tiers, is that typical or That was special just because they they had a pretty scale out use case, like um and so, as you saw, it was like 200 steps, 100 100 LLM calls per software product. And that's non-deterministic,”transcript, stated
“generally, it's just an agent and a sub-agent. Like, I wouldn't go generally deeper than that. And even then, just one agent with a bunch of tools. Like, I feel like that's for for at least the internal use cases we've built, that works really well. Um”transcript, stated
“generally, I'd just start with one. Um and then one sub-agent uh layer of sub-agents. So, the the sub-agents can do different things, right? Yeah. Excellent. Let's give one more round of applause for Neews. Thank you. >> Thank you, dude. Yeah. Cheers, man.”transcript, stated

Patterns

durable-execution (orchestration)

Flyte uses replay logs, checkpointing, intermediate state persistence, and functional durability hooks so long-running agents can recover from crashes, OOMs, spot-preemption, and other infrastructure failures without recomputing completed work.

3 supporting quotes
“Uh the second design principle is providing durability and observability hooks. Then make failures cheap so that when you do fail, that your run, your agent rollout can recover really quickly and and continue where it left off without having to recompute all the other stuff.”transcript, stated
“To immediately resume an agent rollout where it left off. To share to not re-execute shareable compute and IO bound workloads.”transcript, stated
“prevents memory and context loss, even recovers from crashes in the root agent process.”transcript, stated

observability-tracing (operations)

The orchestrator traces every LLM and tool call, records task state and intermediate outputs, and turns failures into auditable context for recovery and debugging.

3 supporting quotes
“what is the orchestration stack for observable, debuggable, and durable agents.”transcript, stated
“full auditability. Every single LLM call or every single tool call is traced.”transcript, stated
“You get data lineage just out of the box. Same with your first tool call. Same with your second LLM call. So all of these under the hood in flight will be stored to uh uh your object store.”transcript, stated

semantic-caching (cost-optimization)

The system combines per-run replay caching, global cross-run caching, and Dragonfly's semantic consolidation of similar research threads to avoid duplicate work and repeated LLM calls.

3 supporting quotes
“global caching is as the name suggests is work shared across all agents and all agent runs.”transcript, stated
“they don't have to re-double pay for LLM API calls given the same research prompt.”transcript, stated
“based on some similarity semantic similarity, they would group and consolidate them so as to avoid duplicate work for the researchers.”transcript, stated

human-in-the-loop-gate (recovery)

When an agent lacks context or exhausts its max-iteration budget, Flyte can pause for a human to provide context, upload files, or give a directory before recursively continuing the agent.

3 supporting quotes
“human-in-the-loop recourse is uh ultimate recourse to uh course correct an agent when it's kind of gone off the rails.”transcript, stated
“when the agent has exhausted its max iter budget, you can just have a very Pythonic way to say, "Hey, I need more context."”transcript, stated
“you can type in whatever additional context. You can upload a new file, you can give it a a zip file of a directory”transcript, stated

tool-use-orchestration (agent-architecture)

Flyte task environments and sandboxes let agents run tools, training jobs, code snippets, imports, limited network IO, and filesystem actions under orchestrator control.

3 supporting quotes
“Uh tools and agents that require variable compute resources. So if you're building a machine learning agent, you you a single node runtime's not going to cut it.”transcript, stated
“the agent needs some way to provision its own compute like in its inner loop”transcript, stated
“you could do limited network IO, you could do limited read-writes on the file system.”transcript, stated

multi-agent-orchestration (scale-out)

Dragonfly's production architecture uses a tiered agent driver, research coordinators, researchers, and tool-layer replicas to scale ambient deep-research work over a large product graph.

3 supporting quotes
“we helped them with a kind of a tiered architecture. And so, this is this is like scaling agents, right?”transcript, stated
“at the top you have the agent driver. So, you have four replicas.”transcript, stated
“You have research coordinators that have eight replicas. You have underneath that 12 researchers. And yet underneath that are tool 12 replicas of a tool layer that each researcher has access to.”transcript, stated

fallback-degradation (resilience)

The agent recovery loop catches failures, adjusts resources, adds dependencies, regenerates code, and falls back to human context when automation can no longer self-heal.

3 supporting quotes
“Um so these are things that where the agent can fix its inner loop, which I'll show you what what I mean exactly later.”transcript, stated
“And then the red box there, it adjusted the sandbox resources, it gave itself more memory. And this error, uh it had an import for Pandas that was not specified that it did not specify in its dependencies.”transcript, stated
“it writes more code, it updates its dependency structure, and adds Pandas.”transcript, stated

Tradeoffs

Optimize for cheap failures rather than no failures.

Chose Replay logs, caching, checkpointing, and quick recovery loops over Trying to make agents failure-proof.

Rationale: Production agents will fail at multiple layers, so the useful objective is fast recovery without recomputing completed work.

3 supporting quotes
“make failures cheap so that when you do fail, that your run, your agent rollout can recover really quickly”transcript, stated
“Don't aim for failure-proof, aim for cheap failures, fast recovery, and a very tight quick agent loop feedback.”transcript, stated
“Then make failures cheap so that when you do fail, that your run, your agent rollout can recover really quickly and and continue where it left off without having to recompute all the other stuff. Um provide infrastructure as context.”transcript, stated

Use plain Python as the orchestration surface.

Chose General-purpose language constructs and framework compatibility over A new DSL with hidden semantics.

Rationale: Plain Python gives loops, fan-out, conditionals, try/except, async/sync programming, and familiar constructs for both humans and LLMs.

3 supporting quotes
“use plain Python and the benefits of this I think are fairly obvious. You get loops, fan out, conditionals, try except”transcript, stated
“There are no DSL surprises. There's nothing new to learn, but if you do choose to use a framework, you can use it, right?”transcript, stated
“Flyte 2 works with plain Python. That's just really easy to to access all the constructs”transcript, stated

Cache deterministic work but regenerate creative synthesis.

Chose Cache web search and database reads while disabling cache for the composer sub-agent over Caching every step or caching no steps.

Rationale: Research and IO can be reused, but synthesis may need fresh creativity or entropy on each run.

3 supporting quotes
“does a web search that in flight you can say I want to cache that step.”transcript, stated
“does a DB read tool, I want to cache that step, but then I want to disable it for the composer subagent”transcript, stated
“Um and so you know maybe the the AI builder says I want to inject a little bit more creativity or entropy to that last step and so each time I call it I want it to reuse the the research kind of deterministic tool calls, but then regenerate a new report each time.”transcript, stated

Use spot instances with checkpoint recovery for cost reduction.

Chose Checkpoint-based recovery on interruptible compute over Avoiding spot/preemptible infrastructure because it can disappear.

Rationale: Dragonfly could reduce costs with spot instances because checkpoint recovery made instance loss a non-issue for progress.

“they use spot instances heavily to reduce costs, and it became basically a non-issue.”transcript, stated
“Spot instances would go away, they would come back a few seconds later, and you wouldn't lose any progress.”transcript, stated

Use sandboxes for self-healing while preserving safety boundaries.

Chose Code-mode and stateless code sandboxes with constrained IO/import/network behavior over Letting agents execute arbitrary code freely or only use fixed tools.

Rationale: Sandboxes give agents enough freedom to fix orchestration/code/dependency issues and write tests, while limiting unsafe side effects.

3 supporting quotes
“secure sandboxes facilitate self-healing in that in the inner loop, the agent can fix bugs and build itself new tools as needed.”transcript, stated
“you can't do IO, you can't do network calls, you can't do extra imports.”transcript, stated
“And you can even do cool things like have it write its own unit tests, right?”transcript, stated

Gotchas (what bit them)

Semantic evals miss infrastructure failure modes.

Root cause: Evals usually test answer correctness, hallucination, and tool-call format, not network outages, timeouts, system errors, or state across retries.

Resolution: Treat infrastructure state and exceptions as context that the agent and orchestrator can reason over.

3 supporting quotes
“So your your evals typically test semantic correctness. Does it answer correctly? Is it hallucinating? Are I am I is the tool call arguments formatted correctly?”transcript, stated
“agents don't often directly handle or reason about surviving a network outage or a timeout or recovering from system level errors”transcript, stated
“exceptions are actually a perfect delivery mechanism for critical context about failures at all layers of this of the stack.”transcript, stated

Agent context is lost when the infrastructure crash wipes process state.

Root cause: The context engineered into the agent loop is held in execution state unless the orchestrator persists it.

Resolution: Persist intermediate state, replay logs, and lineage artifacts through durable hooks and object storage.

3 supporting quotes
“Then ultimately these kinds of infra failures lead to agent memory loss or corruption, and this wipes out precious context.”transcript, stated
“If a failure wipes the agent state, then all the hard earned earned context that you've implemented in your agent loop is is worthless.”transcript, stated
“save and restore uh state and memory between tasks through intermediate state persistence.”transcript, stated

Single-node runtimes create contention for compute-heavy or parallel agent work.

Root cause: ML agents may need to train models on large datasets, run parallel sub-agents, or execute tool calls that outgrow one fixed runtime.

Resolution: Let the orchestration layer provision task-specific containers, resource requests, and compute inside the agent loop.

3 supporting quotes
“if you're building a machine learning agent, you you a single node runtime's not going to cut it.”transcript, stated
“the agent may run on a small CPU box, but it's going to train a model that's loading a several gigabyte data set”transcript, stated
“if you have a single node or some like fixed set of nodes, you're going to get resource contention”transcript, stated

Tool context and argument formatting can become excessive for orchestration tasks.

Root cause: Tool-call schemas, argument formatting, and result parsing can consume context and restrict how the agent combines operations.

Resolution: Use code-mode sandboxes where the agent writes limited Python over a toolbox, reducing tool-formatting overhead.

3 supporting quotes
“you replace all the context load associated with tools and formatting tool arguments and getting the results out of that.”transcript, stated
“Write Python code that's sandboxed. So, you can't do IO, you can't do network calls, you can't do extra imports.”transcript, stated
“The orchestrator can run this code generated by the agent securely in this limited subset of Python.”transcript, stated

Four-tier agent architectures should not be copied blindly.

Root cause: Dragonfly's deep hierarchy was driven by an unusually scaled, non-deterministic research workload with duplicate thread detection needs.

Resolution: Start with one agent and at most one layer of sub-agents unless the workload demands more tiers.

3 supporting quotes
“That was special just because they they had a pretty scale out use case”transcript, stated
“generally, it's just an agent and a sub-agent. Like, I wouldn't go generally deeper than that.”transcript, stated
“Yeah, but generally, I'd just start with one. Um and then one sub-agent uh layer of sub-agents. So, the the sub-agents can do different things, right?”transcript, stated

Human context is still needed when the agent lacks the right prompt, files, or information.

Root cause: Some failures are caused by poor prompts or missing context rather than recoverable system or code errors.

Resolution: Pause for human-in-the-loop context injection after max iterations, then continue with the added context.

3 supporting quotes
“maybe the prompt is purely poorly formatted or the system prompt just uh doesn't work”transcript, stated
“the agent just does not have the context it needs to solve the task.”transcript, stated
“you recursively call the agent. So, the flights supports recursion.”transcript, stated

Evaluation

The talk argues that agent evaluation must extend beyond semantic correctness into infrastructure context, recovery behavior, traces, and failed-run feedback. Flyte traces every LLM/tool call, preserves failures as training data or inline context, and lets agents respond to infra errors such as out-of-memory by changing resources. The Dragonfly deployment reports concrete operational outcomes after adopting these durability mechanisms.

Metrics: Semantic correctness, hallucination, and tool-call argument formatting in conventional evals · Recovery from network outages, timeouts, system-level errors, and state across retries · Every LLM and tool call traced · Failure recovery time reduced by 50% · Development velocity increased by 30% · 12 hours per week saved on infrastructure maintenance · 2,000+ concurrent runs

4 supporting quotes
“your evals typically test semantic correctness. Does it answer correctly? Is it hallucinating?”transcript, stated
“failed runs become training data or additional context from the agent to learn from.”transcript, stated
“full auditability. Every single LLM call or every single tool call is traced.”transcript, stated
“Reduced their recovery failure recovery time by 50%, increased their development velocity by 30%,”transcript, stated

Outcomes

The strongest production evidence is the Dragonfly case: about 250K software products, about 200 steps and 100 LLM calls per product agent call, a four-tier replica architecture, 2,000+ concurrent runs, and measurable recovery/development/maintenance gains.

5 supporting quotes
“Flyte 2 was our move to answer the answer the question of durable, fully dynamic, crash-proof with some caveats uh infrastructure-aware uh orchestration.”transcript, stated
“within an hour, they onboarded their local Babel agent prototype into production in about an hour.”transcript, stated
“And this got them to 2,000 plus concurrent runs. And the onboarding was really because it was just Python. Just like, here's the task config, here's the decorators, and just go, do your thing.”transcript, stated
“they saved 12 hours a week on infrastructure maintenance because of this.”transcript, stated
“Spot instances would go away, they would come back a few seconds later, and you wouldn't lose any progress.”transcript, stated