How It Works
Four steps from message to optimal context
1
Detect
Dual-axis drift detection
- Semantic drift via embedding similarity
- Functional drift via conversational mode analysis
- Implicit anaphora detection (6 categories)
- OOV compound reference detection
- All local - spaCy + transformers.js
2
Route
BRANCH / STAY / ROUTE
- Every message gets a routing decision
- <100ms latency, no LLM calls
- Configurable thresholds with hysteresis
- Refractory periods prevent oscillation
3
Assemble
Build optimal context
- Walk the graph, don't dump history
- Current branch + related clusters
- Tail routes for cross-branch context
- 20 relevant messages, not 1000
4
Explain
Full audit trail
- Every decision logged with reasons
- Similarity scores + confidence values
- Boost multipliers with explanations
- Built for compliance requirements
Quick Start
Get started with a few lines of code
index.ts
import { createDriftClient } from '@driftos/client';
const drift = createDriftClient('http://localhost:3000');
// Route a message
const result = await drift.route('conv-123', 'I want to plan a trip to Paris');
console.log(result.branchTopic); // "Paris trip planning"
// Get context for LLM
const { system, messages } = await drift.buildPrompt(result.branchId);
// Use with OpenAI
const response = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [
{ role: 'system', content: system },
...messages,
{ role: 'user', content: 'What hotels do you recommend?' }
]
});Under the Hood
Real engineering, not just marketing
<100ms
Routing decisions
76ms
P95 NLP latency
384-dim
Local embeddings
0
External API calls
Message
NLP
spaCy
Drift
Dual-axis
Router
Branch/Stay/Route
Storage
PostgreSQL
Context
For LLM
Use Cases
From chatbots to enterprise AI
AI Assistants
Users switch topics mid-conversation. Your bot forgets everything.
Agent Orchestration
Agent #3 doesn't know what Agent #1 decided. Context lost.
Messaging Apps
Scroll through 200 messages to find that one decision? Never again.
Enterprise AI
Auditor asks why the AI said that. You shrug.
Open Source
Core routing and embedding functionality available under MIT license
driftos-core
LLM Based Routing Engine
driftos-embed
Embedding Based Routing Engine
driftos-client
JavaScript SDK
Enterprise features (advanced NLP, compliance tools) available separately
Get in Touch
Interested in DriftOS for your project? Let us know.