TypeScript SDK
Reuse public business types, Manifest validation and the canonical runtime.
Install
npm install @brivya/sdk@0.1.0-alpha.1The 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
- Define capability inputs, outputs and safety requirements.
- Register contracts with CapabilityRegistry.
- Provide Connectors plus policy, approval, idempotency and audit implementations.
- Construct identity and delegation context on a trusted server.
- Execute through BusinessRuntime or adapters attached to that same runtime.
See the Restaurant reference for execution tests and the adapter guide for protocol integration.
Based on the public Alpha implementation · View source ↗