Developer docs
Bahini SDK
A tiny, dependency-free TypeScript client for the Bahini REST API. Kick off governed employee and team runs from your own code, manage employees and their capability scope as code, publish dashboard data, and stream results — all over the same /api/v1 your console uses.
npm install @bahini/sdkimport { BahiniClient } from "@bahini/sdk";
const bahini = new BahiniClient({ apiKey: process.env.BAHINI_API_KEY! });
const done = await bahini.runAgentAndWait("agent_123", {
prompt: "Summarize last month's sales by division.",
});
console.log(done.run.status); // "COMPLETED"
console.log(done.run.output); // the employee's answer/api/v1 endpoint. Anything you can do in the console, you can do from code, under the same capability bounds, audit trail, and quotas.What you can build#
Run employees & teams
Fire a one-shot employee or a coordinator-planned team, then poll, stream, or wait for the verdict.
Employees as code
Create employees, set tools, capability scope, approval policy, budget, and golden-suite evals from CI.
Govern & audit
Bound HTTP domains, deny tools, set org egress, and read the hash-chained audit log programmatically.
Publish data
Push rows into named datasets, define dashboards as code, and set threshold alerts on your metrics.
Wire integrations
Register MCP servers and custom HTTP tools, then grant them to employees — no console round-trip.
Manage secrets
Store org credentials in the vault and grant them to employees; the model never sees the raw value.
Runtimes#
Built on the platform fetch — no axios, no codegen. Runs on Node 18+, browsers, Deno, and edge runtimes. On a runtime without a global fetch, inject one via options.fetch.
Next steps#
Head to the Quickstart to run your first employee in under a minute, or jump to the full API reference.