TypeScript SDK Overview
@custodianlabs/sdk deploys Custodian Agents and multi-agent teams backed by your
own data, with built-in PII masking. Zero dependencies; runs on Node.js 18+ and in
browser / edge runtimes with fetch. Same backend and concepts as the Python
custodian-labs package.
npm install @custodianlabs/sdk
import { createCustodian } from "@custodianlabs/sdk";
const app = await createCustodian({
model: "gpt-4o",
prompt: "You are a helpful assistant.",
});
const reply = await app.chat("Hello!");
console.log(reply?.response);
Three ways to create a Custodian Agent
| Approach | Use when |
|---|---|
createCustodian() | One call: model + prompt → deployed App. |
CustodianBuilder | Fluent, chainable configuration. |
Custodian class | Full control; stage examples/files, then .deploy(). |
All three return an App you .chat() with. Sessions are retained for you.
Next
Installation · Authentication · Data sources & RAG · Agent Teams · Guardian Layer client