OpenAI Agents API: Hosted Codex Harness for Long-Running Cloud Agents
Melvin Vivas · X video post · 2026-09-11 · 2:17 · 617 views · Open on X
Topics: AI Agents, Tool Use & MCP, LLMOps, Deployment & Monitoring, Prompt & Context Engineering · Level: intermediate
Summary
Melvin Vivas shares OpenAI's launch video for the Agents API, now in public beta. The API gives your own apps a hosted version of the Codex harness, and OpenAI manages orchestration, sessions and context. The demo builds an incident-investigation agent. It connects tools through MCP, adds a runbook as a skill, runs in a sandbox, and uses programmatic tool calling, sub-agents and compaction to produce a root-cause report.
Key points
- Getting a long-running agent into production is hard even with a capable model. You have to connect tools, track progress, manage context, and secure and maintain the infrastructure.
- The Agents API (public beta) is a hosted Codex harness. OpenAI handles orchestration, long-running sessions and context management.
- Tools such as observability data and recent code changes connect through MCP servers. Team procedures, like an outage runbook, go to the agent as a skill.
- You choose the execution environment. The sandbox can come from OpenAI, a third-party provider or your own infrastructure.
- Programmatic tool calling lets the agent filter large data like logs in code, so fewer tokens go to raw data that wouldn't fit in the context window.
- Multi-agent orchestration splits up big tasks. For example, one sub-agent checks recent changes, another checks telemetry, and a lead agent combines their findings.
- Compaction summarizes earlier work so a single long-running session can keep going without running out of context.
- The output is a shareable report with the likely root cause, supporting evidence and suggested next steps for the on-call team.
Resources mentioned
- OpenAI Agents API · tool · developers.openai.com · paid
OpenAI's managed API for building and running cloud agents on a hosted Codex harness, with orchestration, sessions and context management built in.
Also in: OpenAI DevDay 2026 Recap: Dots, Agents API, Codex Cloud & Marketplace (Melvin Vivas on X · notes), Creator's favorite OpenAI DevDay announcements (Melvin Vivas on X · notes), OpenAI DevDay recap: Dots, GPT-6.1 Sol, Codex Cloud, Agents API (Melvin Vivas on X · notes), OpenAI DevDay 2026 Replay: Timestamped Guide to the Announcements (Melvin Vivas on X · notes) and 1 more - OpenAI Codex · tool · openai.com · paid · recommended by both Bashiri Smith & Melvin Vivas
OpenAI's coding agent. In the diagram it writes code, fixes review findings and drives the build loop. The creator also used it to make this video.
Also in: Developers moving from ChatGPT/Codex to Claude (Melvin Vivas on X · notes), Creator Opinion: Codex Is Still the Best at Computer Use (Melvin Vivas on X · notes), OpenAI Codex Ambassador applications are open (Melvin Vivas on X · notes), GPT-Live-1.1: Multilingual Voice Update for ChatGPT and Codex (Melvin Vivas on X · notes) and 264 more - Model Context Protocol (MCP) · docs · modelcontextprotocol.io · free · recommended by both Bashiri Smith & Melvin Vivas
Open standard for connecting models to tools and data sources through one interface. It turns an N×M integration problem into N+M.
Also in: Extend Grok Bot with Your Own MCP Servers and Connectors (Melvin Vivas on X · notes), AI Engineer Vocab Quiz: 11 Acronyms to Know for Interviews (Bashiri Smith on Facebook · notes), The 3 AI Engineering Skills: Generative AI, RAG, and Agentic AI (Bashiri Smith on Facebook · notes), xAI's Experimental TypeScript SDK: Grok Text, Voice, Image and Video in One SDK (Melvin Vivas on X · notes) and 11 more
Try this
- Try the Agents API (public beta) to build and run a cloud agent without maintaining your own agent infrastructure.
- Connect your agent's tools through MCP and package your team's procedures (e.g., runbooks) as skills.
- Use programmatic tool calling to filter large data like logs in code instead of passing raw data into context.
- Build an incident-investigation agent. It connects to observability data and recent code changes through MCP, follows an outage runbook skill, uses sub-agents for telemetry and code changes, and outputs a root-cause report with evidence and next steps.
- Build a 'Software Factory': agents running Codex inside sandboxes to automate software development.
More in AI Agents, Tool Use & MCP
- Building Software Factories on the OpenAI Agents API (Codex-Powered)
- Codex Astra/Luna Orchestrator Repo: Orchestrator + Subagents
- GPT-Live-1 Voice Agents in the API, and Charlie Guo
- GPT-Live-1: OpenAI's Full-Duplex Voice Model for Voice Agents in the API
- Codex Orchestrator Profiles: Astra/Sol Lead, Luna Subagents
- Coworker v0.5.0: Local Desktop Agent with Markdown Memory