Node.js SDK
The same assistant surface as the Python SDK, typed for TypeScript and Node — create an assistant, upload documents, and chat with them. Needs an API key first.
Install
bash
npm install @workerbee/workerbee
Upgrade
bash
npm install @workerbee/workerbee@latest
Check Change Log before upgrading — this SDK is in beta and its surface can still move.
Initialize assistant
typescript
import { Workerbee } from '@workerbee/workerbee';
const wb = new Workerbee({ apiKey: process.env.WORKERBEE_API_KEY });
const assistant = await wb.assistant.createAssistant({
assistantName: 'platform-team',
});An assistant is a scoped knowledge space — its own uploaded documents, structured onto your graph, isolated from every other assistant in the account.
uploadFile example
typescript
await assistant.uploadFile({
filePath: './mei-kowalski-resume.pdf',
metadata: { team: 'platform', documentType: 'resume' },
});Ingestion is asynchronous — poll the returned file’s status until it reads PROCESSED before chatting about it. Supported types: PDF, DOCX, Markdown, plain text, and JSON.
chat example
typescript
const resp = await assistant.chat({
messages: [{ role: 'user', content: "Who could back-fill Mei Kowalski's role?" }],
});
console.log(resp.interpretation);
for (const row of resp.rows) {
console.log(row.name, row.canonicalOccupation, row.seniorityLevel, row.coverage, row.readiness);
}Every response carries interpretation, rows ranked with fit and readiness scores, the references it drew on, and an audit block — never just a bare answer.
Was this page helpful?