## Sources

1. [Long-Running Agents](https://www.oreilly.com/radar/long-running-agents/)
2. [The AI Agents Stack (2026 Edition)](https://www.oreilly.com/radar/the-ai-agents-stack-2026-edition/)

---

### **Long-Running Agents – Addy Osmani**

**Main Arguments**
*   **Shift from Chat to Continuity:** The traditional paradigm of AI agents—a single chat window where a loop runs until the context fills or patience runs out—is being replaced by **long-running agents** that progress over days or weeks [1].
*   **Engineering vs. Modeling:** While model reasoning is improving, the primary challenge for engineers is building a **state layer** that lives outside the model's context window to handle persistence, recovery, and verification [1].
*   **Economic Phase Change:** Long-running capabilities change what is economically feasible to delegate, moving from simple tasks (summarizing a doc) to **owning entire features** or conducting month-long business operations [2, 3].

**Key Takeaways**
*   **Three Definitions of "Long":** Long-running agents involve **long-horizon reasoning** (planning over many steps), **long-running execution** (processes running for days), and **persistent agency** (an identity that accumulates memory and user preferences) [4, 5].
*   **The "Three Walls":** Most agent projects hit three common barriers: **finite context** (windows eventually fill and performance degrades), **lack of persistent state** (sessions start "blank"), and **failure of self-verification** (models are too generous when grading their own work) [6, 7].
*   **Convergent Architecture:** Major labs (Google, Anthropic, Cursor) are converging on a **Brain/Hands/Session split**, where the model (Brain) is decoupled from the execution environment (Hands) and a durable event log (Session) [8-10].

**Important Details**
*   **The Ralph Loop:** A simple practitioner method where a bash script loops through a task list (`prd.json`), executes, runs tests, and appends notes to a progress file, ensuring state lives on the filesystem rather than in the model's memory [11, 12].
*   **Anthropic’s Harness:** Uses a two-agent system where an "initializer agent" sets the environment and a "coding agent" makes incremental progress, governed by a **test ratchet** to prevent the agent from deleting failing tests to "fix" them [13].
*   **Cursor’s Multi-Role System:** Implements a **Planner/Worker/Judge** triad. Planners explore the codebase and emit tasks, Workers execute without worrying about the big picture, and Judges decide when an iteration is truly finished [14, 15].
*   **Google’s Agent Platform:** Productizes these concepts through **Memory Bank** (persistent long-term memory), **Agent Sessions** (pinned conversation history), and **Agent Runtime** (autonomous execution for days with sub-second starts) [16].
*   **Production Patterns:** Effective agents utilize **checkpoint-and-resume** to survive failures, **delegated approval** to pause execution for human input, and **fleet orchestration** to coordinate specialists [17-19].
*   **Remaining Limitations:** High **API costs** for multi-day runs, **security risks** from agents with shell access, and **alignment drift** where the original goal loses fidelity over multiple summarization cycles [20, 21].

---

### **The AI Agents Stack (2026 Edition) – Paolo Perrone**

**Main Arguments**
*   **The Agent Stack vs. the LLM Stack:** Building an agent is fundamentally different from building a chatbot; it requires **state management**, tool protocols, and autonomous reasoning loops rather than just inference and RAG [22].
*   **Standardization of Protocols:** The "protocol debate" is effectively over, with the **Model Context Protocol (MCP)** becoming the industry standard for tool connectivity [23, 24].
*   **Evaluation as the New Bottleneck:** While 89% of teams have implemented observability, only 52% have robust evals, leading to a massive gap where production quality often fails [25].

**Key Takeaways**
*   **Six Distinct Layers:** The 2026 agent stack consists of: 1) Models and Inference, 2) Protocols and Tools, 3) Memory and Knowledge, 4) Frameworks and SDKs, 5) Eval and Observability, and 6) Guardrails and Safety [26].
*   **Context Engineering:** This discipline has replaced prompt engineering as the core task, focusing on **architecting what information the agent sees** in its context window at every turn [27].
*   **State Management Complexity:** The hardest layers to manage are memory and frameworks, where state must be preserved across sessions or model provider switches [28, 29].

**Important Details**
*   **Layer 1 (Models):** Reasoning models (like o1 and Claude with extended thinking) allow agents to solve complex problems in **single calls** rather than multistep chains [30].
*   **Layer 2 (Protocols):** MCP has seen massive adoption, but security remains a concern, with a high percentage of MCP servers found prone to **code injection and path traversal** [23, 31].
*   **Layer 3 (Memory):** Memory is now tiered. **pgvector** is the default for simple needs, while **GraphRAG** (following entity relationships) is used for complex retrieval. Dedicated memory infra (e.g., Letta, Mem0) handles state across different model providers [27, 29, 32].
*   **Layer 4 (Frameworks):** Developers choose between provider-native SDKs (fast but locked), graph-based frameworks like **LangGraph** (portable but complex), or building custom thin wrappers for full control [32-34].
*   **Layer 5 (Eval):** The prototype-to-production gap is largest here. Successful teams use **multi-tier evaluation**, including fast checks on PRs, nightly LLM-judged regression suites, and continuous production monitoring [35, 36].
*   **Layer 6 (Guardrails):** Modern guardrails focus on **authorizing tool calls** and enforcing rate limits at the execution layer, rather than just filtering text outputs after the action has already been taken [37, 38].
*   **Future Outlook:** The stack is expected to **collapse** by 2027 as model providers absorb memory, tool calling, and evaluation into unified, opinionated SDKs [39].