Module · SAGE

Support & Guidance Engine

Give your users the help they need before they have to ask for it. Knowledge base, onboarding, and tickets — built in.

SAGE — Port 8003

What SAGE gives you

Knowledge Base

A fully searchable knowledge base with category tagging, article ordering, and full-text search powered by Supabase pg_trgm. Articles support Markdown with syntax highlighting.

Onboarding Checklists

Define onboarding steps for your product. SAGE tracks each user's completion state in the database. Checklists are resumable — users pick up where they left off across sessions.

Support Ticket System

Users submit tickets with priority and category. Tickets move through open → in_progress → resolved states. Email notifications fire on status changes via your transactional email provider.

Contextual Documentation

Surface relevant knowledge base articles inside your app by tagging content with context_keys. Call the context API with the current user's screen and get matching articles instantly.

Full-Text Search

Supabase pg_trgm similarity search across all knowledge base content. Results ranked by relevance. Works without a separate search service — no Algolia required.

Self-Service First

SAGE is designed to reduce support burden. The contextual docs API shows help articles before the user reaches the ticket form. Deflect tickets at the source.

Install SAGE

terminal
# Scaffold SAGE module
$ npx kiban@latest init --module sage

# Run migrations
$ kiban migrate && kiban seed

# Embed contextual help widget:
import { SageHelpWidget } from '@kiban/sage-client'

# Query contextual docs:
GET /api/v1/docs/context?key=billing_settings

✔ SAGE running on http://localhost:8003

Onboarding checklist model

# Define steps in kiban.config.ts
onboarding: {
  steps: [
    { key: 'connect_domain',    title: 'Connect your domain'   },
    { key: 'invite_team',       title: 'Invite team members'   },
    { key: 'configure_billing', title: 'Set up billing'        },
    { key: 'first_publish',     title: 'Publish first content' },
    { key: 'explore_analytics', title: 'Explore analytics'     },
  ]
}

# SAGE persists per-user state in user_onboarding_progress
# Mark a step complete from your backend:
POST /api/v1/onboarding/steps/connect_domain/complete

How to integrate

Scaffold SAGE

Run kiban init --module sage. Sets up the FastAPI backend on port 8003 and adds the SAGE_BACKEND_URL environment variable.

Run migrations

kiban migrate creates articles, article_categories, onboarding_steps, user_onboarding_progress, and tickets tables.

Seed starter content

kiban seed adds a Getting Started category with 3 sample articles and a default 5-step onboarding checklist.

Add the help widget

Import <SageHelpWidget /> into your app shell. It opens a contextual panel with matched articles and a ticket form — no separate support portal needed.

SAGE is included in Enterprise

The full support infrastructure — knowledge base, tickets, and contextual docs — comes with the Enterprise license. Pro includes a limited SAGE tier (knowledge base and onboarding checklists, no ticket system). All licenses are perpetual.