Skip to content
All Blueprints
BLUEPRINTMulti-Agent Orchestration

Starlight Intelligence System (SIS)

Strategic AI orchestration layer with multi-model routing, agent coordination, and purpose-driven decision intelligence

Expert8 weeks~$1,800/mo
Multi-Cloud

The Problem

Multi-agent systems lack strategic coordination. Individual agents optimize locally but miss global context. Model routing is static (always Claude or always GPT), wasting cost on simple tasks and quality on complex ones. There's no learning layer that captures what worked and applies it to future decisions.

The Solution

Deploy a strategic orchestration layer with intent classification (16 categories), dynamic model routing based on task complexity and budget, a reasoning bank that learns from past trajectories, and an agent coordination protocol that enables agents to hand off context without losing state.

Overview

The Starlight Intelligence System is a meta-orchestration layer that sits above individual agents and coordinates them toward strategic outcomes. It routes requests to optimal models (Claude, Gemini, GPT, local LLMs), maintains a shared reasoning bank for pattern learning, and provides a unified intelligence API for all downstream applications. Think of it as the brain's prefrontal cortex — it doesn't do the work, it decides what work needs doing and who does it best.

Architecture

Loading interactive diagram...

Components

SIS Gateway

gateway

Unified API endpoint for all intelligence requests. Classifies intent, determines complexity, and routes to optimal processing path.

Service: Vercel Edge Functions

Intent Classifier

ai-service

16-category intent classification. Maps requests to domains: code, research, creative, strategy, health, communication, analysis, etc.

Service: Claude Haiku (fast)

Model Router

compute

Selects optimal model based on task complexity, budget tier, and historical performance. Routes between Claude Opus, Sonnet, Haiku, Gemini, GPT, and local LLMs.

Service: Custom routing engine

Claude Models

ai-service

Opus 4.6 for complex reasoning, Sonnet 4.6 for balanced tasks, Haiku 4.5 for fast classification and routing.

Service: Anthropic API

Gemini Models

ai-service

Gemini 3 Pro for multimodal tasks, image generation, and visual understanding.

Service: Google AI API

Local LLM Pool

ai-service

Llama 4 / Mistral for private queries that shouldn't leave the network. Sovereignty-first option.

Service: Ollama / vLLM

Reasoning Bank

database

Stores decision trajectories, success/failure patterns, and strategy outcomes. Each trajectory includes context, action, result, and quality score.

Service: Supabase + pgvector

Agent Coordinator

compute

Manages multi-agent workflows. Handles task decomposition, parallel execution, context handoffs, and result aggregation.

Service: Claude Agent SDK

Starlight Vault

storage

Strategic memory — long-term patterns, organizational priorities, decision history, and learned preferences. The system's institutional wisdom.

Service: Supabase encrypted storage

Intelligence Telemetry

compute

Cost tracking, latency monitoring, quality scoring, and model performance comparison across all routes.

Service: Vercel Analytics + custom

Implementation Steps

1

Gateway & Classification

2 weeks

Build the unified API gateway with intent classification

Tasks
  • Deploy SIS Gateway on Vercel Edge Functions
  • Train 16-category intent classifier on Claude Haiku
  • Implement complexity scoring (1-10 scale)
  • Build request normalization pipeline
  • Add authentication and rate limiting per tier
Deliverables
Working gateway with intent classificationComplexity scoring
2

Model Router & Multi-Provider

2 weeks

Implement dynamic model selection across providers

Tasks
  • Configure Claude API (Opus/Sonnet/Haiku)
  • Add Gemini API for multimodal routing
  • Set up Ollama for local LLM inference
  • Build routing algorithm (complexity × budget × history)
  • Implement fallback chains (primary → secondary → tertiary)
Deliverables
Multi-provider model routerAutomatic fallback chains
3

Reasoning Bank & Learning

2 weeks

Build the trajectory learning system

Tasks
  • Design trajectory schema (context, action, result, score)
  • Implement trajectory capture on every request
  • Build pattern recognition (which routes work best for which intents)
  • Create feedback loop: trajectory → router weights
  • Deploy Starlight Vault for long-term strategic memory
Deliverables
Learning reasoning bankSelf-improving routing
4

Agent Coordination & Telemetry

2 weeks

Multi-agent orchestration and observability

Tasks
  • Implement task decomposition for multi-step workflows
  • Build context handoff protocol between agents
  • Add parallel execution with result aggregation
  • Deploy telemetry dashboard (cost, latency, quality)
  • Create model performance comparison reports
Deliverables
Agent coordination layerFull observability dashboard

Code Examples

Dynamic Model Routing with Learning

Routes requests to optimal models based on intent, complexity, budget, and historical performance

type ModelTier = 'opus' | 'sonnet' | 'haiku' | 'gemini-pro' | 'local'

async function routeRequest(req: IntelligenceRequest): Promise<ModelTier> {
  const { intent, complexity, budget, userId } = req
  
  // Check reasoning bank for learned patterns
  const history = await reasoningBank.getPatterns({
    intent,
    minScore: 0.8,
    limit: 10,
  })
  
  // If we have strong historical signal, use it
  if (history.length >= 5) {
    const bestModel = history
      .sort((a, b) => b.qualityScore - a.qualityScore)[0]
    return bestModel.modelUsed as ModelTier
  }
  
  // Default routing logic
  if (req.isPrivate) return 'local'
  if (req.hasImages) return 'gemini-pro'
  if (complexity >= 8) return 'opus'
  if (complexity >= 5) return 'sonnet'
  if (budget === 'minimal') return 'haiku'
  
  return 'sonnet' // balanced default
}

Cost Estimate

$1,800

per month

|

$21,600

per year

Claude API (multi-tier)
$800
Gemini API
$300
Supabase Pro
$300
Vercel Pro
$200
Local GPU (Ollama)
$200

Assumptions: 200 active users, ~1000 routed requests/day, 30% Opus, 50% Sonnet, 20% Haiku

Use Cases

Multi-model AI orchestrationCost-optimized inference routingSelf-improving agent systemsEnterprise AI gatewayPrivacy-first hybrid AI deployment

Technologies

Claude Agent SDKAnthropic APIGoogle Gemini APIOllamaVercel Edge FunctionsSupabasepgvectorTypeScriptNext.js

Ready to Build?

Try the interactive prototype or get the production-ready template.