DriftOSDriftOS
Quick Start

Flowise Integration

Integrate DriftOS with Flowise in 10 minutes. Save 78% on tokens.

Semantic memory routing for Flowise—send only relevant context to your LLM and save 70%+ on tokens.

Instead of dumping your entire chat history into every LLM call, DriftOS routes messages to topic-specific branches and only sends the relevant context.

Result: Faster responses, lower costs, smarter conversations.


Quick Start (10 Minutes)

Step 1: Get Your DriftOS API Key

  1. Go to driftos.dev
  2. Sign up or log in
  3. Navigate to your dashboard
  4. Copy your API key

Step 2: Add the DriftOS Credential to Flowise

  1. Open Flowise
  2. Click Credentials in the sidebar
  3. Click Create New Credential
  4. Search for "DriftOS API"
  5. Paste your API key
  6. Click Save
Credential Name: DriftOS API
API Key: sk-drift-xxxxxxxxxxxxxxxxxxxxxxxx

Step 3: Add DriftOS Node to Your Chatflow

  1. Open your existing Chatflow (or create a new one)
  2. In the node palette, find Memory category
  3. Drag DriftOS onto the canvas
  4. Connect it to your Conversation Chain or Agent node
  5. Select your DriftOS credential
Basic Configuration:
✓ Use Hosted API: ON
✓ Routing: driftos-core (Recommended for most users)
✓ Use Flowise Chat ID: ON

Step 4: Watch It Work

Start chatting. Check your Flowise logs. You'll see DriftOS routing decisions in real-time:

🔄 DRIFTOS ROUTING
📍 Conversation ID: abc123...
💬 User Message: "Tell me about your dog adoption services"

🎯 Routing Decision:
   Action:     🌿 BRANCH (New Topic)
   Confidence: 92.3%
   Reason:     New semantic context detected: pet adoption

📤 DRIFTOS CONTEXT:
   Returning 5/23 messages (78% reduction)
   🌳 Branch: dog-adoption | Pruned: black-holes, vacation-planning
   💰 Est. tokens: 847 (vs 3,891 full history)
   💸 Token savings: 3,044 tokens (~78% cheaper)

You're now routing conversations intelligently.


Configuration Options

Routing Strategy: Core vs Embed

DriftOS offers two routing engines. Choose based on your needs:

StrategyEngineSpeedAccuracyUse Case
driftos-coreLLM (Groq)Fast (~100ms)HighMulti-topic conversations, nuanced routing
driftos-embedEmbeddingsFaster (~50ms)GoodHigh-volume, cost-sensitive applications

Default: driftos-core (Recommended for most users)

Routing: driftos-core (LLM routing • Intelligent)

When to use Core:

  • You need nuanced semantic understanding
  • Users frequently switch topics mid-conversation
  • Accuracy matters more than raw speed

When to use Embed:

  • You need sub-50ms routing decisions
  • You're handling high message volumes
  • Topics are generally distinct and sequential

Learn more about choosing a routing engine →

Use Hosted API

Default: ON (Recommended)

  • ON: Use DriftOS managed cloud service at api.driftos.dev
  • OFF: Connect to your self-hosted DriftOS instance
Use Hosted API: ON  → https://api.driftos.dev
Use Hosted API: OFF → Custom Endpoint required

Custom Endpoint (Self-Hosted)

Only visible when Use Hosted API is OFF.

Point this to your self-hosted DriftOS server:

Endpoint: https://your-self-hosted-endpoint.com

Learn about self-hosting DriftOS →

Use Flowise Chat ID

Default: ON (Recommended)

  • ON: DriftOS uses the Flowise-generated chat ID as the conversation ID
  • OFF: You provide a custom static conversation ID
Use Flowise Chat ID: ON  → Automatic per-chat isolation
Use Flowise Chat ID: OFF → Requires manual Chat ID input

Why ON? Every new chat in Flowise gets a unique ID. DriftOS uses this to keep conversations separate. If you turn this OFF, all chats will share the same conversation history (usually not what you want).

Chat ID (Custom)

Only visible when Use Flowise Chat ID is OFF.

Chat ID: my-custom-session-id

Use this if you want to manually control conversation IDs. For example, if you're building a multi-user system and want to tie DriftOS conversations to user accounts.

Advanced Parameters

Click "Additional Parameters" to reveal:

Memory Key

Default: chat_history

The variable name used to pass context to the LLM chain. Most Flowise chains expect chat_history.

Max Context Messages

Default: 10

Maximum number of messages to include in the context window. DriftOS will return up to this many messages from the current branch.

System Prompt

Optional
Example: "You are a helpful assistant specializing in pet adoption."

Custom system prompt prepended to the context. Useful for role-setting or instruction injection.


How DriftOS Works

The Flow

User Message

DriftOS Routes Message

Analyzes semantic context

Decision: STAY | BRANCH | ROUTE

Only relevant context → LLM

Response (with 70-95% fewer tokens)

The Three Routing Actions

DriftOS analyzes each incoming message and makes a routing decision:

1. STAY (📌 Same Topic)

Message continues the current conversation branch.

Example: "What's the adoption fee?" after discussing dog adoption

2. BRANCH (🌿 New Topic)

Message introduces a new semantic topic. Creates a new branch in the conversation graph.

Example: "Tell me about black holes" in a conversation about dogs

3. ROUTE (🔀 Switch Topic)

Message returns to a previous topic. Switches to an existing branch.

Example: "Back to the dog thing" after discussing black holes

Note: ROUTE is only available with driftos-core. Embedding-based routing (driftos-embed) creates new branches instead of routing to old ones.

Where the 78% Savings Come From

Traditional memory: Every message goes into the LLM context window.

Messages: 23/23 → ~3,891 tokens

DriftOS memory: Only the current branch goes into context.

Messages: 5/23 → ~847 tokens
Pruned branches: black-holes, vacation-planning
Savings: 78%

The math:

  • Full history: 23 messages = 3,891 tokens
  • DriftOS context: 5 messages = 847 tokens
  • Token savings: 3,044 tokens
  • Cost reduction: ~78%

At scale, this adds up fast. A 10,000-message conversation might only need 200 messages of context per query.


Example Logs

Here's what you'll see in your Flowise console when DriftOS is working:

================================================================================
🔄 DRIFTOS ROUTING (loadMemoryVariables)
================================================================================
📍 Conversation ID: abc123-def456-ghi789
💬 Current Input: "Tell me about your dog adoption services"

🎯 Routing Decision:
   Action:     🌿 BRANCH (New Topic)
   Confidence: 92.3%
   Reason:     New semantic context detected: pet adoption inquiry

🌳 Current Branch:
   Topic:      dog-adoption
   Branch ID:  branch-xyz789...

📚 Other Branches (2 total):
   1. black-holes (8 msgs, 3 facts)
   2. vacation-planning (6 msgs, 2 facts)

📤 DRIFTOS CONTEXT:
   Returning 5/23 messages (78% reduction)
   🌳 Branch: dog-adoption | Pruned: black-holes, vacation-planning
   💰 Est. tokens: 847 (vs 3,891 full history)
   💸 Token savings: 3,044 tokens (~78% cheaper)
================================================================================

What's happening:

  • User asks about dog adoption
  • DriftOS detects a new topic (92.3% confidence)
  • Creates a new branch called "dog-adoption"
  • Prunes irrelevant branches (black-holes, vacation-planning)
  • Returns only 5 messages instead of 23
  • Saves 3,044 tokens (78% reduction)

Troubleshooting

"DriftOS node not appearing in Flowise"

Solution: Restart Flowise server.

# Stop Flowise
# Restart Flowise
npm start

The DriftOS node should appear in the Memory category after restart.


"Connection refused" or "401 Unauthorized"

Solution: Check your API key and endpoint configuration.

  1. Verify API key is correct in Flowise credentials
  2. Ensure Use Hosted API is ON (or endpoint is correct if OFF)
  3. Check Flowise logs for full error message
# Common issues:
- API key expired or invalid Get new key from driftos.dev
- Endpoint unreachable Check network/firewall
- Self-hosted endpoint not running Start your DriftOS server

"Falling back to database messages"

This is fine. It's the safety net.

DriftOS will log:

 DriftOS routing error: [error message]
   Falling back to standard memory

What happens:

  • DriftOS encounters an error (API down, network issue, etc.)
  • Flowise automatically falls back to standard database memory
  • Your chatflow continues working normally
  • No user-facing errors

Action: Check logs for root cause. Fix API key, endpoint, or wait for service recovery.

See more troubleshooting tips →


"DriftOS: Could not determine a valid conversation ID"

Solution: Check your Chat ID configuration.

If Use Flowise Chat ID is OFF, you must provide a custom Chat ID:

Chat ID: my-custom-session-id

If it's ON, ensure Flowise is passing the chat ID correctly (this is automatic in normal usage).


Routing decisions seem wrong

Check the logs—DriftOS explains its reasoning:

Reason: New semantic context detected: pet adoption inquiry

Adjustments:

  1. Tweak Max Context Messages if branches are too fragmented
  2. Add a System Prompt to guide routing behavior
  3. Switch between driftos-core and driftos-embed to compare results

Learn more about routing engines →


FAQ

Does this work with Agentflow?

Coming soon. DriftOS currently supports Chatflows with Conversation Chains. Agentflow integration is in development.


Can I self-host DriftOS?

Yes. Clone the DriftOS server repo, deploy it, and point the Endpoint field to your instance.

# Example self-hosted setup
git clone https://github.com/driftos/driftos-server
cd driftos-server
docker-compose up -d

# In Flowise DriftOS node:
Use Hosted API: OFF
Endpoint: https://your-server.com

Learn more about self-hosting →


Does DriftOS store my messages?

Yes, on DriftOS servers (if using hosted API).

DriftOS stores messages to build the conversation graph and perform routing. Your data:

  • Is encrypted in transit and at rest
  • Is isolated per conversation ID
  • Is NOT used to train models
  • Can be self-hosted for full control

For sensitive applications, use the self-hosted option.


Can I see the conversation graph?

Not yet. Graph visualization is coming in a future release.

For now, you can inspect branches via logs:

📚 Other Branches (3 total):
   1. dog-adoption (5 msgs, 2 facts)
   2. black-holes (8 msgs, 3 facts)
   3. vacation-planning (6 msgs, 2 facts)

What if I want to disable DriftOS temporarily?

Just disconnect the node. Remove the DriftOS node from your Chatflow and connect standard Buffer Memory or Conversation Buffer Memory instead.

Your DriftOS conversation history is preserved—you can re-enable it later.


Support

Issues or questions?


Summary

You just integrated semantic memory routing into Flowise in 10 minutes.

What you get:

  • 70-95% token savings on every LLM call
  • Faster responses (less context to process)
  • Smarter conversations (only relevant history)
  • Beautiful logs showing exactly what's happening

What you did:

  1. Got a DriftOS API key
  2. Added the DriftOS credential to Flowise
  3. Dropped the DriftOS node into your Chatflow
  4. Watched the savings roll in

Next steps:

Welcome to intelligent memory routing.

Now go save some tokens.

On this page