Edit
LearnHouse Headless

Build your own learning platform

Keep authoring, learners and progress in LearnHouse, and put the learning wherever you want it: a page, your React app, a mobile app, an internal tool.

LearnHouseyour instanceEmbed<iframe>React<LearnHouseActivity />SDK@learnhouse/sdkREST API/api/v1 · webhooks

The building blocks

What people build with it

Every card is a real app built on the LearnHouse API, from full products to small widgets. They are open source, so you can start from the one closest to your idea.

Which one do I need?

1You want an activity on a page whose code you don’t controlA CMS, a blog, a help center, a slide deckEmbed
2Your product is a React app and lessons should feel native in itYour fonts and colours, your routing, your analyticsReact component
3You need data: courses, progress, users, or your own UI on topA server, a mobile app, a script, an edge functionSDK
4You don’t write JavaScript, or you need to react to eventsPython, Go, PHP… or a webhook when a learner finishesREST API

They combine well. A common setup is the SDK on your server to list courses and track progress, and <LearnHouseActivity> in the browser to show the lessons themselves.

AI agents in your app

The Agent API gives your product the agents LearnHouse runs itself: Atlas for staff and automation, and Copilot or custom agents that answer learners from their courses, with citations. Replies stream as typed events (text, tool calls, approvals for risky actions, structured views), and the SDK, React and Vue packages ship a ready chat component.

Let an AI assistant build it

Paste this into Claude, Codex or any coding assistant, fill in the first section, and let it build the first version. For a longer, step-by-step spec, see Build with an agent.

Prompt
You are building a custom learning platform frontend on top of LearnHouse, used headless.

## What to build
<Describe your product: who it is for, the main screens, the look and feel. Example: "A mobile-first microlearning app for retail staff: today's lesson, a 3-question quiz, a streak.">

## Stack
- Next.js (App Router) + TypeScript. Plain CSS or Tailwind.
- Server-only environment variables: LEARNHOUSE_URL, LEARNHOUSE_TOKEN (an lh_ org API token, optional for public courses), LEARNHOUSE_ORG_SLUG.
- npm packages: @learnhouse/sdk (typed API client) and @learnhouse/react (renders lessons with LearnHouse's own blocks). Install the version that matches the LearnHouse instance.

## Data (server side, with @learnhouse/sdk)
- const lh = createClient({ baseUrl: process.env.LEARNHOUSE_URL, token: process.env.LEARNHOUSE_TOKEN })
- Courses: lh.courses.list(orgSlug, { limit: 50 })
- Course tree (chapters, activities): lh.courses.getMeta(courseUuid, { slim: true })
- A lesson with its content: lh.activities.get(activityUuid)
- Search: lh.search.org(orgSlug, query)
- Media URLs: lh.media.* helpers
- Never send the token to the browser. Fetch in Server Components or route handlers.

## Lessons (client side, with @learnhouse/react)
- Import '@learnhouse/react/styles.css' once.
- Render a lesson fetched on the server: <LearnHouseActivity activity={activity} courseId={courseUuid} baseUrl={LEARNHOUSE_URL} />
- Match the product's look with theme={{ accent, fontFamily, radius, contentWidth }}, and replace blocks with components={{ blockQuiz: MyQuiz }} when needed.
- Use onEvent (load, ready, complete, media...) for analytics and progress.

## Learner state
An lh_ API token acts for the organization, not a learner. Keep progress in your app (localStorage for a prototype, your database for production), or sign learners in to LearnHouse and use lh.trail.completeActivity with their own token.

## Quality bar
Responsive down to 375px, keyboard accessible, real loading/empty/error states, no placeholder text: use the real courses from the API.

Docs: https://docs.learnhouse.app/developers

Run the demos locally

Terminal
git clone https://github.com/learnhouse/headless-examples
cd headless-examples && bun install
cp .env.example .env.local   # set LEARNHOUSE_API_URL and LEARNHOUSE_ORG_SLUG
bun dev --port 3100

Point it at your own instance, or at any public LearnHouse organization. The demos fetch on their server, so no token reaches the browser.

Same blocks everywhere

Embeds and the React component render lessons with LearnHouse's own blocks, without starting the editor.

Activity JSON
What the editor saves
static render
LearnHouse blocks
Quiz, flipcards, code, math… the editor’s own components
your theme
Your page
Embed or <LearnHouseActivity>

No editor is started to show an activity: the saved document is turned straight into the same block components LearnHouse uses, and each block’s code loads only when the document contains that block.

One version for everything

The SDK and the React component are released with LearnHouse itself, under the same version number.

Release1.4.3
Dockerghcr.io/learnhouse/appDocker image1.4.3
npm@learnhouse/sdknpm1.4.3
React@learnhouse/reactnpm1.4.3
Vue.js@learnhouse/vuenpm1.4.3

Install the version that matches your self-hosted instance, or the latest one for LearnHouse Cloud. See Versions & releases and the full release history.

Inside LearnHouse

Working on LearnHouse itself rather than on top of it?

  • Architecture: how the web app, API and collaboration server fit together.
  • Contributing: run the stack locally and open your first pull request.
  • Migration: bring courses over from another LMS.

Frequently asked questions

What is a headless LMS?

A headless LMS keeps courses, learners, progress and grading in the learning platform, and lets you build the interface yourself. With LearnHouse you author courses in the LearnHouse editor, then show them in your own website, React or Vue app, mobile app or internal tool through the API, the SDK and the components.

Is LearnHouse an open-source headless LMS?

Yes. The LearnHouse platform is open source under the AGPL-3.0 license, and the developer packages (@learnhouse/sdk, @learnhouse/react and @learnhouse/vue) are MIT-licensed. You can use LearnHouse Cloud or self-host it.

Does LearnHouse have React components?

Yes. @learnhouse/react renders LearnHouse activities (pages, quizzes, flipcards, scenarios, code playgrounds, math, video and PDFs) inside any React 18 or 19 app, including Next.js and Vite. @learnhouse/vue does the same for Vue 3 and Nuxt.

Is there a TypeScript SDK for the LearnHouse API?

Yes. @learnhouse/sdk is a typed TypeScript and JavaScript client generated from the API schema. It has no dependencies and runs in browsers, Node, Bun, Deno, edge workers and React Native.

Can I embed LearnHouse courses without writing code?

Yes. Every page, video and PDF activity has an embed code: an iframe you can paste into any website, blog, help center or Notion page.