{"slug": "openagentcore-the-openai-agents-api-open-source-and-self-hosted", "title": "OpenAgentCore: The OpenAI Agents API, open source and self-hosted", "summary": "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.", "body_md": "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.\n\n[Website](https://openagentcore.dev/) · [Documentation](https://openagentcore.dev/docs/getting-started/) · [Quickstart](#quickstart) · [Contributing](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/CONTRIBUTING.md)\n\n**English** · [简体中文](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/README.zh-CN.md)\n\n- **Same API as OpenAI.** Set`OPENAI_BASE_URL` and the[official OpenAI SDK](https://developers.openai.com/api/docs/libraries) , or plain HTTP, works unchanged.\n- **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. See[Harness capabilities](https://openagentcore.dev/contracts/agents-api/harness-capabilities) .\n- **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 pauses idle sandboxes in place. Your own Linux, macOS or Windows machine also runs Sessions. See[Sandbox Provider protocol](https://openagentcore.dev/docs/sandbox-provider) .\n- **Replaceable parts.** Sandbox Providers, workspace filesystems, Harnesses and model providers plug in through[defined protocols](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/AGENTS.md#protocols-at-every-boundary) .\n\nInstall Core, Web and PostgreSQL on Linux or macOS with [Docker](https://openagentcore.dev/docs/getting-started/install#prerequisites):\n\n```\ncurl -fsSL https://openagentcore.dev/install.sh | bash\n```\n\nOn Windows, in PowerShell:\n\n```\nirm https://github.com/MiniMax-AI/OpenAgentCore/releases/latest/download/install.ps1 | iex\n```\n\nIn 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](https://openagentcore.dev/docs/getting-started/install) covers each step.\n\nThen 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:\n\n``` python\nfrom openai import OpenAI\n\nclient = OpenAI()  # reads OPENAI_BASE_URL and OPENAI_API_KEY\nsession = client.beta.agents.sessions.create(\n    environment={\"type\": \"openai_hosted\"},\n    input=\"Create /workspace/hello.txt with a short greeting, then describe it.\",\n    extra_body={\"agent\": {\"x_agents_core\": {\"harness\": \"codex\"}}},\n)\nprint(session.id)\n```\n\n[Run your first Session](https://openagentcore.dev/docs/getting-started/quickstart) waits for the result and reads it back.\n\nApplications and operators use these Core APIs:\n\n| API | Path | Used by | \n|---|---|---|\n| **[Agents API](https://openagentcore.dev/docs/api/public-agent-api)** | `/v1` | Your applications. Same protocol as [OpenAI's Agents API](https://developers.openai.com/api/docs/guides/agents-api/overview) | \n| **[Core API](https://openagentcore.dev/contracts/agents-api/admin-api)** | `/core/v1` | Operators, through Web | \n\nCore 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](https://openagentcore.dev/docs/architecture).\n\n| I want to | Start with | \n|---|---|\n| Install and operate an installation | [Install Core and Web](https://openagentcore.dev/docs/getting-started/install) , then[Operations](https://openagentcore.dev/docs/getting-started/operations) | \n| Build an application on the API | [Run your first Session](https://openagentcore.dev/docs/getting-started/quickstart) , then the[Agents API guide](https://openagentcore.dev/docs/api/public-agent-api) | \n| See a complete application | [Examples](https://openagentcore.dev/docs/examples) | \n| Run agents on my own machine | [Run self-hosted Sessions](https://openagentcore.dev/docs/getting-started/self-hosted) | \n| Check Harness capabilities and limits | [Harness capabilities](https://openagentcore.dev/contracts/agents-api/harness-capabilities) | \n| Understand the design | [Architecture](https://openagentcore.dev/docs/architecture) | \n| Add a sandbox, Harness or other component | [Develop OpenAgentCore](https://openagentcore.dev/docs/development) | \n\nRead [CONTRIBUTING.md](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/CONTRIBUTING.md) before changing code. Report bugs and ask questions in [GitHub Issues](https://github.com/MiniMax-AI/OpenAgentCore/issues). Released under the [MIT License](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/LICENSE).", "url": "https://wpnews.pro/news/openagentcore-the-openai-agents-api-open-source-and-self-hosted", "canonical_source": "https://github.com/MiniMax-AI/OpenAgentCore", "published_at": "2026-11-22 21:18:43+00:00", "updated_at": "2026-11-22 21:41:44.017750+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools", "agent-protocols", "ai-infrastructure"], "entities": ["MiniMax-AI", "OpenAgentCore", "OpenAI", "Codex", "Claude Code", "MiniMax Code", "E2B", "OpenSandbox"], "also_reported_by": [], "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\".", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/openagentcore-the-openai-agents-api-open-source-and-self-hosted", "markdown": "https://wpnews.pro/news/openagentcore-the-openai-agents-api-open-source-and-self-hosted.md", "text": "https://wpnews.pro/news/openagentcore-the-openai-agents-api-open-source-and-self-hosted.txt", "jsonld": "https://wpnews.pro/news/openagentcore-the-openai-agents-api-open-source-and-self-hosted.jsonld"}}