AI agent getting started? Read Agents: start here first.
Use the CLI for interactive work and coding agents. Use the platform SDK’s typed modules for an integration or automation.
Both operate on the shared engineering model. The platform authorizes each operation and validates the data it changes.
For your own hosted interface, see Host your own app. To use a coding agent to set up a model and demo data, follow Bootstrap a tool with an agent.
For interactive work, follow CLI setup. Coding agents begin with Agents: start here. For a backend integration, install the SDK below.
Install the SDK
Section titled “Install the SDK”The SDK requires Node.js 22 or later. TypeScript consumers also need @types/node.
Install the SDK and Node.js types from the public npm registry:
npm install @openengio/sdk @types/nodeImport from a module subpath such as @openengio/sdk/objects or
@openengio/sdk/branches; the package has no root import.
Authenticate and read one object
Section titled “Authenticate and read one object”Obtain an access token through OAuth or a service identity. You also need the project ID and the ID of an object that identity can read. Keep the token on your backend.
Save this as read-object.mjs:
import { createHttpsTransport, createObjectsTransportClient, toCredential,} from "@openengio/sdk/objects";
const token = process.env.OPENENG_ACCESS_TOKEN;const projectId = process.env.OPENENG_PROJECT_ID;const objectId = process.env.OPENENG_OBJECT_ID;if (!token || !projectId || !objectId) { throw new Error("Set OPENENG_ACCESS_TOKEN, OPENENG_PROJECT_ID and OPENENG_OBJECT_ID");}
const origin = "https://api.openeng.io";const transport = createHttpsTransport(origin);const objects = createObjectsTransportClient(transport, origin, toCredential(token));const answer = await objects.readObject({ selector: { projectId, ref: "main" }, input: { objectId },});console.log(JSON.stringify(answer, null, 2));Set those three environment variables in your backend environment, then run:
node read-object.mjsInspect the result
Section titled “Inspect the result”A successful response contains the object in result. Compare it with the same record in the workspace on main. Handle a refusal before rendering a result; an unavailable object is not an empty record.
Choose a module
Section titled “Choose a module”| Module | Use it for |
|---|---|
| Objects | Read and change engineering records and relationships |
| Branches | Create branches and review proposals |
| Ontology | Publish shared types and views |
| Administration | Manage organisations and integrations |
| Agents | Work with conversations and plans |
Each operation separates its selector, which names the project and branch or baseline, from its input arguments.
Discover operation shapes
Section titled “Discover operation shapes”Use openeng help <command> and the CLI reference for exact command shapes. The external app guide covers OAuth registration, scopes and service identities.
Write through a branch
Section titled “Write through a branch”- Start your integration with reads.
- For edits, create a branch through the Branches client.
- Send mutations through the Objects client using that branch’s full name.
- Inspect the diff and submit a proposal for review.
- Merge only when the platform’s review and protection rules permit it.
- Configure types and views through Ontology, where proposed changes are published separately from engineering data.
Handle each response according to the operation’s contract:
- A completed operation returns the authoritative data for your app.
- A structured error response explains why the platform rejected the request; preserve the user’s draft and show the reason.
- A repeated idempotent write may return the previously recorded response without running the write again.
- For a write whose completion could not be determined, check or recover it using its correlation ID before trying again.
Transport failures can throw. A failed connection does not prove that a write had no effect.
- Keep the correlation ID sent with the write, together with its idempotency key and correlation information.
- If
objects.mutatetimes out, callobjects.recoverwith the same selector andinput: { correlationId }before retrying. - Check the recovery result. Recovery searches the branch’s recent commits for the correlation ID and writes its own audit record. It leaves the original record unchanged and does not repeat the mutation. It returns
succeededwith the commit, orunknownwithdepthSearched, the number of commits searched, if none was found. - On
unknown, read the objects on the branch to check whether the change is there before sending it again; the write was not found within the search. - For branch operations, use
inspectBranchOperation. They have no recovery route.
Branching and change control explains the review workflow. Host your own app covers backend authentication and external hosting.