cd /news/ai-agents/openagentcore-the-openai-agents-api-… · home › topics › ai-agents › article
[ARTICLE · art-174334] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

OpenAgentCore: The OpenAI Agents API, open source and self-hosted

MiniMax-AI released OpenAgentCore, an open-source, self-hosted implementation of the OpenAI Agents API that runs Codex, Claude Code or MiniMax Code sessions through the official OpenAI SDK by pointing OPENAI_BASE_URL at a local Core endpoint. The project installs Core, Web and PostgreSQL via a curl script on Linux or macOS or a PowerShell script on Windows, and plugs in replaceable Sandbox Providers, workspace filesystems, Harnesses and model providers through defined protocols, including microsandbox, E2B and OpenSandbox. It matters because developers can run agent sessions on their own machines and models while keeping the same API protocol as OpenAI's hosted Agents API.

key takeaway

Setting OPENAI_BASE_URL to a self-hosted Core endpoint (https://core.example/v1) and OPENAI_API_KEY to a Project API key lets the unmodified official OpenAI SDK create agent sessions, with the harness selected via extra_body agent.x_agents_core.harness such as "codex".

read2 min views2 publishedNov 22, 2026
OpenAgentCore: The OpenAI Agents API, open source and self-hosted
Image: Michielbdejong (auto-discovered)

The OpenAI Agents API, open source and self-hosted. Run Codex, Claude Code or MiniMax Code on your own machines with your own models, through the official OpenAI SDK.

Website · Documentation · Quickstart · Contributing

English · 简体中文

  • Same API as OpenAI. SetOPENAI_BASE_URL and theofficial OpenAI SDK , or plain HTTP, works unchanged.
  • Your agent, your model. Each Session runs Codex, Claude Code or MiniMax Code natively, as it runs on your machine, with the model provider you configure. SeeHarness capabilities .
  • Compute that sleeps, workspaces that stay. On microsandbox, which keeps every workspace on independent storage, idle sandboxes release compute and resume on a compatible node with their files intact. E2B s idle sandboxes in place. Your own Linux, macOS or Windows machine also runs Sessions. SeeSandbox Provider protocol .
  • Replaceable parts. Sandbox Providers, workspace filesystems, Harnesses and model providers plug in throughdefined protocols .

Install Core, Web and PostgreSQL on Linux or macOS with Docker:

curl -fsSL https://openagentcore.dev/install.sh | bash

On Windows, in PowerShell:

irm https://github.com/MiniMax-AI/OpenAgentCore/releases/latest/download/install.ps1 | iex

In Web, sign in with the Core key the installer prints, configure the public address, set a default model, issue a Project API key and add sandbox capacity (a node, E2B or OpenSandbox). Install Core and Web covers each step.

Then call it with the OpenAI SDK, with OPENAI_BASE_URL set to your API base URL (https://core.example/v1) and OPENAI_API_KEY to the Project API key:

from openai import OpenAI

client = OpenAI()  # reads OPENAI_BASE_URL and OPENAI_API_KEY
session = client.beta.agents.sessions.create(
    environment={"type": "openai_hosted"},
    input="Create /workspace/hello.txt with a short greeting, then describe it.",
    extra_body={"agent": {"x_agents_core": {"harness": "codex"}}},
)
print(session.id)

Run your first Session waits for the result and reads it back.

Applications and operators use these Core APIs:

API Path Used by
Agents API /v1 Your applications. Same protocol as OpenAI's Agents API
Core API /core/v1 Operators, through Web

Core keeps durable execution state. The Runtime runs the chosen Harness inside the Environment. Each connection is a defined protocol, so any part can be replaced on its own. See Architecture.

I want to Start with
Install and operate an installation Install Core and Web , thenOperations
Build an application on the API Run your first Session , then theAgents API guide
See a complete application Examples
Run agents on my own machine Run self-hosted Sessions
Check Harness capabilities and limits Harness capabilities
Understand the design Architecture
Add a sandbox, Harness or other component Develop OpenAgentCore

Read CONTRIBUTING.md before changing code. Report bugs and ask questions in GitHub Issues. Released under the MIT License.

── more in #ai-agents 4 stories · sorted by recency
── more on @minimax-ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/openagentcore-the-op…] indexed:0 read:2min 2026-11-22 · —