Contents · 10 sections↓
- 01What is an agentic runtime?
- 02What does an AI agent runtime do?
- 03How is an agent runtime different from a framework, a workflow engine or a hosting platform?
- 04When do you need an agentic runtime (and when don't you)?
- 05What does an agent runtime look like in code?
- 06How do you choose an agent runtime?
- 07Common mistakes with agent runtimes
- 08Limitations
- 09Frequently asked questions
- 10Next steps
An agentic runtime is the layer that keeps AI agents running after the demo: it starts them, wakes them on schedules and events, keeps their state, restarts them when they fail, and stops them when they overspend. This page is for developers deciding how to run agents in production. It defines the term, breaks a runtime into its parts, compares it with agent frameworks, workflow engines and hosting platforms, and ends with a small runnable example built on the Promptise Agent Runtime.
What is an agentic runtime?
An agentic runtime (also called an AI agent runtime or agentic AI runtime) is the software that runs AI agents as long-lived, supervised processes. A framework gives you one agent run: prompt in, tool calls, answer out. A runtime wraps that run in a process with a lifecycle, starts runs from triggers such as cron schedules and webhooks, keeps state between runs, records what happened so it can recover after a crash, enforces budgets and health checks, and exposes an API to inspect and control the agent while it runs.
Key takeaways:
A runtime runs agents. A framework builds them. You usually need both, and some products bundle the two.
The core parts are the same everywhere: lifecycle, triggers, state, durability, governance, observability and a control API.
Durability comes in two depths. Some runtimes checkpoint state between runs. Workflow engines replay each step of a run.
Hosting platforms are managed runtimes. They run your agent in their cloud, so you trade control for less operations work.
You don't need one for every agent. A chat endpoint that answers one request at a time is fine with a framework and a web server.
[02]
What does an AI agent runtime do?
A runtime sits between the outside world and the agent loop. Events come in, the runtime decides whether and when the agent runs, and everything the agent does passes through the runtime's limits and records:
triggers runtime outside world
──────── ─────── ─────────────
cron 0 * * * * ──┐ ┌──────────────────────────────────────────┐
webhook POST ────┼──▶ │ queue ──▶ governance ──▶ agent run │ ──▶ tools / MCP servers
file change ─────┤ │ budget, health, (model + tool │ ──▶ models
event / message ─┘ │ approvals loop) │
│ │
│ lifecycle: created ▶ running ⇄ suspended │
│ ▶ stopped / failed ▶ restart │
│ state + memory journal + checkpoints │
└──────────────────────────────────────────┘
▲ │
control API ──────┘ └──▶ logs, traces, dashboards
(start, stop, patch, ask)Each part solves a problem that a single agent call can't.
Process lifecycle
A runtime treats each agent as a process with states such as running, suspended, stopped and failed. You can suspend an agent during an incident without losing its queue, resume it later, and see at a glance which agents are healthy. A good runtime also puts a time limit on each run and restarts a process that keeps failing, with a backoff and a cap, so a permanent fault ends in a clear failed state. See pausing and resuming an agent and auto-restart with backoff.
Triggers
An autonomous agent starts work when something happens, not when someone types. Triggers turn the outside world into agent runs: a cron schedule, a signed webhook, a new file, an event from another agent. The runtime queues the events, filters out the ones that don't need a model call, and controls how many runs happen at once. It also decides what happens to events that fail: retry them, or keep them in a dead-letter list for a person to look at.
State and memory
An agent that runs every hour needs to remember things between runs: which incidents are open, which items it already handled, what an operator told it. A runtime gives each agent a state store, often a key-value context with an audit trail, plus optional long-term memory and conversation history. State is not chat history: many scheduled agents should start each run with a clean conversation and read only the state they need. See AI agent state between runs.
Durable execution and recovery
Processes die: deploys, out-of-memory kills, reclaimed machines. Durable execution means the agent's progress survives that. A runtime journals what happened and checkpoints its state, so a restarted process continues instead of starting over. Recovery alone doesn't prevent duplicates: if a crash hits between a side effect and its record, the step runs again, so tools that change the world need idempotency keys. Durable AI agents and crash recovery covers both halves.
Governance: budgets, health and approvals
An unattended agent can loop, overspend or do something nobody approved. Governance is the set of limits the runtime enforces regardless of what the model decides: budgets on tool calls, model turns and cost per run and per day; health monitoring that spots stuck calls, loops, empty answers and rising error rates; human approval for risky actions; and scoped secrets that expire. The runtime can log, pause or escalate when a limit is hit.
Observability
When an agent runs at 03:00, the record of the run is all you get. A runtime records state transitions, trigger events, results, tool calls and errors, so you can rebuild the timeline the next morning. Traces of model and tool calls complete the picture, as described in AI agent observability.
A control API
Agents that run for days need to be managed without a redeploy: stop one, raise its budget, change its instructions, send it a message, read its journal. A control API maps those actions to authenticated HTTP routes for operators, scripts and dashboards. See the AI agent control API.
[03]
How is an agent runtime different from a framework, a workflow engine or a hosting platform?
The terms overlap, and vendors use them loosely. The useful question is what each layer guarantees.
Agent framework | Agentic runtime | Durable workflow engine | Agent hosting platform | |
|---|---|---|---|---|
What it is | A library that runs the model and tool loop | A process manager for long-lived agents | A general system that makes code survive failures | A managed cloud service that runs agents |
Examples | LangChain, OpenAI Agents SDK, Pydantic AI, CrewAI | Promptise Agent Runtime; LangGraph, as LangChain describes it | Temporal, Restate, DBOS | LangSmith Deployment, Google's Agent Runtime, Amazon Bedrock AgentCore Runtime |
Unit of work | One run | A process that lives for days | A workflow of recorded steps | A deployment, session or run |
Starts work | Your code calls it | Triggers: cron, webhooks, files, events, messages | Your code starts a workflow | An API call to the platform |
Durability | None by default | State checkpoints, restarts | Step-level replay | Depends on the platform |
Where it runs | Your process | Your process or server | Your workers, plus a server (Temporal, Restate) or a database (DBOS) | The vendor's cloud |
Agent framework vs agent runtime
A framework defines the agent: instructions, tools, the loop, memory and handoffs. It doesn't decide when the agent runs, what happens when the process dies, or how much it may spend in a day. LangChain's Harrison Chase draws the same line in Agent frameworks, runtimes and harnesses: a runtime is the infrastructure layer for running agents in production, with durable execution as its main property, and LangGraph can be read as both. For the framework side, see what is an agent framework?
Agent runtime vs durable workflow engine
Workflow engines make any code durable by recording each step and replaying the workflow after a crash, so finished steps don't run again. Temporal runs an OpenAI Agents SDK agent inside a workflow and wraps tools as activities. Restate journals every LLM call and tool execution, so recovery doesn't fetch responses again or repeat side effects that finished. DBOS is a library in your process that checkpoints workflows and steps to Postgres, with no separate orchestration server.
That step-level durability is stronger than a runtime that checkpoints between runs. If a 40-minute run crashes at minute 39, a workflow engine resumes near minute 39. What a workflow engine doesn't give you is the agent-specific layer: triggers aimed at agents, behavioral health checks, token and cost budgets, an inbox for messages to a running agent. You build those yourself, or combine the two. Every option still needs idempotent steps, because a step interrupted mid-run is retried.
Agent runtime vs agent hosting platform
Hosting platforms are managed runtimes. LangSmith Deployment, formerly LangGraph Platform, describes itself as a workflow orchestration runtime for agent workloads, with durable execution, streaming and horizontal scaling, in LangChain's cloud, hybrid or self-hosted. Google renamed Vertex AI Agent Engine to Agent Runtime on April 22, 2026, as part of the Gemini Enterprise Agent Platform, and added long-running operations of up to 7 days. Amazon Bedrock AgentCore Runtime runs each session in an isolated microVM for up to 8 hours, with separate services for memory, gateways, identity, policy and observability. AWS says it works with any open-source framework, such as LangGraph, CrewAI or the OpenAI Agents SDK.
These platforms beat a self-run runtime when you want no servers to operate, strong isolation per session, and the cloud provider's identity and compliance features. The trade-offs are lock-in, per-use pricing, and the platform's limits on session length and triggers.
[04]
When do you need an agentic runtime (and when don't you)?
You need a runtime when nobody is waiting for the agent:
It runs on a schedule or reacts to events, such as nightly reports or alert triage.
It keeps state across runs and must not lose it on a deploy.
It must survive crashes without repeating payments, emails or tickets.
It needs limits per day, not only per request.
Operators must pause, inspect or reconfigure it while it runs.
Several agents work together and need one place to start, stop and watch them. See running multiple AI agents.
You probably don't need one when:
The agent answers a request and is done, as in a chat app. A framework inside your web server is enough.
The job runs once a day and can simply be rerun. An OS scheduler such as a Kubernetes CronJob can start a script.
You already run a workflow engine. Make the agent call a step, and add budgets and health checks around it.
You want no infrastructure at all. A hosting platform is the runtime, operated by someone else.
[05]
What does an agent runtime look like in code?
Here is a small agent runtime built with the Promptise Agent Runtime (promptise>=1.4.3). One AgentProcess triages alerts. It wakes on a signed webhook and an hourly cron schedule, uses a small MCP tool server, keeps an on_call value in its state, journals each run, and has a budget and health checks. The script sends one alert the way a monitoring system would, reads the answer from the journal, then suspends and stops the process.
The tool server, ops_server.py:
"""A tiny MCP tool server the agent uses: disk usage per host."""
from promptise.mcp.server import MCPServer
server = MCPServer(name="ops")
DISKS = {"db-1": 97, "web-1": 41}
@server.tool(read_only_hint=True)
async def disk_usage(host: str) -> dict:
"""Return the disk usage of a host in percent."""
return {"host": host, "used_percent": DISKS.get(host)}
if __name__ == "__main__":
server.run() # stdioThe agent process, triage_agent.py:
"""A minimal agent runtime: one long-running agent with triggers, state, a journal and limits."""
import asyncio
import hashlib
import hmac
import json
import sys
import urllib.request
from promptise.config import StdioServerSpec
from promptise.runtime import (
AgentProcess,
BudgetConfig,
ContextConfig,
HealthConfig,
JournalConfig,
ProcessConfig,
TriggerConfig,
)
from promptise.runtime.journal import FileJournal
SECRET = "dev-only-secret" # load from a secret store in production
config = ProcessConfig(
model="openai:gpt-5-mini",
instructions=(
"You triage infrastructure alerts. Check the host with your tools, then answer in one "
"line: severity (low or high), the evidence, and who to page (the on_call state key)."
),
servers={"ops": StdioServerSpec(command=sys.executable, args=["ops_server.py"])},
triggers=[
TriggerConfig(type="webhook", webhook_path="/alerts", webhook_port=9191, hmac_secret=SECRET),
TriggerConfig(type="cron", cron_expression="0 * * * *"), # and an hourly sweep
],
context=ContextConfig(initial_state={"on_call": "anna"}, conversation_history=False),
journal=JournalConfig(level="checkpoint", path=".promptise/journal"),
budget=BudgetConfig(enabled=True, max_tool_calls_per_run=5, max_runs_per_day=200),
health=HealthConfig(enabled=True, on_anomaly="log"),
restart_policy="on_failure",
max_invocation_time=120,
)
def post_alert(body: dict) -> str:
"""Send a signed webhook, as a monitoring system would."""
data = json.dumps(body).encode()
signature = "sha256=" + hmac.new(SECRET.encode(), data, hashlib.sha256).hexdigest()
request = urllib.request.Request(
"http://127.0.0.1:9191/alerts", data=data, method="POST",
headers={"Content-Type": "application/json", "X-Webhook-Signature": signature},
)
with urllib.request.urlopen(request) as response:
return f"{response.status} {response.read().decode()}"
async def main() -> None:
process = AgentProcess("alert-triage", config)
await process.start()
print("state:", process.state.value)
print("webhook:", await asyncio.to_thread(post_alert, {"alert": "disk almost full", "host": "db-1"}))
while process.status()["invocation_count"] < 1:
await asyncio.sleep(0.5)
journal = FileJournal(".promptise/journal")
entries = await journal.read("alert-triage")
result = [e for e in entries if e.entry_type == "invocation_result"][-1]
print("answer:", result.data["response"])
status = process.status()
left = {k: v for k, v in status["budget"].items() if v is not None}
print("runs:", status["invocation_count"], "| budget left:", left)
await process.suspend()
print("state:", process.state.value)
await process.resume()
await process.stop()
print("state:", process.state.value)
print("journal:", sorted({e.entry_type for e in await journal.read("alert-triage")}))
checkpoint = await journal.last_checkpoint("alert-triage") # what a restart resumes from
print("checkpoint state:", checkpoint["context_state"])
asyncio.run(main())Run it with OPENAI_API_KEY set (pip install "promptise>=1.4.3", then python triage_agent.py). Real output from one run:
state: running
webhook: 202 {"status": "accepted", "event_id": "5d128ef5-b82b-4556-9029-07212c0cc880"}
answer: high, disk usage 97% on db-1, page anna
runs: 1 | budget left: {'tool_calls_run': 4, 'runs_day': 199}
state: suspended
state: stopped
journal: ['checkpoint', 'invocation_result', 'state_transition']
checkpoint state: {'on_call': 'anna'}Each line maps to a part of the runtime:
Triggers: the webhook answered 202 accepted at once and queued the event, so a slow model call can't make the sender time out. The cron trigger would fire at the top of the hour.
State: the agent read on_call from its context and paged anna.
Governance: one tool call of the five allowed per run was used, and one run of the 200 allowed per day.
Lifecycle: running, suspended, stopped. While suspended, triggers keep firing and events wait in the queue.
Durability: the journal holds state transitions, the run's result and a checkpoint of the state. After a crash, ReplayEngine(journal).recover("alert-triage") rebuilds that state for the next process.
To run several agents like this one with a control API, put them in an AgentRuntime and serve it with OrchestrationAPI. The autonomous agent runtime guide builds a governed agent step by step, and the runtime docs cover every option.
[06]
How do you choose an agent runtime?
Ask every option the same questions, whether you build, self-host or buy:
Durability: does only state survive a crash, or also progress inside a run?
Triggers: can schedules, signed webhooks, files and messages start a run?
Limits: which budgets exist per run and per day, and what happens when one is hit?
Control: can you change a running agent without a redeploy, through an authenticated API?
Records: does every run leave a journal or trace you can search?
Fit: where does it run, how long may a run last, and which frameworks and models does it accept?
[07]
Common mistakes with agent runtimes
Symptom | Cause | Fix |
|---|---|---|
The agent repeats a refund or email after a restart | Recovery reran a step whose side effect had already happened | Give side-effecting tools idempotency keys |
Ticks or events pile up and run late | Runs take longer than the trigger interval | Limit concurrency, drop stale events with a filter, or skip ticks while one waits |
A loop runs all night | Limits exist per request only, or not at all | Set budgets per run and per day, and turn on health checks |
State is lost on every deploy | State lives in process memory only | Journal checkpoints and recover on start, or keep state in a database |
Anyone on the network can steer the agent | An unsigned webhook or an open control API | Require signatures and tokens, bind to localhost, put TLS in front |
Nobody notices the agent stopped | The process failed after its last restart, with no alert | Alert on the failed state and watch a health endpoint |
[08]
Limitations
The Promptise Agent Runtime is a library you run yourself. Its journal checkpoints state after each run, so a run cut off halfway starts again rather than resuming mid-run. For step-level replay of long runs, Temporal, Restate or DBOS are stronger. Recovery is explicit: your start-up code calls ReplayEngine and seeds the new process. Changes made through the control API live in memory until you put them in your config. It doesn't isolate each session in its own microVM, and if you want zero operations work, a hosting platform is the better fit.
[09]
Frequently asked questions
What is agent runtime in AI?
An agent runtime is the layer that runs an AI agent in production. It handles when the agent runs (triggers), what it remembers between runs (state), what happens when it crashes (journals and recovery), what it may spend (budgets) and how people control it (an API). The agent's reasoning comes from the model and the framework. The runtime keeps it running safely over time.
What is the difference between an agentic runtime and an agent framework?
A framework builds and runs one agent invocation: prompt, tools, loop, answer. An agentic runtime manages agents over time: it starts runs from schedules and events, keeps state across them, recovers from crashes and enforces limits. Some products blur the line, such as LangGraph, which LangChain describes as a runtime that powers its framework. In practice you use a framework inside a runtime.
What is durable AI agent execution?
Durable execution means an agent's progress survives a crash or restart. The runtime records progress in a journal or database and, after a failure, continues from the last recorded point instead of starting over. Workflow engines such as Temporal, Restate and DBOS do this per step. Lighter runtimes checkpoint state between runs. Either way, tools with side effects need idempotency keys, because an interrupted step can run twice.
Do I need Temporal to run AI agents?
No. Temporal is a strong choice when you already run it, or when long runs must resume mid-run after a crash. Many agents run in minutes and only need state checkpoints, restarts, triggers and budgets, which an agent runtime provides in your own process. You can also combine them: run the agent inside a workflow and keep agent-specific limits around it.
What is an autonomous runtime environment for AI agents?
It is a runtime that lets agents act without a person starting each run. Agents wake on schedules, webhooks, file changes or messages, use their tools, and keep working across days. Because nobody watches each run, the environment must enforce budgets, detect loops, require approval for risky actions and keep an audit trail.
Is Amazon Bedrock AgentCore an agentic runtime?
AgentCore Runtime is a managed agent runtime. AWS hosts your agent, built with the framework of your choice, and runs each session in an isolated microVM for up to 8 hours. Memory, gateways, identity, policy and observability are separate AgentCore services. It suits teams on AWS who want no servers to run. Check its session limits against how long your agent's work takes.
[10]
Next steps
Build a governed autonomous agent step by step: autonomous AI agent runtime.
Make an agent survive crashes without duplicate side effects: durable AI agents and crash recovery.
Wake an agent on a schedule or an HTTP call: cron schedules and webhook triggers.
Put limits on what an unattended agent can spend: AI agent cost control.
Read the reference: the Agent Runtime docs and the agentic runtime tutorial.
Further reading in the runtime series: