DriftOSDriftOS
Guides

Migration Guide

Switch from Buffer Memory to DriftOS

Switching from traditional buffer memory to DriftOS semantic routing.

Flowise Migration

From Buffer Memory to DriftOS

Before (Buffer Memory):

[User Input] → [Buffer Memory] → [Conversation Chain] → [LLM]

After (DriftOS):

[User Input] → [DriftOS] → [Conversation Chain] → [LLM]

Steps

  1. Remove existing memory node (Buffer Memory, Conversation Buffer Memory, etc.)
  2. Add DriftOS node from Memory category
  3. Configure DriftOS with your API key
  4. Connect to your Conversation Chain
  5. Test - Your conversation history is now routed semantically

What Changes

Context size:

  • Before: All messages in context (23/23 messages)
  • After: Only relevant branch (5/23 messages)

Token usage:

  • Before: ~3,891 tokens per request
  • After: ~847 tokens per request (78% savings)

Response quality:

  • Before: LLM sees all irrelevant context
  • After: LLM sees only relevant topic

What Stays the Same

  • Your chatflow structure
  • User experience
  • Message storage
  • Credential management

Custom Integration Migration

From Manual Context Management

If you're currently managing context manually:

// Before: Manual buffer
const messages = await db.getMessages(conversationId);
const response = await openai.chat.completions.create({
  model: 'gpt-4',
  messages: messages // All messages
});

After: DriftOS routing

import { createDriftClient } from '@driftos/client';

const drift = createDriftClient(
  'https://api.driftos.dev/api/v1/embed',
  'YOUR_API_KEY'
);

// Route message
const result = await drift.route(conversationId, userMessage);

// Get only relevant context
const { system, messages } = await drift.buildPrompt(result.branchId);

// Use with LLM
const response = await openai.chat.completions.create({
  model: 'gpt-4',
  messages: [
    { role: 'system', content: system },
    ...messages, // Only relevant branch
    { role: 'user', content: userMessage }
  ]
});

Benefits

  • Automatic routing - No manual topic detection
  • Focused context - Only relevant messages
  • Token savings - 70-95% reduction
  • Better responses - LLM isn't confused by irrelevant context

Data Migration

Existing Conversations

DriftOS works with new conversations by default. For existing conversations:

Option 1: Start fresh

  • New conversations use DriftOS routing
  • Old conversations remain in buffer memory
  • Cleanest migration path

Option 2: Backfill routing

  • Process historical messages through DriftOS
  • Rebuild semantic branches from old data
  • Contact support for backfill assistance

Rollback Plan

If you need to roll back:

  1. Disconnect DriftOS node in Flowise
  2. Reconnect Buffer Memory node
  3. Your message history is preserved in the database

DriftOS doesn't delete your original messages—it adds routing metadata on top.


Next Steps

On this page