> your AI agent picks dependencies from memory; give it dated facts — try starlog.dev ↗ vet your agent's deps ↗ vibe-coding is fine. vibe-importing isn’t. — try starlog.dev ↗ vibe-importing isn’t fine ↗ your agent has never seen your private packages — try starlog.dev ↗ facts for private packages ↗ a linter for the dependencies your AI agent picks — try starlog.dev ↗ a linter for agent deps ↗ whois is redacted, cdns mask the rest — get the real operator — try whoisgeni.us ↗ who really runs that domain ↗ domain attribution that shows its work — full evidence chain — try whoisgeni.us ↗ domain intel w/ evidence ↗

← Back to Articles

Exo: The AI Agent Runtime That Treats Claude and Codex as Swappable Interpreters

[ View on GitHub ]

Exo: The AI Agent Runtime That Treats Claude and Codex as Swappable Interpreters

Hook

Most AI agent frameworks try to build the perfect agent loop. Exo took the opposite bet: what if the loop itself should be swappable infrastructure, not application logic?

Context

The AI agent ecosystem has a lock-in problem. Build on OpenAI's Agents API and you're married to GPT models. Use Claude's computer control features and you can't easily migrate. Frameworks like LangChain or LangGraph give you control but require building everything from scratch—conversation persistence, credential management, execution sandboxing. You end up with thousands of lines of infrastructure code before writing your first business logic.

Exo emerged from a different architectural intuition: proprietary agent loops like Claude Code and OpenAI Codex aren't competitors to replace, they're runtime environments to orchestrate. Instead of building yet another agent framework, Exo provides a harness abstraction layer that treats these systems as interchangeable interpreters. It handles the unglamorous but critical problems—durable conversation state, credential flow, network policies, sandbox boundaries—while letting you switch between Codex, Claude Code, or custom harnesses without rewriting your agents. The repository description mentions 'fully recursive self-evolution,' but that's legacy from an abandoned experiment. The actual value is much more pragmatic: production-grade multi-harness infrastructure.

Technical Insight

Load Config

Route Tools

Substitute Secrets

Delegate

Delegate

Delegate

Tool Invocations

Tool Invocations

Tool Invocations

Persist Events

Replay/Fork

Enforce Policy

Agent Definition

Markdown + YAML

Credential Vault

Exo Runtime

Rust Core

Harness Interface

Codex Harness

Claude Code Harness

Pi Harness

Event Store

Sourced Persistence

Infrastructure Layer

Sandboxes + Network

System architecture — auto-generated

Exo's architecture has three distinct layers that enforce separation of concerns. Agent definitions live in markdown files with YAML frontmatter—deliberately minimal configuration rather than a DSL. Here's what an agent definition looks like:

---
name: code-reviewer
harness: claude-code
tools:
  - github_api
  - slack_notify
credentials:
  - github_token
  - slack_webhook
network_policy: allow_github_slack
---

You are a code reviewer. When a PR is opened:
1. Fetch the diff using the GitHub API
2. Analyze for security issues and style violations
3. Post results to Slack

The harness layer is where it gets interesting. Rather than embedding Claude or Codex as libraries, Exo treats them as black-box interpreters behind a common interface. When you invoke a harness, Exo doesn't control context window management, token limits, or model selection—that's the harness's job. What Exo does control is tool invocation routing, credential substitution, and event persistence. This is a fundamental trade-off: you lose fine-grained control over prompt engineering and context manipulation, but you gain the ability to swap harnesses without touching agent code.

The persistence layer uses event sourcing to maintain conversation durability. Every harness interaction—user message, tool invocation, model response—becomes an immutable event in the log. This means conversations survive crashes, can be replayed for debugging, or forked into alternate timelines. The implementation maps heterogeneous semantics from different harnesses (Codex's completion events vs Claude's message turns) into a unified event model, which creates ongoing maintenance burden when APIs change but provides deployment flexibility.

Credential management happens through runtime substitution at the infrastructure layer. Your agent definition references github_token as a symbolic name. At runtime, Exo's vault performs the substitution based on the execution context—which tenant is running the agent, what environment it's in, what network policies apply. This enables zero-trust deployments where agents access production APIs without the harness itself holding tokens:

// Simplified credential flow in Exo
struct CredentialVault {
    store: HashMap<String, Secret>,
    policies: Vec<NetworkPolicy>,
}

impl CredentialVault {
    fn resolve(&self, agent_id: &str, cred_name: &str) -> Result<Secret> {
        let policy = self.policies.iter()
            .find(|p| p.applies_to(agent_id))
            .ok_or(PolicyError::NoMatch)?;
        
        if !policy.allows_credential(cred_name) {
            return Err(PolicyError::Forbidden);
        }
        
        self.store.get(cred_name)
            .cloned()
            .ok_or(VaultError::NotFound)
    }
}

Network policies are enforced at the sandbox boundary rather than within harnesses. You define policies declaratively—allow_github_slack permits outbound HTTPS to github.com and slack.com but blocks everything else. This provides defense-in-depth against prompt injection attacks that try to exfiltrate data, without requiring harness modifications or trust in model behavior.

The harness abstraction itself is a Rust trait that wraps different agent loops. To add support for a new harness, you implement Execute, GetState, and RestoreState methods. The interface is deliberately narrow—Exo doesn't try to expose every harness-specific feature, just the common operations needed for stateful, long-running agents. This creates lowest-common-denominator pressure, but it's an explicit trade-off for portability.

Gotcha

The repository description promises 'fully recursive, able to safely edit all aspects of itself at runtime.' That's not true. There's an archive section referencing a self-evolution experiment that was abandoned. The current version has no self-modification capability—it's a runtime for existing harnesses, not a recursive agent that rewrites its own code. This is probably the right decision (recursive self-modification is research territory, not production infrastructure), but the description is misleading.

The harness abstraction creates an ongoing tax. When Claude Code adds a new capability—say, improved artifact handling or multi-file editing—Exo can't expose it until someone extends the abstraction layer. You're always lagging behind native harness features, and if you need cutting-edge capabilities, you'll be frustrated. The dual Rust/TypeScript implementation suggests architectural tensions that increase contribution friction. Event lifecycle modeling for proprietary APIs means you're vulnerable to breaking changes from OpenAI or Anthropic—every API update requires manual intervention to remap events. For local development and prototyping, the credential vault and network policies add setup complexity you don't need yet.

Verdict

Use if: You're deploying production AI agents where customers demand model flexibility, you're building multi-tenant SaaS where different users run agents on different harnesses, you need stateful conversations that survive crashes and reconnects, or vendor lock-in is an architectural dealbreaker. Exo's harness abstraction is genuinely novel and solves a real problem for teams running agents-as-a-service at scale. Skip if: You're prototyping (the operational overhead isn't justified), you need cutting-edge harness features like Claude's latest artifacts API (abstraction lags native support), you believed the self-evolution claim in the description (that experiment was abandoned), or you're building custom agents from scratch where Pi or LangGraph give you more control with less infrastructure baggage. For most teams, start with vendor-hosted solutions like OpenAI Agents API and only reach for Exo when lock-in becomes painful enough to justify the complexity.