Quickstart
Get up and running with BrainOS AI Workers in 5 minutes. Start with BrainOS Core Light — the open-source brain engine that powers the Workers.
Install
terminalbash
npx brainos init1. Create an AI Worker
Workers have persistent memory, Brain IQ routing, and RL feedback built in. One line to create.
create-worker.tstypescript
import { createWorker, queryBrain } from '@brainos/workers';
// Create an AI Worker with persistent brain
const worker = await createWorker({
workspaceId: 'my-org',
domain: 'se-aas',
name: 'Delivery Intelligence Worker',
});
// Execute a task — Brain IQ routes automatically
const result = await worker.executeTask('Why did sprint velocity drop 18% this week?');
console.log(result.answer);
// Brain IQ 0.87 → System-2 engaged. Velocity dropped due to review burden spike (3 PRs/engineer).
console.log(result.confidence); // 0.91
console.log(result.reasoningDepth); // 'system-2'2. Detect Anomalies
Workers include anomaly detection from the @brainos/workers toolkit. Zero extra dependencies.
anomaly-detection.tstypescript
import { detectAnomalies } from '@brainos/workers';
const metrics = [100, 102, 98, 105, 101, 250, 99, 103];
const anomalies = detectAnomalies(metrics, { method: 'zscore', threshold: 2.0 });
console.log(anomalies);
// [{ index: 5, value: 250, score: 3.2, isAnomaly: true }]3. Close the RL Loop
Wire an AI Worker with its full brain. Tasks automatically flow through Brain IQ routing, memory context, RL feedback, and self-verification.
rl-loop.tstypescript
import { createWorker, BrainOS } from '@brainos/workers';
const worker = await createWorker({ workspaceId: 'my-org', domain: 'se-aas' });
// RL feedback — worker gets smarter after every task
await worker.recordOutcome({
taskId: result.taskId,
quality: 0.92, // 0–1 quality score
userFeedback: 'helpful', // dopamine signal
});
// Brain compounds — same worker is smarter next task
console.log(await worker.getLearningStats());
// { totalSignals: 47, learningVelocity: 0.12, avgQuality: 0.89 }