OpenAgentCore

module
v0.0.12-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: MIT

README

OpenAgentCore

An open-source, self-hosted implementation of the OpenAI Agents API with multiple native Harnesses.

Website · Install · Call the API · Documentation · Contributing

English · 简体中文 · 日本語

What it is

OpenAgentCore runs AI agents on your own infrastructure behind the OpenAI Agents API.

How it fits together

OpenAgentCore architecture

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 the architecture guide.

Screenshots

Overview Agent metrics
Deployment overview Agent metrics

Install

On Linux or macOS with Docker configured:

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

Windows PowerShell:

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

Then:

  1. Sign in to Web, the admin console, with the Core key the installer created, and configure the domain and HTTPS.
  2. Set a default model and issue a Project API key.
  3. Add execution capacity: a node, E2B, or your own machine.
  4. Run your first Session with the OpenAI SDK.

The installation guide covers each step, HTTPS and a quick local trial. Listen addresses, ports and other options: installation options.

Documentation

I want to Start with
Install and operate an installation Installation, then operations
Build an application on the API Quickstart, then the Agents API guide
See a complete application Examples
Run agents on my own machine Self-hosted execution
Check Harness capabilities and limits Harness capabilities
Understand the design Architecture
Add a sandbox, Harness or other component Developer guide

All pages: documentation index. Before changing code, read the contributor rules.

Directories

Path Synopsis
apps
daemon/cmd/oac-daemon command
Command oac-daemon is the reverse-WebSocket worker that connects a machine to an OpenAgentCore server and exposes a local agent CLI subprocess as a connector_type=agent_daemon target.
Command oac-daemon is the reverse-WebSocket worker that connects a machine to an OpenAgentCore server and exposes a local agent CLI subprocess as a connector_type=agent_daemon target.
daemon/internal/agent
Package agent defines the Runtime's native Harness adapter contract.
Package agent defines the Runtime's native Harness adapter contract.
daemon/internal/agent/binpath
Package binpath resolves which executable each agent adapter should probe and spawn.
Package binpath resolves which executable each agent adapter should probe and spawn.
daemon/internal/agent/codex
Package codex is the agent_kind="codex" adapter.
Package codex is the agent_kind="codex" adapter.
daemon/internal/agent/contracttest
Package contracttest provides shared assertions for Harness adapter tests.
Package contracttest provides shared assertions for Harness adapter tests.
daemon/internal/agent/installroot
Package installroot probes native adapter installations.
Package installroot probes native adapter installations.
daemon/internal/agent/mcode
Package mcode drives MiniMax Code through its native ACP stdio interface.
Package mcode drives MiniMax Code through its native ACP stdio interface.
daemon/internal/auth
Package auth reads the daemon credential profile written by oac-core-device: server URL, runtime row id (= device_id), and the long-lived runner_credential.
Package auth reads the daemon credential profile written by oac-core-device: server URL, runtime row id (= device_id), and the long-lived runner_credential.
daemon/internal/cli
Package cli is the oac-daemon subcommand router.
Package cli is the oac-daemon subcommand router.
daemon/internal/daemonize
Package daemonize gives `oac-daemon connect -b` a no-cgo way to detach from the controlling terminal on macOS, Linux and Windows.
Package daemonize gives `oac-daemon connect -b` a no-cgo way to detach from the controlling terminal on macOS, Linux and Windows.
daemon/internal/dispatch
Package dispatch wires inbound WebSocket frames to the agent layer.
Package dispatch wires inbound WebSocket frames to the agent layer.
daemon/internal/paths
Package paths resolves on-disk locations for oac-daemon state under ~/.oac/daemon/<profile>/ — one subdir per profile so "test" and "prod" servers can be connected in parallel without colliding.
Package paths resolves on-disk locations for oac-daemon state under ~/.oac/daemon/<profile>/ — one subdir per profile so "test" and "prod" servers can be connected in parallel without colliding.
daemon/internal/placement
Package placement owns explicit operator-managed execution placement retirement.
Package placement owns explicit operator-managed execution placement retirement.
daemon/internal/transport
Package transport carries proto.Envelope frames between the daemon and the server-side agentdaemon gateway:
Package transport carries proto.Envelope frames between the daemon and the server-side agentdaemon gateway:
contracts
agents-api
Package agentsapi embeds the generated OpenAPI documents of Core's three namespaces so Core can serve them at /docs.
Package agentsapi embeds the generated OpenAPI documents of Core's three namespaces so Core can serve them at /docs.
agents-api/v1
Code generated by scripts/generate-public-api.py; DO NOT EDIT.
Code generated by scripts/generate-public-api.py; DO NOT EDIT.
internal
agentbundle
Package agentbundle validates bounded regular-file capability archives.
Package agentbundle validates bounded regular-file capability archives.
agentcapabilities
Package agentcapabilities owns the packaged Runtime's inert installation data.
Package agentcapabilities owns the packaged Runtime's inert installation data.
agentdaemon/proto
Package proto defines the JSON wire format spoken by oac-daemon over the reverse WebSocket tunnel to the OpenAgentCore server.
Package proto defines the JSON wire format spoken by oac-daemon over the reverse WebSocket tunnel to the OpenAgentCore server.
agentdaemon/proto/prototest
Package prototest provides explicit capability fixtures and the shared wire scenarios for Core–Runtime contract tests.
Package prototest provides explicit capability fixtures and the shared wire scenarios for Core–Runtime contract tests.
agentnetwork
Package agentnetwork validates the hosted execution policy without selecting a harness, Provider, native proxy or initialization mechanism.
Package agentnetwork validates the hosted execution policy without selecting a harness, Provider, native proxy or initialization mechanism.
agentplugin
Package agentplugin validates the supported inert Agents API Plugin format.
Package agentplugin validates the supported inert Agents API Plugin format.
agentskill
Package agentskill validates inert Skill bundles without native loading rules.
Package agentskill validates inert Skill bundles without native loading rules.
harnessconfig
Package harnessconfig defines the shared model configuration contract.
Package harnessconfig defines the shared model configuration contract.
harnessconfig/builtin
Code generated by scripts/generate-harness-catalog.py; DO NOT EDIT.
Code generated by scripts/generate-harness-catalog.py; DO NOT EDIT.
harnessconfig/claudesdk
Package claudesdk owns the qualified Claude SDK provider declaration.
Package claudesdk owns the qualified Claude SDK provider declaration.
harnessconfig/codex
Package codex owns the qualified Codex provider configuration declaration.
Package codex owns the qualified Codex provider configuration declaration.
harnessconfig/mcode
Package mcode owns the qualified MiniMax Code provider declaration.
Package mcode owns the qualified MiniMax Code provider declaration.
modelprovider
Package modelprovider validates the frozen upstream connection supplied to a native Harness.
Package modelprovider validates the frozen upstream connection supplied to a native Harness.
obs/log
Package log wraps log/slog with a context-aware handler that injects W3C trace IDs from ctx so a single request — HTTP, WS envelope, sweeper tick — can be grepped end-to-end by `trace_id`.
Package log wraps log/slog with a context-aware handler that injects W3C trace IDs from ctx so a single request — HTTP, WS envelope, sweeper tick — can be grepped end-to-end by `trace_id`.
providerassets
Package providerassets exposes the generated node distribution declarations.
Package providerassets exposes the generated node distribution declarations.
runtimebootstrap
Package runtimebootstrap owns the Provider-to-Runtime connection input.
Package runtimebootstrap owns the Provider-to-Runtime connection input.
runtimefs
Package runtimefs provides ordinary Runtime state files and process locks.
Package runtimefs provides ordinary Runtime state files and process locks.
packages
agents-client/v1
Package v1 configures the official Go SDK for the OpenAgentCore Agents API.
Package v1 configures the official Go SDK for the OpenAgentCore Agents API.
scripts
harness-catalog command
Command harness-catalog projects adapter-owned provider declarations and the model-provider protocol vocabulary for tooling.
Command harness-catalog projects adapter-owned provider declarations and the model-provider protocol vocabulary for tooling.
openapi-split command
Command openapi-split emits internal contracts and exports Go definitions for the public contract extension overlay and the Core client types.
Command openapi-split emits internal contracts and exports Go definitions for the public contract extension overlay and the Core client types.
services
core/cmd/device command
Command device provisions or revokes an execution device using operator DB access.
Command device provisions or revokes an execution device using operator DB access.
core/cmd/environment-key command
Command environment-key manages executor principal credentials using operator DB authority.
Command environment-key manages executor principal credentials using operator DB authority.
core/cmd/oac command
core/cmd/provider-artifacts command
provider-artifacts generates distribution declarations from registered adapters.
provider-artifacts generates distribution declarations from registered adapters.
core/cmd/sandbox-node command
sandbox-node hosts the selected local Provider and dials its owning Core.
sandbox-node hosts the selected local Provider and dials its owning Core.
core/cmd/server command
Package main runs the standalone Agents API service.
Package main runs the standalone Agents API service.
core/cmd/specification-contract command
specification-contract maintains the generated deployment contract projections of the node installer and the TypeScript client.
specification-contract maintains the generated deployment contract projections of the node installer and the TypeScript client.
core/internal/adminaudit
Package adminaudit carries non-secret administrator provenance into business transactions, and owns the rules for recording it and the audit log's read models.
Package adminaudit carries non-secret administrator provenance into business transactions, and owns the rules for recording it and the audit log's read models.
core/internal/agents
Package agents owns saved Agents: reusable configuration a tenant keeps independently of Sessions, with the optional model provider bundle that its x_agents_core.model_provider describes.
Package agents owns saved Agents: reusable configuration a tenant keeps independently of Sessions, with the optional model provider bundle that its x_agents_core.model_provider describes.
core/internal/api
Code generated by scripts/generate-public-api.py; DO NOT EDIT.
Code generated by scripts/generate-public-api.py; DO NOT EDIT.
core/internal/coremetrics
Package coremetrics collects bounded operational measurements for administrators.
Package coremetrics collects bounded operational measurements for administrators.
core/internal/credentialcrypto
Package credentialcrypto encrypts execution-service credentials at rest.
Package credentialcrypto encrypts execution-service credentials at rest.
core/internal/databaseurl
Package databaseurl reads Core's PostgreSQL connection settings, shared by the server and its maintenance commands.
Package databaseurl reads Core's PostgreSQL connection settings, shared by the server and its maintenance commands.
core/internal/deployment
Package deployment owns the managed sandbox deployment: the provider, specification and configuration an administrator selects, its generations, and the sandbox nodes that enroll with it, authenticate, report their readiness and serve its generations.
Package deployment owns the managed sandbox deployment: the provider, specification and configuration an administrator selects, its generations, and the sandbox nodes that enroll with it, authenticate, report their readiness and serve its generations.
core/internal/deployment/placement
Package placement decides whether the sandbox deployment admits new hosted work and which node receives it.
Package placement decides whether the sandbox deployment admits new hosted work and which node receives it.
core/internal/echotext
Package echotext decides whether an error message may repeat a caller-supplied value.
Package echotext decides whether an error message may repeat a caller-supplied value.
core/internal/engine
Code generated by scripts/generate-harness-catalog.py; DO NOT EDIT.
Code generated by scripts/generate-harness-catalog.py; DO NOT EDIT.
core/internal/engine/enginetest
Package enginetest supplies explicit declarations for admission fixtures.
Package enginetest supplies explicit declarations for admission fixtures.
core/internal/environmentconfig
Package environmentconfig owns the Environment configuration vocabulary: setup (env, setup commands, packages and capability directories), Skills, Plugins and initial files, with their validation and public metadata projections.
Package environmentconfig owns the Environment configuration vocabulary: setup (env, setup commands, packages and capability directories), Skills, Plugins and initial files, with their validation and public metadata projections.
core/internal/environmenttemplates
Package environmenttemplates owns Environment Templates: saved, tenant-owned hosted Environment configuration that Sessions reference at creation.
Package environmenttemplates owns Environment Templates: saved, tenant-owned hosted Environment configuration that Sessions reference at creation.
core/internal/execution
Package execution delivers durable Turns through the existing daemon protocol.
Package execution delivers durable Turns through the existing daemon protocol.
core/internal/files
Package files owns source Files: Project-owned uploaded bytes with immutable metadata, independent of Sessions and of the workspace copies made from them.
Package files owns source Files: Project-owned uploaded bytes with immutable metadata, independent of Sessions and of the workspace copies made from them.
core/internal/identity
Package identity defines execution-service principals independently of product users.
Package identity defines execution-service principals independently of product users.
core/internal/items
Package items owns public Items: it projects execution observations to the supported Item variants, merges them into stored Items and builds the ordered public events that report each Item change.
Package items owns public Items: it projects execution observations to the supported Item variants, merges them into stored Items and builds the ordered public events that report each Item change.
core/internal/jsonobject
Package jsonobject normalizes stored JSON object documents.
Package jsonobject normalizes stored JSON object documents.
core/internal/metadata
Package metadata owns the rules for resource metadata: string key and value pairs that Agents, Sessions and Vaults carry for their applications.
Package metadata owns the rules for resource metadata: string key and value pairs that Agents, Sessions and Vaults carry for their applications.
core/internal/modelconfiguration
Package modelconfiguration owns each Harness's deployment default model configuration: its safe view, the encrypted complete bundle that Session creation freezes, the private revision that pairs with it, and the rules for replacing, removing and resolving it.
Package modelconfiguration owns each Harness's deployment default model configuration: its safe view, the encrypted complete bundle that Session creation freezes, the private revision that pairs with it, and the rules for replacing, removing and resolving it.
core/internal/nativeinstaller
Package nativeinstaller serves qualified native distributions.
Package nativeinstaller serves qualified native distributions.
core/internal/oauthrefresh
Package oauthrefresh exchanges a stored OAuth refresh grant for an access token.
Package oauthrefresh exchanges a stored OAuth refresh grant for an access token.
core/internal/persistence/postgres/agentpg
Package agentpg stores saved Agents in PostgreSQL.
Package agentpg stores saved Agents in PostgreSQL.
core/internal/persistence/postgres/auditpg
Package auditpg stores write and administrator audit records in PostgreSQL.
Package auditpg stores write and administrator audit records in PostgreSQL.
core/internal/persistence/postgres/coremetricspg
Package coremetricspg reads the Core metrics that PostgreSQL holds: the deployment's root Turn queue and its history, and the database size.
Package coremetricspg reads the Core metrics that PostgreSQL holds: the deployment's root Turn queue and its history, and the database size.
core/internal/persistence/postgres/deploymentpg
Package deploymentpg stores the sandbox deployment, its retained generations and its nodes in PostgreSQL.
Package deploymentpg stores the sandbox deployment, its retained generations and its nodes in PostgreSQL.
core/internal/persistence/postgres/filepg
Package filepg stores Files in PostgreSQL: metadata in source_files and content in large objects.
Package filepg stores Files in PostgreSQL: metadata in source_files and content in large objects.
core/internal/persistence/postgres/modelconfigurationpg
Package modelconfigurationpg stores deployment default model configurations in PostgreSQL.
Package modelconfigurationpg stores deployment default model configurations in PostgreSQL.
core/internal/persistence/postgres/pgtest
Package pgtest opens PostgreSQL databases for Core tests.
Package pgtest opens PostgreSQL databases for Core tests.
core/internal/persistence/postgres/pgunit
Package pgunit runs Core's PostgreSQL transactions: pooled transactions for public and administrative work, and the execution owner's transactions on the connection that holds the database's execution lease.
Package pgunit runs Core's PostgreSQL transactions: pooled transactions for public and administrative work, and the execution owner's transactions on the connection that holds the database's execution lease.
core/internal/persistence/postgres/placementpg
Package placementpg loads the placement facts of the sandbox deployment and applies the placements package placement decides, on the caller's transaction-bound queries.
Package placementpg loads the placement facts of the sandbox deployment and applies the placements package placement decides, on the caller's transaction-bound queries.
core/internal/persistence/postgres/projectpg
Package projectpg stores Projects and their API keys in PostgreSQL.
Package projectpg stores Projects and their API keys in PostgreSQL.
core/internal/persistence/postgres/runtimehistorypg
Package runtimehistorypg stores and reads bounded periodic Runtime telemetry.
Package runtimehistorypg stores and reads bounded periodic Runtime telemetry.
core/internal/persistence/postgres/sessionpg
Package sessionpg stores Sessions in PostgreSQL and decides nothing.
Package sessionpg stores Sessions in PostgreSQL and decides nothing.
core/internal/persistence/postgres/skillpg
Package skillpg stores Skills and their versions in PostgreSQL.
Package skillpg stores Skills and their versions in PostgreSQL.
core/internal/persistence/postgres/templatepg
Package templatepg stores Environment Templates in PostgreSQL.
Package templatepg stores Environment Templates in PostgreSQL.
core/internal/persistence/postgres/vaultpg
Package vaultpg stores Vaults and Credentials in PostgreSQL.
Package vaultpg stores Vaults and Credentials in PostgreSQL.
core/internal/persistence/postgres/workspacepg
Package workspacepg stores independent workspace configurations and durable Environment filesystem ownership.
Package workspacepg stores independent workspace configurations and durable Environment filesystem ownership.
core/internal/processconfig
Package processconfig is the process settings Core loads from its environment.
Package processconfig is the process settings Core loads from its environment.
core/internal/projects
Package projects owns Core Projects and their API keys.
Package projects owns Core Projects and their API keys.
core/internal/providercontract
Package providercontract describes explicit resource-provider operations.
Package providercontract describes explicit resource-provider operations.
core/internal/publicorigin
Package publicorigin owns OAC_PUBLIC_URL's one rule, shared by Core and the installer.
Package publicorigin owns OAC_PUBLIC_URL's one rule, shared by Core and the installer.
core/internal/runtime
Package runtime connects execution devices without product dependencies.
Package runtime connects execution devices without product dependencies.
core/internal/runtimedevice
Package device defines persistence data shared by daemon gateways and their stores.
Package device defines persistence data shared by daemon gateways and their stores.
core/internal/runtimegateway
Package gateway is the server-side hub of the agent_daemon connector.
Package gateway is the server-side hub of the agent_daemon connector.
core/internal/runtimeobs
Package runtimeobs resolves durable Session identity to provider-owned Runtime observations.
Package runtimeobs resolves durable Session identity to provider-owned Runtime observations.
core/internal/runtimeobs/otlpexporter
Package otlpexporter sends sanitized Runtime observation records to an operator-configured OTLP/HTTP metrics endpoint.
Package otlpexporter sends sanitized Runtime observation records to an operator-configured OTLP/HTTP metrics endpoint.
core/internal/sandbox
Package sandbox defines the Sandbox Provider contract for authorized compute.
Package sandbox defines the Sandbox Provider contract for authorized compute.
core/internal/sandbox/contracttest
Package contracttest runs shared lifecycle assertions against real adapters backed by controlled native transports.
Package contracttest runs shared lifecycle assertions against real adapters backed by controlled native transports.
core/internal/sandbox/docker
Package docker is a thin SDK adapter for the dedicated, colocated Runtime.
Package docker is a thin SDK adapter for the dedicated, colocated Runtime.
core/internal/sandbox/e2b
Code generated by contractgen; DO NOT EDIT.
Code generated by contractgen; DO NOT EDIT.
core/internal/sandbox/e2b/internal/contractgen command
Command contractgen projects the adapter's Go declarations into its Python artifacts.
Command contractgen projects the adapter's Go declarations into its Python artifacts.
core/internal/sandbox/microsandbox
Package microsandbox is the pure-Go client for the colocated SDK helper.
Package microsandbox is the pure-Go client for the colocated SDK helper.
core/internal/sandbox/node
Package node transports the finite sandbox Provider contract.
Package node transports the finite sandbox Provider contract.
core/internal/sandbox/providers
Node-local adapter configuration and construction.
Node-local adapter configuration and construction.
core/internal/sessions
Package sessions owns the Session vocabulary: Sessions, Turns and their statuses, inputs, Environments and their provisioning failures, function calls, Item and Artifact reads, executor credentials, and the errors Session operations return.
Package sessions owns the Session vocabulary: Sessions, Turns and their statuses, inputs, Environments and their provisioning failures, function calls, Item and Artifact reads, executor credentials, and the errors Session operations return.
core/internal/skills
Package skills owns Skills: tenant-owned bundles with immutable, numbered versions and a default version.
Package skills owns Skills: tenant-owned bundles with immutable, numbered versions and a default version.
core/internal/textvalue
Package textvalue holds the one error shared by every domain for request text that Core cannot store.
Package textvalue holds the one error shared by every domain for request text that Core cannot store.
core/internal/vaults
Package vaults owns Vaults and their Credentials: the resources, OAuth access-token refresh, and the MCP credential selection that Session creation freezes and execution resolves into a bearer token.
Package vaults owns Vaults and their Credentials: the resources, OAuth access-token refresh, and the MCP credential selection that Session creation freezes and execution resolves into a bearer token.
core/internal/workspacefs
Package workspacefs defines the independent workspace filesystem boundary.
Package workspacefs defines the independent workspace filesystem boundary.
core/internal/workspacefs/nfs
Package nfs implements workspace storage on an operator-mounted kernel NFS filesystem.
Package nfs implements workspace storage on an operator-mounted kernel NFS filesystem.
core/internal/workspacefs/providers
Package providers composes workspace filesystem adapters at process startup.
Package providers composes workspace filesystem adapters at process startup.
core/internal/workspaces
Package workspaces owns durable Environment filesystem identities.
Package workspaces owns durable Environment filesystem identities.
core/internal/writeaudit
Package writeaudit carries authenticated, non-secret request provenance to business transactions, and owns the rules for recording it and its read models.
Package writeaudit carries authenticated, non-secret request provenance to business transactions, and owns the rules for recording it and its read models.
core/migrations
Package migrations owns only the Agents API database schema.
Package migrations owns only the Agents API database schema.
core/tests/fixtures command
Command fixtures prepares internal records for official-client recovery tests.
Command fixtures prepares internal records for official-client recovery tests.
web command
Command oac-web serves the Core Web build and its authenticated API proxy.
Command oac-web serves the Core Web build and its authenticated API proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL