惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
aimingoo的专栏
aimingoo的专栏
腾讯CDC
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
G
Google Developers Blog
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
Engineering at Meta
Engineering at Meta
博客园_首页
B
Blog RSS Feed
D
Docker
M
MIT News - Artificial intelligence
爱范儿
爱范儿
I
InfoQ

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Production AI Agents Need a Runtime Layer
SandBase AI · 2026-06-22 · via DEV Community

SandBase AI

Most AI agent demos fail in production for a boring reason: they have a framework, but not a runtime.

A framework helps an agent decide what to do next. It manages messages, tool calls, and the reasoning loop.

A runtime decides whether that agent can survive a crash, run tools safely, respect budgets, and clean itself up when the task ends.

That difference matters as soon as an agent moves beyond a short local demo.

The framework is not the runtime

Agent frameworks and agent runtimes are often treated as the same thing, but they solve different problems.

A framework usually answers questions like:

  • What is the next model call?
  • Which tool should the agent use?
  • How should messages and state flow through the graph?
  • When should the loop stop?

A runtime answers a different set of questions:

  • Where does the agent actually execute?
  • What files, network, secrets, or tools can it access?
  • What happens if the process dies halfway through a task?
  • What stops it from looping forever?
  • How do you run hundreds of agents concurrently without state leakage?

The model API will not solve this for you. It is stateless between calls. The framework usually runs inside a process you started. Production concerns live around that process.

That surrounding layer is the runtime.

Four runtime responsibilities

For production agents, the runtime layer usually has four core jobs.

Responsibility What it covers What breaks without it
Durable state Checkpoints, resume, recovery A long task restarts from zero after a crash
Isolation Sandboxed code and tool execution A prompt-injected agent reaches host resources
Resource control Timeouts, token budgets, CPU and memory limits A stuck loop burns money and compute
Lifecycle Spawn, supervise, clean up agent runs Processes leak, state crosses task boundaries

None of these are intelligence problems.

A better model can make better decisions, but it cannot guarantee process recovery, isolate untrusted code, or enforce a wall-clock timeout at the infrastructure boundary.

Durable state is usually the first failure

Agents tend to run longer than ordinary request-response applications.

A coding agent may run for ten minutes. A research agent may run for an hour. A scheduled workflow may run across many steps, tools, and retries.

The longer the task, the more likely something interrupts it:

  • a deploy
  • a worker restart
  • a network failure
  • an out-of-memory kill
  • a provider timeout

Without durable state, every interruption becomes a full restart.

Checkpointing helps, but checkpointing is only part of durable execution. Saving state is the easy part. The harder part is having a runtime that detects failure and resumes work without every application author writing custom recovery logic.

At minimum, a production agent should be able to answer:

If this process dies at step 37, where does step 38 continue from?

If the answer is "we start over," the system is still a demo.

Sandboxed execution is not optional once agents use tools

The moment an agent can run generated code, call a shell, browse the web, or modify files, the problem changes from orchestration to security.

Tool access is useful because it lets agents do real work. It is also dangerous for the same reason.

Runtime isolation should define:

  • what the agent can read
  • what it can write
  • what network access is allowed
  • which secrets are mounted
  • how long the environment lives
  • whether the environment is reused or thrown away

For simple internal tools, a lightweight boundary may be enough. For untrusted or semi-trusted code execution, stronger isolation matters. Many teams eventually move toward disposable sandboxes, containers, or microVM-style boundaries because the agent runtime needs to assume that tool inputs may be hostile.

The framework can decide whether a tool should be called.

The runtime decides what happens when that tool runs.

Resource limits are product features

Resource control sounds like infrastructure plumbing, but it directly affects user experience.

An agent that loops forever is not just inefficient. It creates:

  • unpredictable cost
  • noisy logs
  • stuck jobs
  • poor user trust
  • operational pages for the team

Production agents need hard ceilings:

  • max steps per run
  • max wall-clock time
  • token budget per task
  • CPU and memory limits
  • concurrency limits
  • cleanup rules for abandoned work

These limits should not be polite suggestions inside the prompt. They should be enforced by the runtime.

Lifecycle: the unglamorous part that keeps the system alive

Every agent run has a lifecycle.

It starts, gets an environment, receives permissions, calls tools, writes state, emits logs, finishes or fails, and then should be cleaned up.

If the runtime does not own that lifecycle, you eventually get:

  • orphaned processes
  • stale sandboxes
  • leaked files
  • confused retries
  • state shared across unrelated tasks

A good default is ephemeral execution: create a clean environment for each meaningful task, supervise it, collect traces, and destroy it when finished.

That makes failures easier to reason about and reduces the chance that one compromised or confused run affects the next one.

A practical production checklist

Before shipping an agent into production, I would ask these questions:

  • Can the agent resume after a worker restart?
  • Can it run tools without reaching host secrets?
  • Can it be stopped by budget, time, or step count?
  • Can each run be traced after the fact?
  • Can failed work be retried without duplicating side effects?
  • Can many agents run concurrently without sharing state accidentally?
  • Can a user or operator understand what happened during a run?

If the answer is mostly no, the missing piece is probably not another prompt. It is the runtime layer.

Where SandBase fits

We are building SandBase around this exact layer: agent infrastructure for developers building production AI agents.

The focus is runtime infrastructure around agent workloads:

  • sandboxed tool execution
  • model routing
  • APIs for agent applications
  • distributed compute for agent workloads
  • clearer boundaries between reasoning, tools, and execution

The thesis is simple:

Production agents need infrastructure, not just prompts.

If you are building agents that need to run tools, use compute, and operate safely outside a demo environment, the runtime layer is worth designing early.

Original version: https://www.sandbase.ai/blog/production-ai-agents-need-a-runtime-layer/