We all see emerging Agentic Infra as replacement of IaC (Infrastruture as Code) — 4 principles here are universal, I select observablity as area where we work with very large, comples, interconected, timed data structures, ideal use to demonstrate pros and cons of diferent aproaches + plus every AI project need observability so may you will learn something usefull by the way too.
HEAD 2 HEAD — 4 principles
Blueprint detailing how an AI agent harness connects to the Arize Phoenix observability platform. It maps the end-to-end execution flow, telemetry tracking spans, and architectural characteristics across four AI Harness patterns:
Agent Skills + CLI
Invocation of pre-defined agent skills through a terminal interface and shell binaries.
Pros
- Rapid Prototyping: Directly leverages standard OS binaries, custom CLI scripts, and existing terminal tools without custom protocol wrappers.
- Standardized System Telemetry: Phoenix natively captures process exit codes, stdout/stderr streams, and low-level system logs.
Cons
- Brittle Parsing: Reliant on parsing unstructured text output, which frequently breaks downstream reasoning loops.
- Expanded Attack Surface: Unrestricted command-line access carries significant command injection and sandbox-escape risks.
MCP LLM
Standard Model Context Protocol exposing JSON-RPC tool definitions into the LLM context window.
Pros
- Native Semantic Awareness: Tools are embedded directly into model context, allowing fluid multi-turn planning and dynamic schema discovery.
- Fine-Grained Prompt Observability: Phoenix tracks complete prompt/response cycles, token usage, tool invocation latency, and protocol metadata.
Cons
- Heavy Context Overhead: Loading extensive MCP tool schemas directly into prompts rapidly exhausts available context space.
- Compounding Costs: High latency and token consumption across multi-step agent reasoning chains.
MCP codemode
Sandboxed Python execution on an MCP server returning processed prompt, code, and response data.
Pros
- Token Efficiency: Processes and filters large datasets in-memory on the server, returning only curated summary data to the agent rather than raw context.
- Granular Traceability: Phoenix records execution flow, variable states, code performance benchmarks, and runtime exceptions.
Cons
- Runtime Sandboxing Complexity: Requires strict isolation boundaries (such as a restricted Python subset) to prevent unauthorized execution.
- Dynamic Debugging Friction: Code execution failures require robust runtime recovery paths to prevent the harness from stalling.
ZTA – Zero Token Architecture
Deterministic orchestration using a Python SDK or direct API calls, reporting final status back to the agent.
Pros
- Maximum Cost & Speed Efficiency: Payload movement occurs entirely outside the LLM context, virtually eliminating token overhead and latency bottlenecks.
- Deterministic Policy Governance: Strict API schemas provide tight compliance, predictable auditing, and deterministic security controls.
Cons
- Zero Adaptive Reasoning: Inflexible handling of novel edge cases; changes require programmatic code updates rather than dynamic agent adaptation.
- Higher Engineering Burden: Demands custom SDK and API pipeline maintenance rather than generic declarative agent prompts.
Part of EDU AI LAB — “Local AI is not CHEAP!”
Hey!!! Local AI is not CHEAP at ALL! — every AI token carries a cost. Metering and billing internal teams by the token is essential: it creates accountability against wasteful compute loops and directly amortizes the infrastructure, pipeline, and staffing investments. This lab contrasts & compares agentic-infra approaches on that shared stack.
Related project
- inside.cottonbox.cc — tame evil in sandbox: slim, near-invisible sandboxing that keeps AI agent swarms (MCP, tool-use, coding harnesses) from ruining your day.