{
"id": "page:agent-generate-universal-agentic-stack-layers",
"_kind": "Page",
"_file": "wiki/agent-generate/universal-agentic-stack/layers.md",
"_cluster": "wiki",
"attributes": {
"title": "Universal Agentic Stack Layers",
"displayName": "Universal Agentic Stack Layers",
"slug": "agent-generate/universal-agentic-stack/layers",
"articlePath": "wiki/agent-generate/universal-agentic-stack/layers.md",
"article": "# Universal Agentic Stack Layers\r\n\r\nDerived from `graph/stack-layers/layers`. There are no modeled nested layer nodes; responsibilities/examples/fit notes are attributes on each top-level layer.\r\n\r\n## Layer 11: Presentation\r\n\r\nThe presentation layer renders agent work to humans or downstream systems:\r\nterminal UI, CLI, web UI, IDE panel, API endpoint, JSON stream, structured\r\nevent log, or dashboard. Realized by `Presentation` instances such as TUI,\r\nCLI, web, IDE, and API surfaces.\r\n\r\n- Scope: Outermost rendering surface for humans or downstream systems.\r\n- Responsibilities:\r\n - Render prompts, transcripts, plans, tool calls, approvals, and results.\r\n - Provide human-readable and machine-readable output modes.\r\n - Own layout, accessibility, theme, streaming display, and navigation affordances.\r\n- Examples:\r\n - TUI, CLI, web app, IDE side panel, notebook/chat surface.\r\n - REST/WebSocket API, JSON stream, structured event log, dashboard.\r\n - LangGraph app UI, LangSmith trace view, custom workflow console.\r\n- Fit note: Products can be headless and still fit the stack through an API or event\r\nstream presentation. Presentation can be supplied by a host IDE/web app\r\nrather than by the agent framework itself.\r\n- Source: `graph/stack-layers/layers/layer-11-presentation.yaml`\r\n\r\n## Layer 10: Interaction\r\n\r\nThe interaction layer contains the actions exposed through an agent\r\nsurface: slash commands, keybindings, prompt controls, editor widgets,\r\nvoice or multimodal triggers, review/approve/resume gates, collaborative\r\nactions, operational triggers, and telemetry affordances. Realized by\r\n`InteractionPrimitive` nodes and related trigger/command records.\r\n\r\n- Scope: Atomic user-agent and agent-system actions exposed by a surface.\r\n- Responsibilities:\r\n - Expose commands, controls, triggers, approvals, and resumable interrupts.\r\n - Translate human/system gestures into runtime or platform actions.\r\n - Surface task state, telemetry, collaboration, and handoff controls.\r\n- Examples:\r\n - Slash commands, keybindings, prompt controls, approve/reject interrupt.\r\n - GitHub Action trigger, webhook trigger, editor widget, dashboard button.\r\n - LangGraph human-in-the-loop review, edit, approve, resume controls.\r\n- Fit note: Interaction primitives are not presentation widgets by themselves; they are\r\nthe action vocabulary that a TUI, CLI, web UI, IDE, API, or automation host\r\nrenders and invokes.\r\n- Source: `graph/stack-layers/layers/layer-10-interaction.yaml`\r\n\r\n## Layer 9: Sandbox\r\n\r\nThe sandbox layer constrains `Execution`: filesystem allow/deny lists,\r\nnetwork allow/deny lists, binary allow/deny lists, environment and secret\r\nscope, audit-log policy, and policy evaluation point (pre-call,\r\ncontinuous, or post-call attestation). Coarse posture is captured by\r\nfilesystemPolicy and networkPolicy enums. Realized by `Sandbox` nodes.\r\n\r\n- Scope: Policy-enforcement perimeter around execution and side effects.\r\n- Responsibilities:\r\n - Enforce filesystem, network, binary, secret, and environment policy.\r\n - Record audit evidence and policy decisions around side effects.\r\n - Define approval, escalation, and attestation boundaries for execution.\r\n- Examples:\r\n - Read-only filesystem, workspace-write mode, network-disabled mode.\r\n - Binary allow list, secret scope, approval-required command policy.\r\n - Container, VM, OS sandbox, or hosted policy engine.\r\n- Fit note: Custom-agent frameworks may leave sandboxing entirely to the embedding\r\nhost. Production tools should model this layer explicitly even when users\r\nonly see a simple approval prompt.\r\n- Source: `graph/stack-layers/layers/layer-9-sandbox.yaml`\r\n\r\n## Layer 8: Execution\r\n\r\nThe execution layer hosts agent-driven tool calls and shell commands:\r\nlocal process, Docker container, SSH remote, Kubernetes pod, cloud\r\nfunction, direct host, or service-side executor. Execution posture includes\r\nprocess lifecycle, signal propagation, resource limits, isolation, network\r\npolicy, filesystem access, GPU access, and concrete runtime substrate.\r\nRealized by `Execution` nodes.\r\n\r\n- Scope: Invocation environment for agent-driven tools, commands, and side effects.\r\n- Responsibilities:\r\n - Start, stream, interrupt, and stop tool/shell/process execution.\r\n - Own process lifecycle, resource limits, environment variables, and mounts.\r\n - Route side effects to local, remote, container, or hosted executors.\r\n- Examples:\r\n - Local shell, Docker, SSH remote, Kubernetes pod, GitHub Actions runner.\r\n - Browser automation worker, notebook/kernel executor, cloud function.\r\n - LangGraph tool node executing inside a host application runtime.\r\n- Fit note: Frameworks often delegate execution to user-defined tools. Hosted agent\r\nproducts may make this layer invisible but still need it for auditing and\r\npolicy mapping.\r\n- Source: `graph/stack-layers/layers/layer-8-execution.yaml`\r\n\r\n## Layer 7: Workspace\r\n\r\nThe workspace is the materialized working directory or project context the\r\nagent operates against — a git worktree, clone, symlinked overlay,\r\nIDE-managed project, mounted remote, or virtual ephemeral workspace.\r\nWorkspace posture includes materialization, storage backend, indexing,\r\ngit hooks, artifact scope, and multi-tenant policy. Realized by `Workspace` nodes.\r\n\r\n- Scope: Materialized working context the agent reads, writes, indexes, and reasons over.\r\n- Responsibilities:\r\n - Materialize project files, indexes, artifacts, and session-visible state.\r\n - Define git/worktree, mounting, overlay, and persistence behavior.\r\n - Bound what files, generated outputs, and caches belong to the agent task.\r\n- Examples:\r\n - Local repository, remote clone, IDE project, container-mounted workspace.\r\n - Git worktree, generated artifact directory, vector/code index, cache scope.\r\n - LangGraph app state when backed by project files or persisted stores.\r\n- Fit note: Some products are read-only and omit this layer. Others delegate workspace\r\nownership to an IDE, CI runner, hosted environment, or user shell.\r\n- Source: `graph/stack-layers/layers/layer-7-workspace.yaml`\r\n\r\n## Layer 6: Agent-Platform\r\n\r\nThe platform wraps one or more `AgentRuntimeImpl`s with extension,\r\ndistribution, and operator concerns: installed plugins, installed skills,\r\nnative extension formats, subagents, tool servers, channel adapters,\r\nlaunch/config registries, identity, marketplace, and update channels.\r\nRealized by `AgentPlatformImpl` instances.\r\n\r\n- Scope: Extension, distribution, launch, and ecosystem surface around runtimes.\r\n- Responsibilities:\r\n - Load installed plugins, installed skills, commands, hooks, subagents, and tool servers.\r\n - Broker capability profiles, launch profiles, identity, marketplaces, and updates.\r\n - Bridge channels such as MCP, HTTP/SSE, A2A, chat, mailbox, and gateway adapters.\r\n - Publish the platform-specific extension contract and installation scopes.\r\n- Examples:\r\n - Claude plugins/skills, Codex/Gemini/OpenCode extension packages, a5c plugins.\r\n - LangGraph Platform, LangSmith deployment, RemoteGraph, hosted graph operations.\r\n - Skill directories, plugin registries, marketplace manifests, MCP server configs.\r\n- Fit note: Installed plugins and skills belong explicitly in this layer. Products may\r\nexpose a platform without owning a model/provider, or may hide platform\r\nservices inside an IDE or hosted control plane. a5c platform is modeled as\r\na unified same-layer extension host, not a Pi wrapper.\r\n- Source: `graph/stack-layers/layers/layer-6-agent-platform.yaml`\r\n\r\n## Layer 5: Agent-Runtime\r\n\r\nThe runtime hosts an agent process around the core: built-in tools,\r\ninternal session state, tool registry, hook sockets, approval primitives,\r\nsubprocess execution posture, streaming, output guards, and runtime\r\nidentity. Realized by `AgentRuntimeImpl` instances.\r\n\r\n- Scope: Host process and operational runtime for an agent core.\r\n- Responsibilities:\r\n - Maintain internal session and transcript state.\r\n - Provide built-in tools, dynamic tool discovery, hooks, and approvals.\r\n - Manage subprocess/tool execution posture and streaming events.\r\n - Enforce runtime output, resume, and journal/event contracts.\r\n- Examples:\r\n - LangGraph checkpointer/store, thread state, interrupts, streaming runtime.\r\n - Claude Code/Codex/Gemini CLI process runtimes.\r\n - a5c unified runtime, Pi-compatible session profiles, agent-mux remote runtime.\r\n - Built-in file/shell/search tools, approval gates, session files.\r\n- Fit note: Frameworks can leave runtime to the host app; CLI products often combine\r\ncore and runtime in one binary. a5c runtime is modeled as a unified\r\nsame-layer implementation that can map Pi, Claude, Codex, LangGraph, and\r\nagent-mux runtime profiles without depending on one of them.\r\n- Source: `graph/stack-layers/layers/layer-5-agent-runtime.yaml`\r\n\r\n## Layer 4: Agent-Core\r\n\r\nThe agent-core layer drives an inference turn or graph step end-to-end:\r\nprompt/context assembly, state transition, tool dispatch, child-agent\r\nhandoff, message materialization, result synthesis, and stop detection.\r\nRealized by `AgentCoreImpl` instances.\r\n\r\n- Scope: Inner loop and graph/turn semantics for one agent brain.\r\n- Responsibilities:\r\n - Define loop, graph, or state-machine iteration semantics.\r\n - Assemble prompt/context and normalize message/state materialization.\r\n - Dispatch tools/subagents and synthesize terminal results.\r\n - Detect stops, interrupts, graph terminal states, and budget exits.\r\n- Examples:\r\n - LangGraph StateGraph, graph nodes/edges/state, create_agent routing.\r\n - Claude Code/Codex/Gemini CLI loop cores.\r\n - a5c unified core and Pi-compatible tool-use loop profiles.\r\n - Tool dispatch, stop detection, context-window handling, result envelopes.\r\n- Fit note: This is where custom agent builders fit first. A product may expose only a\r\ncore library without owning runtime, platform, workspace, or presentation.\r\na5c's core is modeled as a unified same-layer contract, not as built on top\r\nof Pi; Pi is a compatibility profile.\r\n- Source: `graph/stack-layers/layers/layer-4-agent-core.yaml`\r\n\r\n## Layer 3: Transport\r\n\r\nThe protocol and client path that carries inference requests from an\r\n`AgentCoreImpl` to a `Provider`, plus optional proxies or gateways that\r\ninterpose between them. This layer is modeled as one top-level layer; wire\r\nprotocol, client library, and proxy behavior are responsibilities/examples,\r\nnot nested layer nodes.\r\n\r\n- Scope: Wire and client path between agent core and provider.\r\n- Responsibilities:\r\n - Encode request, response, streaming, tool-call, and error payloads.\r\n - Run the in-process client or adapter that speaks the provider protocol.\r\n - Optionally route through a proxy, gateway, recorder, or policy interposer.\r\n- Examples:\r\n - OpenAI Responses, OpenAI Chat Completions, Anthropic Messages, Gemini GenerateContent.\r\n - HTTP, SSE, WebSocket, gRPC, OpenAI-compatible gateways.\r\n - LangChain chat-model adapters and transport clients.\r\n- Fit note: Custom-agent frameworks often hide transport behind model abstractions.\r\nGateway products may occupy mostly this layer while delegating core/runtime\r\nbehavior upward.\r\n- Source: `graph/stack-layers/layers/layer-3-transport.yaml`\r\n\r\n## Layer 2: Provider\r\n\r\nThe hosted-inference vendor or self-hosted serving boundary that exposes a\r\n`ModelVersion` over an endpoint. Provider posture covers auth scheme, rate\r\nlimits, regions, fine-tuning availability, and SLA — distinct from the wire\r\nprotocol (Layer 3) and the agent-side core that consumes it (Layer 4).\r\n\r\n- Scope: Hosted or self-hosted serving boundary.\r\n- Responsibilities:\r\n - Serve model versions through authenticated endpoints.\r\n - Own availability, regions, quotas, rate limits, billing, and deployment posture.\r\n - Publish provider-specific model and endpoint capabilities.\r\n- Examples:\r\n - Anthropic, OpenAI, Google, Azure OpenAI, AWS Bedrock, OpenRouter.\r\n - Self-hosted vLLM, Ollama, llama.cpp, or custom inference gateway.\r\n - Auth scheme, region, quota, rate-limit, and SLA records.\r\n- Fit note: LangChain/LangGraph apps usually choose providers through model adapters\r\nrather than owning this layer. Gateways may specialize here while leaving\r\nhigher layers to another product.\r\n- Source: `graph/stack-layers/layers/layer-2-provider.yaml`\r\n\r\n## Layer 1: Model\r\n\r\nThe trained model artifact itself — weights, tokenizer, inference graph —\r\nindependent of any provider that serves it. Concrete realizations are\r\n`ModelFamily` and `ModelVersion` nodes. Capability claims about token\r\nlimits, modalities, native tools, and reasoning posture are bound to\r\n`ModelVersion`, not to providers or transports.\r\n\r\n- Scope: Trained artifact and declared capability surface.\r\n- Responsibilities:\r\n - Preserve model family/version identity.\r\n - Declare token, modality, reasoning, tool, and output-shape capabilities.\r\n - Separate model-native behavior from provider/runtime behavior.\r\n- Examples:\r\n - Model family and version records.\r\n - Context window and output token limits.\r\n - Native tool-use, reasoning, vision, audio, and embedding support.\r\n- Fit note: Custom-agent apps may expose model choice directly or hide it behind a\r\nprovider/model configuration. Local inference collapses Model and Provider\r\noperationally, but the graph keeps them separate.\r\n- Source: `graph/stack-layers/layers/layer-1-model.yaml`\r\n",
"documents": [
"layer:1-model",
"layer:2-provider",
"layer:3-transport",
"layer:4-agent-core",
"layer:5-agent-runtime",
"layer:6-agent-platform",
"layer:7-workspace",
"layer:8-execution",
"layer:9-sandbox",
"layer:10-interaction",
"layer:11-presentation"
]
},
"outgoingEdges": [
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:1-model",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:2-provider",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:3-transport",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:4-agent-core",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:5-agent-runtime",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:6-agent-platform",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:7-workspace",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:8-execution",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:9-sandbox",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:10-interaction",
"kind": "documents"
},
{
"from": "page:agent-generate-universal-agentic-stack-layers",
"to": "layer:11-presentation",
"kind": "documents"
}
],
"incomingEdges": []
}