The agent infrastructure layer has consolidated from a sprawl of point tools into a recognizable production stack of named primitives and now includes a mature authentication and session management layer: AgentCookie synchronizes browser sessions between a daily Mac and a dedicated MacMini agent machine via Tailscale peer-to-peer sync, solving the problem of agents waking up logged out of services — compatible with OpenClaw, Hermes, and other runtimes. Agent debugging has formalized as a medical-diagnosis model: treat bugs as organ failures, not model failures — identify whether gbrain (memory), OpenClaw (approvals/actions), or trajectory bundles (self-check) failed, and AI hallucinations diagnosed as "confabulation" unlock targeted fixes. The original stack still anchors the layer:: Pipecat (sub-200ms voice), browser-use (web navigation), Mem0 (persistent cross-session memory), Composio (OAuth across 1,000+ apps, one-click integration), RAGFlow (layout-aware retrieval), Dify (visual workflow building), with Mastra as the TypeScript-first framework (1.77M monthly npm downloads, YC). Firecrawl has become the default web-search layer, auto-pairing with Browserbase to select scraping vs. full browser interaction per task; Browserbase now also distributes researched web-agent skills, and anti-detection browsers like Camofox push browser automation down to spoofed browser/runtime properties. Around these primitives sit observability and routing infrastructure — OpenClaw Studio (self-hosted dashboards, approval gates, cron) and smart routers (ClawRouter scoring requests across 14 dimensions in <1ms, cutting blended cost from $75/M to $3.17/M).
Cost architecture is foundational: 80% of agent tasks are janitorial and don't need frontier intelligence, so hierarchical model routing by complexity (the 80/15/5 routine/moderate/hard distribution) yields ~10x cost reduction; accessibility-tree browser output and local self-improvement plugins extend that cost discipline into runtime behavior. Memory is a distinct context form: the "napkin" scratchpad (not session history, not static plans) plus self-logging of mistakes produces compounding improvement by session five, and claude-smart turns those corrections into explicit reusable rules across projects. Configuration is converging on three files for articulate agents — SOUL.md (brutally specific constitution), USER.md (~4000-word user model), AGENTS.md (operational rules) — because generic instructions revert output to ChatGPT. Underneath, MCP is becoming the survival-level integration protocol for tool vendors, autoswarm/Hyperspace platforms generalize Karpathy's autoresearch loop, remote-device/Tailscale networks give agents durable execution surfaces, and BitNet 1-bit LLMs signal viable local inference on commodity hardware. The Cross-Cutting Patterns from the parent topic are preserved at the end of this file as the canonical synthesis index across all sub-topics.