# OpenAI: Shell + Skills + Compaction: Tips For Long-Running Agents That Do Real Work

Source: https://www.youtube.com/watch?v=mkvG_8h3-4U
Recap page: https://rapidrecap.app/video/mkvG_8h3-4U
Generated: 2026-02-13T13:35:29.243+00:00

---
## Quick Overview

The paper by Charlie Guo introduces a shift from traditional single-turn chatbot interactions to more robust long-running agents, proposing a novel architecture incorporating three core primitives: Shell, Skills, and Compaction, to manage state, enable complex actions, and maintain efficiency over extended operational periods.

**Key Points:**
- The paper signals a transition from the current chatbot era to more robust, long-running agents capable of real work.
- The proposed architecture relies on three primitives: Shell (for environment interaction), Skills (for specific procedures), and Compaction (for memory management).
- The 'Skill' primitive defines procedures that models execute on demand, contrasting with stuffing instructions into a single system prompt.
- The 'Compaction' mechanism acts as a garbage collection and memory management system, preventing the context window from growing indefinitely and mitigating potential hallucinations.
- Glean reported a 20% drop in execution time and a 14% gain in quality when implementing skill-based routing compared to prompt-only methods.
- The paper warns against combining skills with open network access due to security risks (data exfiltration) and suggests explicitly defining execution boundaries for agents.

![Screenshot at 00:16: The introduction of the paper's core components: Shell, Skills, and Compaction, which form the framework for creating more durable and capable long-running AI agents.](https://ss.rapidrecap.app/screens/mkvG_8h3-4U/00-00-16.jpg)

**Context:** The discussion centers on a technical paper by Charlie Guo, detailing an evolution in AI agent design moving beyond simple, single-turn conversational models to persistent agents capable of executing multi-step, long-running tasks. The core concept revolves around structuring agent capabilities using Shell, Skills, and Compaction to manage state, memory, and execution flow efficiently for real-world applications.

## Detailed Analysis

The video analyzes a paper that argues the industry is moving past the initial chatbot era toward more robust, long-running agents that can perform sustained work. This shift requires a new architectural approach based on three primitives: Shell, Skills, and Compaction. The Shell manages the execution environment, allowing agents to interact with the outside world (like a terminal or the internet) but only when explicitly permitted, preventing unauthorized actions. Skills are defined as procedures or functions that the model executes on demand, rather than embedding large instruction sets directly into the system prompt, which helps prevent prompt drift and hallucination. Compaction serves as the memory management and garbage collection system, ensuring that the agent's conversational history (memory wall) does not grow infinitely, thereby keeping performance high. A key finding highlighted from Glean's case study is that implementing skill-based routing resulted in a 20% reduction in time and a 14% improvement in quality compared to prompt-only methods. The paper also strongly advises against granting agents both skill execution capabilities and open network access simultaneously due to significant security risks like data exfiltration. Finally, the paper suggests that clearly defining the boundaries of what an agent can do—both in terms of what it should execute and what it should not—is crucial for reliable, long-horizon task completion.

### The New Agent Paradigm

- Shifting from single-turn chatbots to long-running agents capable of real work
- Driven by three primitives: Shell, Skills, and Compaction
- Signifies a major industry shift away from prompt engineering dominance.

### The Three Primitives

- Shell handles environment access and execution boundaries
- Skills define procedures executed on demand, preventing prompt stuffing
- Compaction manages memory to maintain efficiency and prevent context overflow.

### Practical Implementation & Results

- Glean saw a 20% speed increase and 14% quality gain by using skill-based routing over prompt-only methods
- Skill descriptions must be precise (e.g., 'write a report' vs. 'write a marketing brochure').

### Security and Reliability Concerns

- Combining skills with open network access is a high-risk combination, potentially leading to data exfiltration
- Agents must be explicitly told what they cannot do (e.g., write to disk, access the internet for specific tasks).

### Structuring Agent Logic

- The paper emphasizes moving from vague instructions to modular, reusable procedures (Skills) contained within a secure execution environment (Shell).

![Screenshot at 00:16: An animated graphic illustrating the concept of an agent podcast overlayed with a call to 'Become a Member Today!'](https://ss.rapidrecap.app/screens/mkvG_8h3-4U/00-00-16.jpg)
![Screenshot at 00:45: Visual representation of the three core primitives: Shell, Skills, and Compaction, which form the basis of the new agent architecture.](https://ss.rapidrecap.app/screens/mkvG_8h3-4U/00-00-45.jpg)
![Screenshot at 01:28: The speaker outlines the three core concepts: Skills, Shell, and Compaction, emphasizing their role in building robust agents.](https://ss.rapidrecap.app/screens/mkvG_8h3-4U/00-01-28.jpg)
![Screenshot at 02:11: A visual showing an Open AI hosted container or local runtime environment for running agents.](https://ss.rapidrecap.app/screens/mkvG_8h3-4U/00-02-11.jpg)
![Screenshot at 05:55: A comparison between the old method \(manual instructions\) and the new method \(structured skills\) for agent execution.](https://ss.rapidrecap.app/screens/mkvG_8h3-4U/00-05-55.jpg)
