Aluma Reflective Brain SDK
Behavioral safeguards for human-facing AI products.
AI products can cause real harm without a single bad line of code. The failure mode is subtle, nearly invisible — and the Reflective Brain SDK makes it detectable.
One-time commercial license · Any LLM or AI provider · Zero runtime dependencies
The Problem
AI that harms without bad code
When AI products interact with people around emotionally significant topics — relationships, work, health, finances, major decisions — they can cause harm through patterns that no test catches and no review flags. These aren't bugs. They're behavioral failure modes:
These patterns are nearly invisible without a structured way to detect them. The Aluma Reflective Brain SDK makes them visible — without modifying a single word of AI output.
What It Does
An analysis layer. Not a rewrite layer.
The SDK analyzes AI responses and user input across five behavioral dimensions and returns a structured, explainable result alongside the original response. It never modifies AI output. Developers stay in full control of what happens next.
Every analysis returns
The Five Behavioral Analyzers
Each analyzer maps to a named Aluma framework concept.
The SDK is the practical expression of Aluma's ethical frameworks in code. Every analyzer corresponds to a concept you can explore in depth.
Agency Preservation
Detects language that may reduce user agency — phrases like "you should," "you must," "the only option is" — that present one course of action as preferred, required, or inevitable.
Confidence Calibration
Detects overconfident language — "definitely," "always," "this proves" — that overstates what the information supports. Multiple flags in one response indicate an Ethical Drift pattern.
Constructive Assumption Detection
Detects instances where the AI introduces meaning, motive, emotion, or causality not provided by the user. Multiple assumptions in one response may indicate Unwarranted Expansion™.
Reflective Questioning
Analyzes the user's input — not the AI's response — for emotional weight, ambiguity, and high-stakes decision context. When indicated, surfaces a reflective question to support the user's own thinking.
Context Preservation
Detects language that oversimplifies complex human situations — "just do it," "move on," "easy fix" — that flatten genuine complexity into a directive or resolution.
Structured Output
Fully typed. Fully explainable.
Every analysis result is strongly typed and readable — flags, scores, reflective questions, and assumption details returned alongside the original AI response.
{
response: "You should definitely cut contact immediately...",
analysis: {
agencyPreservation: {
score: 0.82,
flags: [{
phrase: "You should definitely cut contact",
concern: "Presents one course of action as required",
severity: "high"
}],
suggestions: ["You might consider...", "One path could be..."]
},
confidenceCalibration: {
score: 0.74,
flags: [{ phrase: "definitely", severity: "medium" }],
ethicalDriftDetected: false
},
constructiveAssumption: {
score: 0.45,
flags: [],
unwarrantedExpansionDetected: false
},
reflectiveQuestioning: {
score: 0.91,
reflectiveQuestion:
"What part of this feels most unresolved for you?"
},
contextPreservation: {
score: 0.68,
flags: [{
phrase: "cut contact immediately",
concern: "Simplifies a complex situation into a directive"
}]
}
}
}Technical Snapshot
Framework-agnostic. Zero dependencies.
Language
TypeScript · zero runtime dependencies
Distribution
Dual ESM/CJS package (@aluma/reflective-sdk)
Compatibility
Any Node.js backend · any LLM or AI provider
Deterministic
Same inputs always produce the same analysis
Integration
Drop-in middleware, standalone analyzer, or convenience wrapper
Works with any LLM — OpenAI, Anthropic, open-source models, or custom systems. Fully deterministic: the same inputs always produce the same analysis. Drop-in as middleware, a standalone analyzer, or a convenience wrapper around your existing AI calls.
Who It's For
Developers building AI where the stakes are real.
If your product uses AI to interact with people around decisions, emotions, or life events — these behavioral patterns are already present in your responses. The SDK makes them detectable.
Simple, one-time licensing.
No subscriptions. No usage limits. No API calls home. Purchase once and integrate however your product needs.
Questions about the SDK? Get in touch
Built on Aluma's ethical frameworks
The Reflective Brain SDK is the developer expression of AI-Integrated Ethical Practice™ — the same framework that underlies Ask Aluma, Aluma Scribe, and ThinkSpace. If you want to understand the theory behind what each analyzer detects, the frameworks are publicly available.