OpenAI Agents API (public beta): harness, MCP, and sandboxes for a Bubble builder
A practical breakdown of the OpenAI Agents API announcement: how the managed harness, MCP, and sandboxes work, what belongs in Bubble versus the agent layer, and how to build fast MVPs.
Whenever a major AI platform launches a new developer primitive, founders and no-code builders face a familiar dilemma: should you rebuild your application logic around it, or treat it as a modular external component? On September 10, 2026, OpenAI launched the Agents API into public beta. This is neither a simple chat wrapper via the Responses API nor a self-hosted library like the Agents SDK. Instead, it moves an orchestrated, Codex-powered harness directly onto OpenAI's managed infrastructure.
For non-technical founders and creators shipping MVPs on Bubble, this release offers a clear boundary: which orchestration layers can be offloaded to an autonomous agent, and what must remain anchored in your core Bubble app.
Core Primitives of the Agents API
The architecture relies on three primary concepts:
- Agent — defines the system instructions, selected model, and attached capabilities (tools and MCP endpoints).
- Environment — the runtime sandbox. Options include
none,openai_hosted(a managed Linux container featuring a/workspacedirectory, Python, Node.js, and network policy controls), orself_hostedon custom infrastructure or partner runtimes (such as Blaxel, Cloudflare, Daytona, Modal, or Vercel). - Session — persistent execution state that tracks dialog turns, intermediate events, and subagent delegation until deleted.
Together, these components form a managed harness. OpenAI handles the execution loop, context compaction, programmatic tool calling, and multi-agent delegation natively. OpenAI charges no platform fee for the Agents API itself—billing covers standard token and tool consumption.
The Architecture Split: What Stays in Bubble vs. External Agent Layer
When validating an MVP, simplicity is paramount. You do not need to rewrite your application inside an agent loop. A clean separation of concerns works best:
- What stays in Bubble:
- User authentication, access control, and privacy rules.
- Core business data models, relational tables, and CRUD operations.
- UI presentation, user input forms, and transactional triggers (e.g., Stripe payments).
- Storing the external
session_idalongside the appropriate Bubble user or project record.

- What to offload to OpenAI's managed agent layer:
- Extended, autonomous reasoning loops (turns) that require iterative problem-solving.
- Sandboxed code execution, file processing, and document transformation in
openai_hostedenvironments. - Dynamic subagent coordination and automatic context compaction across lengthy conversations.
- Outbound connections to external APIs via public HTTP Model Context Protocol (MCP) endpoints (
connection_origin: service).
Integration Patterns: Connecting Bubble to Agents API
For a standard Bubble app without dedicated custom middleware, the integration workflow is straightforward:
- Initiate Sessions via Bubble API Connector. Configure outbound REST calls to
POST https://api.openai.com/v1/agents/sessionsusing the headerOpenAI-Beta: agents=v1and targeted API credentials (such asapi.agents.read/writeandapi.responses.write). Bubble sends the task payload and stores the returned session identifier. - Handling Asynchronous Updates. The standard API Connector only handles outbound calls. For background updates, expose a Bubble Backend API Workflow as a webhook receiver to ingest
agent.session.*events or handleaction_requiredtriggers when an agent requests custom business data. For rapid prototypes, client-side polling on the session endpoint is also a viable starting point. - Navigating MCP Constraints. When utilizing HTTP-based MCP tools configured with
connection_origin: service, OpenAI manages the handshake directly. However, tools relying onstdioor internal environment origins require a self-hosted executor. For pure Bubble apps without a custom backend proxy, stick strictly to public HTTP MCP endpoints or standard webhook callbacks.
Multi-Vendor Context and Practical Constraints
The Agents API enters a competitive landscape alongside Anthropic Claude Managed Agents (public beta since April 2026) and AWS Bedrock AgentCore. While enterprise discussions often debate portability across multi-model platforms, the fundamental rule for Bubble builders remains identical: Bubble handles user context and transactional state, while provider-managed harnesses handle deep agentic execution.
Key risks to account for in your MVP:
- Beta Lifecycle: The API operates under the
agents=v1beta tag; expect potential schema refinements and design robust error handling around API Connector calls. - Completion vs. Success: A
turn.completedstatus confirms that the agent loop finished its sequence, but does not guarantee the business task was solved without logical errors. - Data Privacy & Compliance: The current Agents API is restricted to US data residency and does not support Zero Data Retention (ZDR). Session state persists until explicitly cleared via API, which must be considered when handling sensitive customer information.
By leveraging the OpenAI Agents API alongside Bubble, solo creators can deliver sophisticated, code-executing autonomous workflows in their MVPs without maintaining bespoke backend servers or complex custom scaffolding.