Reference architecture

SuperAgent Harness & Sandboxed Execution Architecture Teardown

Production reference architecture teardown of sandboxed SuperAgent execution harnesses—analyzing Docker container isolation, declarative SKILL.md dynamic parsing, bash guardrails, and durable state persistence.

18 minVerified 2026-08-074 primary sources
A governed production AI reference architecture with observable, secured service boundaries.

Architecture

Modern autonomous agents require more than text generation—they require a SuperAgent Execution Harness: an isolated runtime environment equipped with bash terminals, code execution engines, volume persistence, and declarative skill definitions.

The SuperAgent Harness & Sandboxed Execution Architecture Teardown details how production agent harnesses (such as ByteDance DeerFlow 2.0, Anthropic Computer Use, AutoGen, and LangGraph Runtime) structure secure sandboxed execution:

Agent code generation request
AST syntax validation
Provision ephemeral Docker container
Mount volume workspace
Execute bash / python kernel
Stream execution stdout / stderr
Conceptual teaching model synthesized from:DeerFlow 2.0 SuperAgent Harness and Deep Research Runtime FrameworkLangGraph Agentic StateGraph Execution Engine RepositoryTrustworthy Agents in Practice

The control plane enforces strict process isolation, CPU/RAM resource limits, AST syntax validation, and human authorization boundaries before code execution commands reach the kernel.

Read SKILL.md file
Extract YAML frontmatter
Parse markdown step instructions
Build Pydantic / Zod tool schema
Register tool into agent context
Conceptual teaching model synthesized from:DeerFlow 2.0 SuperAgent Harness and Deep Research Runtime FrameworkLangGraph Agentic StateGraph Execution Engine RepositoryBuilding Effective AI Agents

Docker Sandbox Container Isolation Mechanics

To prevent malicious or buggy agent code from compromising host infrastructure, production agent harnesses utilize sandboxed container execution:

Sandbox Isolation Specifications:

  • Base Environment: Minimal python:3.11-slim or Alpine Linux container images stripped of administrative binaries.
  • Resource Limits: Strict cgroups v2 boundaries enforcing CPU_Limit: 2.0 Cores, RAM_Limit: 4096 MB, and read-only root filesystems.
  • Network Egress Constraints: Outbound network connections are restricted to allowlisted API endpoints, preventing unauthorized data exfiltration.
  • AST Pre-Validation: Python scripts are passed through ast.parse() to catch malformed code prior to container dispatch.

Declarative Skill Engine (SKILL.md) & Dynamic Tool Loader

Rather than hardcoding tool logic in application code, modern SuperAgent harnesses use declarative Markdown skill specifications:

---
name: deep_research_synthesizer
description: Executes multi-query web search, evidence claim extraction, and report compilation.
parameters:
  query: string
  max_sources: integer
---
  1. YAML Frontmatter Extraction: Reads structured metadata defining tool names, parameters, required inputs, and permission scopes.
  2. Markdown Body Instructions: Contains step-by-step agent instructions, edge case treatments, and prompt guidance.
  3. Dynamic Schema Building: The harness automatically converts SKILL.md frontmatter into typed Zod or Pydantic tool schemas for real-time agent registration.

SuperAgent Harness Feature Comparison Matrix

| Feature | ByteDance DeerFlow 2.0 | Anthropic Computer Use | Microsoft AutoGen | LangGraph Runtime | |---|---|---|---|---| | Control Engine | LangGraph Pregel | Custom API Loop | Conversational GroupChat | Pregel State Machine | | Execution Sandbox | Docker Container | Docker X11 Desktop | Docker / Local Python | Process / Docker | | Skill Definition | Declarative SKILL.md | API Function Definitions | Python Functions | LangChain Tools | | State Persistence | Postgres JSONPlus | Session In-Memory | Session In-Memory | Postgres / SQLite | | HITL Interrupt Gates | interrupt_before | Manual API Approval | User Input Node | interrupt_before/after |


Failure Defenses & Security Safeguards

  • Execution Timeouts: Hard 60-second timeouts on all container shell commands to terminate infinite loops.
  • Tamper-Evident Audit Logging: Every command execution request, container output payload, and operator approval token is recorded to an append-only audit log.
  • State Checkpoint Recovery: Serializing execution state supersteps to PostgreSQL ensures agent runs can recover cleanly from container crashes or host restarts.

Decisions

| Decision | Required evidence | Review trigger | |---|---|---| | Enforce Docker container isolation for all agent code execution. | Container inspection confirming cgroups CPU/RAM limits | Unconfined process execution attempt | | Parse SKILL.md specifications into typed Zod/Pydantic tool schemas. | Tool registry log showing successful schema validation | Un-typed tool invocation error | | Persist thread state to Postgres at every superstep checkpoint. | Database audit confirming CheckpointRecord storage | Process crash resulting in state loss |


Alternatives and trade-offs

Docker container isolation guarantees strict execution security but introduces container cold-start overhead per execution. Native process execution offers sub-millisecond invocation but sacrifices environment safety and resource isolation.


Failure modes

  • Agent scripts executing infinite loops or exhausting container RAM.
  • Malicious prompt injections attempting to bypass bash tool guardrails.
  • Dynamic skill parsers failing to handle un-escaped YAML frontmatter formatting.

Operational checklist

  • [ ] All code execution tools execute within isolated Docker container sandboxes.
  • [ ] Container cgroups enforce strict CPU (2.0 cores) and RAM (4GB) resource limits.
  • [ ] SKILL.md parsers validate YAML frontmatter schemas before tool registration.
  • [ ] Sensitive tool execution nodes enforce interrupt_before approval gates.

Connected practice


Sources

  • deerflow-repo
  • langgraph-repo
  • anthropic-effective-agents
  • anthropic-trustworthy-agents