brivya.

TypeScript SDK

Reuse public business types, Manifest validation and the canonical runtime.

Install

npm install @brivya/sdk@0.1.0-alpha.1

The SDK is a facade over Core, Manifest, Policy and Runtime. It does not introduce another authorization model or runtime truth.

Load a Manifest

Read a Manifest generated by CLI init, then use canonical parsing and validation:

import { readFileSync } from "node:fs";
import { loadBusinessAgentManifest } from "@brivya/sdk";

const source = readFileSync("business.agent.yaml", "utf8");
const agent = loadBusinessAgentManifest(source);
console.log(agent.metadata.id);

Handle parsing and validation errors rather than executing with an invalid Manifest.

Runtime and types

import {
  BusinessRuntime,
  CapabilityRegistry,
  runtime,
  type ActionRequest,
  type CapabilityContract,
  type Principal,
  type Delegation,
} from "@brivya/sdk";

BusinessRuntime and CapabilityRegistry reference the canonical implementations. Execution also needs capability registration, Connectors, trusted authorization context and runtime dependencies. Importing the SDK alone does not create a business service.

Integration order

  1. Define capability inputs, outputs and safety requirements.
  2. Register contracts with CapabilityRegistry.
  3. Provide Connectors plus policy, approval, idempotency and audit implementations.
  4. Construct identity and delegation context on a trusted server.
  5. Execute through BusinessRuntime or adapters attached to that same runtime.

See the Restaurant reference for execution tests and the adapter guide for protocol integration.

Up nextProtocols and platforms →

Based on the public Alpha implementation · View source ↗

AI docs · Markdown