Zenaique

Flashcard: what is an 'agent runtime' and what does it do?

Flashcard·Easy·4.0 · 0·~30s·Asked atGoldman SachsStability AiTurbopuffer
Attempt it
TL;DR

The agent runtime is the deterministic code around the LLM that drives the loop, executes tools, manages state, enforces budgets, and emits traces. LangGraph, CrewAI, AutoGen, and the OpenAI Agents SDK are runtimes.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture a chess engine paired with a robot arm. The engine picks the move, but the arm is what actually slides the piece across the board, hits the clock, and writes down the move on the scoresheet. The engine alone is just numbers on a screen; the arm alone has no idea what to play. The agent runtime is the robot arm and the scoresheet and the clock and the rulebook, all rolled into one. The LLM only ever says what should happen next. The runtime is the part that actually makes it happen, keeps notes, watches the time, and decides when the game is over. Frameworks like LangGraph and CrewAI ship as ready-made runtimes so you do not have to build the arm yourself.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

The agent runtime is the most under-appreciated half of an LLM agent. People talk about the model that powers the agent: Claude Opus 4.7, GPT-5.5, Gemini 3.1 Pro. But every reliable agent in production also has a runtime around the model, and most of the engineering work that makes the agent actually work happens there.

This deep dive defines what a runtime is, walks through the five responsibilities it owns, contrasts the popular 2026 frameworks by how they express those responsibilities, and explains why putting work in the runtime versus the prompt is a recurring engineering tradeoff. By the end, the line between the model's job and the runtime's job should be clear enough to apply when reading any agent codebase or framework documentation.

What the runtime actually is

The runtime is the deterministic code around the LLM that turns model calls into agent behavior. The model alone produces text and forgets between calls. The runtime is everything that makes those text outputs add up to a multi-step task being completed: the loop, the tool execution, the state, the budgets, and the traces.

Mechanically, the runtime is a function (or service) you call with a task description. Internally it builds a prompt, calls the model, inspects the response, decides what to do next, and repeats until a stopping condition fires. You can write a 50-line runtime by hand for a toy use case; production runtimes are thousands of lines and often a separate service with its own database for persistent memory.

The phrase orchestration layer captures the runtime's role. It orchestrates the model, the tool functions, the memory store, and the observability backend into a coherent system. The model is one component among several, and the runtime is what connects them in the right order with the right safety controls.

Responsibility one: the loop
Responsibility two: state and memory
Responsibility three: tools, trust, and stopping conditions
The 2026 framework landscape
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • LangGraph: the runtime is a typed state graph; you declare nodes for the model and each tool, and the framework drives the loop with explicit edges and recursion limits.
  • CrewAI: the runtime coordinates multiple role-playing agents (planner, researcher, writer) with built-in delegation and shared memory.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QIf the model is stateless across calls, how does an agent remember what it did three turns ago?
A

The runtime accumulates the transcript and rebuilds the context window each turn, optionally summarizing or storing older observations in a side store and re-injecting only relevant slices.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Calling the runtime 'just glue' or 'plumbing'. The runtime owns budgets, state, retries, validation, and observability; most agent reliability work happens in the harness, not the prompt.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • List the five things a runtime owns: loop, tool registry, state, stopping conditions, observability.

  • Explain why the model cannot enforce its own budgets or remember state across calls.

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
What is the Model Context Protocol (MCP) and what problem does it solve?
MCQ·Easy