NOUKAI

Migration Overview

Migrate existing LangChain or OpenRouter chained LLM code to managed Noukai flows — only when explicitly requested.

Activation rule: Only begin migration when the user has explicitly asked to migrate their LangChain, LangGraph, or OpenRouter chained LLM code to Noukai. Never suggest migration proactively. If the user is building new flows from scratch, use the Quickstart or noukai-prompt.md instead.

What Migration Does

Migration converts existing chained LLM calls — whether built with LangChain, LangGraph, or raw OpenAI/OpenRouter SDK — into managed Noukai flows. Each chain becomes a versioned, observable flow callable via a single API URL.

Migration does NOT:

  • Delete or replace existing code (until the user explicitly says "implement")
  • Modify or delete existing Noukai flows (only creates new ones)
  • Require a Noukai SDK (uses HTTP calls to the slug execution API)

Prerequisites

Before starting migration, the user needs:

  1. A Noukai account with an organization and project created — see Quickstart
  2. An API key — see Managing API Keys
  3. For MCP-assisted creation: Noukai MCP configured in their AI assistant — see MCP Setup

The Four Phases

Migration follows four phases. Each requires user approval before moving to the next.

Phase 1: Audit & Design

Scan the codebase, identify all chained LLM call sites, trace their data flow, and propose equivalent Noukai flows with structural improvement notes.

Read: Audit & Design Protocol

Also read the relevant pattern reference:

Phase 2: Create & Test

Build the approved flows in Noukai via MCP tools. Create test cases, publish versions, and provide test URLs for the user to verify.

Read: Create & Test Protocol

Phase 3: Integrate

Add Noukai API calls alongside existing code, controlled by an environment variable switch. No existing code is removed or replaced.

Read: Integration Protocol

Phase 4: Decommission (User-Driven)

Once the user is satisfied with the Noukai flows in production, they can remove the old LangChain/OpenRouter code at their own pace. This phase is entirely user-driven — do not automate it.

Summary Table

PhaseEntry ConditionOutputUser Gate
Audit & DesignUser says "migrate"Migration plan table"Does this plan look right?"
Create & TestUser approves planLive flows + test URLs"Ready to integrate?"
IntegrateUser says "implement" or "continue"Side-by-side code with env switch"Switch USE_NOUKAI=true to test"
DecommissionUser decidesOld code removedUser-driven, no AI action

On this page