SDK-Based Architecture

The CRM That Lives Inside Your Application

Install our SDK. AI instantly understands your entire system — databases, code, errors, users. Zero integrations. Complete context.

5 minute install. Full system context. No API integrations to maintain.

SDK Auto-Discovery

All Your System Context, Automatically

The SDK discovers your database, codebase, and error logs. AI gets complete context without any integrations.

Database
Codebase
Error Logs
Sessions
Metrics
Docs RAG
app.relay.dev/tickets/TKT-1847
HighTKT-1847

Payment failing

JD
John Davis2 min

Checkout keeps failing. Help?

AI Reply98%

Hi John! Your Visa 4242 expired. Update at Settings → Billing.

Sources: payments, subscriptions

No API integrations to build or maintain — the SDK handles everything

Traditional CRMs Are Broken

You spend months connecting data sources. Your support team still lacks context.

Traditional CRM

  • Build API integrations for every data source
  • Manually sync customer data, often outdated
  • No visibility into errors or application state
  • AI has incomplete, stale context
  • Constant integration maintenance as you scale

Embedded CRM

  • Install SDK once, instant access to everything
  • Real-time database access, always current
  • See actual errors, logs, and user sessions
  • AI has complete, live system context
  • Auto-adapts as your codebase evolves

Simple Installation

5 Minutes to Complete Context

No weeks of integration work. Install our SDK and AI understands your entire system.

terminal
# Install the SDK
npm install @relay/embedded-sdk

# Set your API key
export RELAY_API_KEY=your_key_here

# Optional: Set OpenAI key
export OPENAI_API_KEY=your_openai_key
your-app/index.ts
import { RelayCRM } from '@relay/embedded-sdk'

// Initialize with optional config
await RelayCRM.init({
  database: {
    exclude: ['password_hashes']
  },
  siteUrl: 'https://docs.yourapp.com',
  autoCrawl: true,
})

// SDK automatically:
// - Discovers database connections
// - Parses Prisma schema
// - Detects your framework
// - Connects via SSE
// - Indexes docs for AI

1. Install SDK

npm install and add 10 lines of config. Works with any Node.js, Python, or Ruby app.

2. AI Crawls System

AI automatically discovers your database schema, codebase structure, and data relationships.

3. Instant Context

Support agents have complete, real-time context for every customer interaction.

Deep System Understanding

AI That Actually Knows What's Happening

When a customer reaches out, your AI doesn't just see their message — it sees their subscription status, recent orders, error logs, and exactly what page they're stuck on.

  • Direct database access — subscription, orders, user data
  • Live error tracking — see the exact stack trace
  • Session awareness — what page, what actions
  • Codebase understanding — knows your business logic
AI analyzing full system context...

Customer: My checkout keeps failing!

SYSTEM CONTEXT DETECTED:

  • • User: john@email.com (Pro plan, active since Jan 2024)
  • • Error: PaymentProcessingError at checkout.ts:247
  • • Last 3 attempts failed: card_declined (expired card)
  • • Card on file: Visa ending 4242, exp 12/2024

AI Response:

Hi John! I can see your checkout is failing because your Visa ending in 4242 expired in December 2024. You can update your payment method at Settings → Billing, or I can send you a direct link to update it right now. Would you like me to do that?

Context: users, subscriptions, payments, error_logs

Under the Hood

How It Actually Works

A lightweight SDK that runs inside your application, with a secure real-time bridge to the CRM.

Communication Architecture

Your Application

SDK runs in your Node.js process

SSE (Server-Sent Events) — real-time commands

HTTP POST — query results, context updates

Relay CRM

AI agents query your data in real-time

Zero-Config Auto-Discovery

Database Connections

Scans environment variables for DATABASE_URL,POSTGRES_URL,MONGODB_URI, and more.

Schema Extraction

Parses your prisma/schema.prisma file to understand tables, columns, types, and relationships.

Framework Detection

Identifies Next.js, Express, Fastify, NestJS, Koa, and other frameworks from your package.json and project structure.

RAG Knowledge Base

Crawls your docs site, extracts content, generates embeddings, and indexes for semantic search. AI can reference your product documentation.

Real-Time Query Flow

1

Customer asks: "Why can't I checkout?"

2

CRM sends query to SDK via SSE connection

3

SDK queries your database, returns results

4

AI responds with full context: expired card on file

Always Up to Date

Grows With Your System

Add new database tables? Change your schema? Deploy new features? The CRM automatically discovers changes and updates its understanding.

Schema Discovery

Parses Prisma schemas, introspects databases, maps relationships automatically

Code Awareness

Detects your framework, ORM, and project structure from package.json

Live Updates

SSE connection maintains real-time sync, heartbeats every 30 seconds

Multi-Database

PostgreSQL, MySQL, MongoDB, Supabase, PlanetScale — all supported

Permission Configuration

database: {
  include: {
    tables: ['users', 'orders']
  },
  exclude: {
    tables: ['api_keys'],
    fields: ['*.password']
  },
  autoMask: ['email', 'phone']
}

Enterprise-Grade Security

You Control What We See

Granular permissions let you define exactly which tables and fields the CRM can access. Auto-masking protects PII. Complete audit logging shows every data access.

  • Whitelist or blacklist tables and fields
  • Auto-detect and mask PII patterns
  • Read-only access — we never write to your DB
  • Full audit logging of all data access
  • SOC 2 Type II compliant

Built for Fast-Moving Teams

If you're building something new and moving fast, this is for you.

Startups

You're shipping fast. Your schema changes weekly. You don't have time to maintain integrations. Install once, get full context forever.

SaaS Companies

Complex subscription logic, usage metrics, feature flags. AI finally understands your entire customer lifecycle.

AI-First Teams

You want to fully automate support. That requires complete context. This is the only CRM that can deliver it.

Unified Communications

Every Channel, Complete Context

Voice, SMS, and email — all connected to your embedded system context. AI knows what customers are doing before they even explain.

Voice

Powered by Twilio

When a customer calls, AI instantly pulls their account data, recent errors, and session state from your live database.

  • Real-time customer context on screen
  • AI transcription with auto-tagging
  • Call recordings linked to tickets

SMS

Powered by Twilio

Two-way SMS with AI responses powered by your actual customer data. No guessing, no generic responses.

  • AI replies with live data context
  • Dedicated phone numbers
  • MMS support for screenshots

Email

Native integration

Email threads enriched with full customer context. AI drafts know their subscription tier, recent activity, and open issues.

  • Auto-match emails to customers
  • Smart routing based on content
  • Rich HTML with attachments

Complete Context, Every Channel

Whether they call, text, or email — AI sees their entire history plus live system data. No more "Can you describe the error?" when you already have the stack trace.

A Fundamentally Different Approach

Setup Time

Embedded5 minutes
TraditionalWeeks of integrations

Customer Data Access

EmbeddedReal-time, live DB
TraditionalSynced copies, often stale

Error Visibility

EmbeddedFull stack traces
TraditionalNone

AI Context Quality

EmbeddedComplete system view
TraditionalPartial, imported data only

Data Freshness

EmbeddedReal-time
TraditionalMinutes to hours delayed

Ready to Rethink Customer Support?

Join the waitlist for early access to the first CRM that truly understands your system. We're opening access to select teams now.

Limited spots available • Founding customer pricing • Direct access to the team

Embedded CRM — The CRM That Lives Inside Your Application | Relay | Relay