Get EPIS into your app in 3 minutes
One script tag. One container div. One initialization call. Your users get the full EPIS experience with zero backend setup.
Recommended: Integrate with your Agent
Skip the manual steps below — clone the repo, paste one prompt into any AI coding agent, and get this done for you. See how →
Prerequisites
Client ID
A
clientId issued by PastpaperLM. Email us to get one.Container div
A
<div> somewhere in your page with a defined height (600px, 100% with a sized parent, etc.).A real HTTP(S) origin
Serve your page over
http:// or https:// — opening the file directly (file://) will not work. See Local Development.Step 1 — Load the SDK
Add this to your<head> or just before </body>. One tag. That’s it.
The SDK is served from Cloudflare’s global edge — cached at every PoP worldwide,
immutable cache headers, versioned filename. It costs you one DNS lookup on first visit per user, then nothing.Step 2 — Add containers
Place these<div>s wherever EPIS should appear — sidebar, full page, modal, anywhere:
Step 3 — Initialize
CallEPIS.init() after the DOM is ready and mount into your containers:
What happens next
When a user reaches your page for the first time:- The SDK script loads from
cdn.pastpaperlm.com(edge-cached, ~5ms) EPIS.init()runs and mounts an iframe fromembed.pastpaperlm.com- The iframe checks for an existing PastpaperLM session in its own
localStorage - No session found → user sees “Authenticate with PastpaperLM” screen
- User clicks “Sign in with Google” → popup opens on
pastpaperlm.com - Auth completes → popup posts a token to the iframe → popup closes
- EPIS chat loads — user is now in
localStorage. EPIS loads directly.
The auth popup runs entirely on
pastpaperlm.com. Your users’ credentials never touch your domain.Next steps
Integrate with your Agent (recommended)
Clone the repo, hand one prompt to any AI coding agent, and get a working integration without reading a line of this guide yourself.
Framework guides
Detailed integration guides for Vanilla JS, React, and SPA patterns.
Theming
Match EPIS to your brand colors with theme tokens and presets — or hand your brand description to our AI theming skill and get a config for free.
SDK Reference
Full API reference for every method, event, and config option.
Security model
Understand what’s isolated, what’s shared, and how auth works.
Troubleshooting
Blank embed, blocked popups, theme not applying — the fixes.