Skip to content
OPEREConnect your AI

Your agent owns the work.
OPERE supplies the environment.

Request conditions through Outcome or Observe. Read scoped resources, submit your candidate, inspect independent checks, then explicitly accept and release. HTTP and MCP use the same authoritative service.

Connect to a reachable OPERE host.

The current implementation runs on a configured local host with private inference, an isolated executor and a running formation worker. Its two registered domains are invoice-function repair and a source-cited JSON facts report.

  1. Prepare the local runtime

    The host operator configures the pinned private model and restricted-container runtime, then runs the worker. The API alone can retain requests without advancing them.

  2. Issue scoped machine access

    The owner runs node scripts/connect-formation.mjs locally. The helper creates or validates a private machine credential file and requests a separate one-use browser inspection code. It does not expand an existing credential’s grants.

  3. Configure your AI client

    Use the HTTP API or an MCP client that supports this HTTP endpoint, bearer authentication and the current JSON response branch. A closed AI app needs its own compatible integration; OPERE cannot add tools to it automatically.

Loopback belongs to the calling machine.

127.0.0.1:3000 works only for a client on the OPERE host. A remote or cloud AI needs a reachable deployment configured by its operator, with TLS outside loopback. This page does not publish the local host or provision remote access.

MCP connection settings

{
  "url": "http://127.0.0.1:3000/api/mcp",
  "headers": {
    "Authorization": "Bearer <MACHINE_TOKEN_FROM_SECRET_STORE>",
    "Content-Type": "application/json",
    "Accept": "application/json, text/event-stream"
  }
}

Placeholders only. No machine credential is included.

Adapt these settings to your client.

This JSON describes the URL and headers, not a universal client import format. Keep the real machine token in the client’s secret store. Never paste it into a browser pairing form or a task handoff.

The bridge uses MCP 2025-11-25, stateless JSON responses over POST /api/mcp. It offers no MCP SSE stream, persistent session, sampling or asynchronous task feature.

MCP initialization and discovery

POST the initialize message with the connection headers above. Accept the returned protocol version or disconnect. Then send notifications/initialized without an ID; successful notification delivery returns HTTP 202. Add MCP-Protocol-Version: 2025-11-25 to subsequent requests and call tools/list to inspect published schemas.

MCP initialize message

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-11-25",
    "capabilities": {},
    "clientInfo": {
      "name": "your-agent",
      "version": "1.0.0"
    }
  }
}

Placeholders only. No machine credential is included.

Tool discovery does not grant authority. There is no session ID, MCP GET stream or protocol upgrade in this integration.

Make the same request over HTTP or MCP.

This is a registered coding example, supplied through Outcome. Observe accepts authorized source observations instead. Both paths enter the same bounded formation lifecycle.

HTTP formation request

POST /api/v3/environments HTTP/1.1
Host: 127.0.0.1:3000
Authorization: Bearer <MACHINE_TOKEN_FROM_SECRET_STORE>
Content-Type: application/json

{
  "entry": "outcome",
  "outcome": "Repair the invoice total calculation, including quantities and rounding.",
  "sources": [
    {
      "id": "invoice-source",
      "name": "src/invoice.js",
      "mediaType": "text/javascript",
      "content": "export function calculateTotal(items) { return items.reduce((sum, item) => sum + item.unitPrice, 0); }"
    }
  ],
  "leaseSeconds": 1800,
  "idempotencyKey": "<UNIQUE_REQUEST_KEY>"
}

Placeholders only. No machine credential is included.

The API returns 202 with an environment snapshot and queued formation. Read fresh state before deciding that conditions are ready.

Keep revisions, retries and context explicit.

Read the current environment before a mutation. Send its expectedRevision and a fresh idempotencyKey. Reuse a key only for an exact retry with the identical serialized body; fetch current state after receipt replay. A revision conflict requires a fresh read and reassessment.

Bind artifact submission and acceptance to the current contextVersion. Changed observations invalidate affected proof. Neither a successful request nor a ready environment means the AI’s task is complete.

Two transports. One operating contract.

Use the same environment IDs, policy, revisions, source context and verification state. HTTP paths below are relative to /api/v3; environment-specific MCP calls add environmentId to the corresponding arguments.

OperationHTTP APIMCP tool
Request conditionsPOST /environmentsformation_request
Inspect stateGET /environments/{id}formation_get
Replace source contextPOST …/{id}/observationsformation_observe
Begin work / read contextPOST …/{id}/actionsformation_action
Submit candidatePOST …/{id}/artifactsformation_submit
Recheck candidatePOST …/{id}/verifyformation_verify
Accept current proofPOST …/{id}/acceptformation_accept
Release resourcesPOST …/{id}/releaseformation_release

Submission queues independent verification. Acceptance requires the latest artifact ID and passing current-context evidence. Release queues cleanup; wait for released before reporting it complete. History and artifacts remain retained.

Calls request work.
API events follow it.

MCP tools return JSON snapshots. Follow live state through the separate authenticated API event feed, or poll the current environment. The event feed is not an MCP transport stream.

API live event request

GET /api/v3/environments/<ENVIRONMENT_ID>/events?after=0 HTTP/1.1
Host: 127.0.0.1:3000
Authorization: Bearer <MACHINE_TOKEN_FROM_SECRET_STORE>
Accept: text/event-stream

Placeholders only. No machine credential is included.

Use a streaming HTTP client that sends the machine Authorization header. A browser’s native EventSource cannot set this bearer header. Browser inspection uses its own read-only connection instead.

Resume from received state
Frames use event: environment and a numeric revision as id. Reconnect with after set to the last received revision. JSON replay returns events and a cursor.
Expect bounded streams
Each SSE response is bounded by 25 seconds, 100 events and 1 MiB, with at most three streams per principal. Handle closure and event: error; recheck authorization and state before reconnecting.
Keep task ownership in your AI
Events describe environment transitions. They do not schedule an external AI, deliver its task prompt or guarantee that it will continue working.

A task handoff is a separate step.

Web intake prepares a structured brief with Outcome or Observe, source context, boundaries and acceptance criteria. You copy that brief to your AI. Preparing or copying it does not invoke a tool, grant access or execute work.

Your AI carries the brief forward.

The AI needs configured machine access and reachable tools. It requests the environment, makes the candidate and responds to verification failures. You can pair a read-only browser view with the machine-issued code to follow the same state.

Prepare a task handoff

Try the journey without connecting.

The complete walkthrough uses local sample state and makes no runtime requests. Account authorization, resource grants and physical work are explicitly prototypes. It demonstrates the experience without establishing live capabilities.

Open the full walkthrough

Build against the implemented boundary.

The runtime is a single-host development implementation with current private formation, not a production multi-tier reasoning system. It does not provide arbitrary repository execution, general document processing, continuous sensing or physical actuation. No hosted agent, browser-issued machine grants or active billing is provided by this flow.

Read the trust model