# Sypnia Learn documentation > Sypnia Learn teaches you to build software the Sypnia way: use cases first, then the design, the data, the code, publishing and watching it in production. It starts at your level and grows with you. The lessons use your own project as the material, the exercises change a real case on a branch of their own, and your progress lives in the same memory the agent reads. Sypnia comes two ways, and every page says which one it is about: - **Sypnia Learn engine** (open source, for your school or your team): Ingest, storage, aggregation, problem grouping, sessions, replay data and uptime checks. You read it through: The HTTP API, the MCP server, the CLI and the Console: one built-in page with the problems list and the session replay viewer. - **Sypnia Cloud** (sypnia's courses, in your account): The same engine, run by us. You read it through: The full app: replay player, performance, uptime, daily summary, search and teams. Every page is also plain Markdown: add `.md` to its address (`https://learn.docs.sypnia.com/start/open-source-and-cloud.md`). All pages in one file: https://learn.docs.sypnia.com/llms-full.txt ## Start here What Sypnia Learn is, how it works, what is open source and what is Sypnia Cloud, the quickstarts, and how Sypnia uses it. - [Start here: overview](https://learn.docs.sypnia.com/start.md): Section index for Sypnia Learn: courses and guided learning to build software the Sypnia way (use cases first), Santi as presenter, in Spanish and English, free with a free certificate, self-paced, no live classes, 16 or older; adapts to the level from Agent's knowledge test (starter|builder|developer|senior); lessons bound to the learner's own project; exercises on a branch, checked automatically; progress in the account memory; learning inside App («explain this», lessons in the moment, teach-me-while-you-build). Engine AGPL-3.0, @sypnia/learn and the lesson format MIT. [Engine, Cloud] - [What Sypnia Learn is](https://learn.docs.sypnia.com/start/what-it-is.md): Sypnia Learn: courses (video, Santi presenting, in Spanish and English; free, with a free certificate; self-paced, no live classes; 16 or older) + guided learning inside App. The Sypnia way: idea → map of use cases → contract (landing + plan) → design guide → data → code one case at a time with tests → publish → watch with Telemetry. Adapts to level (starter|builder|developer|senior). Lessons bind to the learner's own project (their cases, data, traces); a sample project (La Espiga) when they have none. Exercises change a real case on a branch learn/; checks: Cases check, design check, tests, Telemetry, questions. Progress in the account memory. Not: live classes, a generic programming school, a place where an agent does the exercise for you. [Engine, Cloud] - [How it works](https://learn.docs.sypnia.com/start/how-it-works.md): Flow: level from the account profile → next lesson on the path (needs satisfied) → the lesson is assembled for the level and bound to the learner's project (the `uses` selector picks a case/table/trace; sample project otherwise) → learn start creates branch learn/ in the project's repo (Sypnia Git or any git) with the exercise brief → learner (alone, or with the agent giving hints) changes the case → learn check runs the lesson's checks in a sandbox (cases check, design check, tests, telemetry on the preview, questions) → all pass = done; progress recorded, a memory note written; the branch is kept, never merged automatically. Hosts: learn.app.sypnia.com, learn.api.sypnia.com/v1, mcp.learn.sypnia.com. [Engine, Cloud] - [Open source and Sypnia Cloud](https://learn.docs.sypnia.com/start/open-source-and-cloud.md): Engine (AGPL-3.0): serves courses written in the lesson format (MIT), levels, binding to a project, exercises on branches, checks through a runner (Agent's open sandbox or a Docker runner), progress per learner, API, CLI, MCP; sign-in with a Sypnia Data engine or any OpenID Connect provider; no Sypnia courses. Sypnia Cloud: Sypnia's courses with Santi (free, with a free certificate; videos in Spanish and English with captions), progress and memory in the Sypnia account, lessons inside App, hosted sandboxes for checks, explanations through Sypnia AI paid with credits. [Engine, Cloud] - [Quickstart](https://learn.docs.sypnia.com/start/quickstart.md): Learn quickstart (Sypnia Cloud): in App open Learn (or learn.app.sypnia.com), take the level test if not taken; path suggests first lesson; terminal: npx @sypnia/app login; npx @sypnia/learn next → failures-have-names (course use-cases-first, starter); learn start failures-have-names --project la-espiga → branch learn/failures-have-names with LEARN.md brief; add cases/orders/cancel-order.case.yaml with failure TooLate; learn check → cases check ✓, case cancel-order ✓, failure TooLate ✓, question ✓ → done; memory note written; keep the branch with a pull request or delete it. [Cloud] - [Quickstart: self-host](https://learn.docs.sypnia.com/start/quickstart-self-host.md): Self-host quickstart: compose.yaml with learn (ghcr.io/sespinosav/sypnia-learn:1, port 8097), postgres:16, minio; SYPNIA_LEARN_ROOT_TOKEN; SYPNIA_LEARN_AUTH_URL (Sypnia Data engine) or SYPNIA_LEARN_OIDC_*; runner SYPNIA_LEARN_RUNNER=docker; docker compose up; npx @sypnia/learn login --server http://localhost:8097; learn courses add ./courses/team-onboarding (lint + upload); learn start ; learn check. [Engine] - [How Sypnia uses it](https://learn.docs.sypnia.com/start/how-sypnia-uses-it.md): Dogfooding: Telemetry is the pilot that uses every Sypnia product. Sypnia's courses teach by building pieces of Telemetry's own map: its real cases (e.g. see-a-problem, analyze-problem) and safe, masked traces are public course material; the senior course reads Telemetry's event flows. Telemetry watches Learn: lesson pages and videos send errors and vitals; a learner stuck on a check = a problem grouped by lesson; scope errors in exercises and rage clicks on lesson screens show where a lesson is unclear; Learn's own cases (start-exercise, check-exercise, explain-item) are traced. Sypnia's team onboarding is a private course of Sypnia's organization. Learn itself runs on Sypnia: code in Git, sign-in with Data, videos in Files, deploys on Run, explanations with AI, checks in Agent sandboxes, screens designed with Design. [Engine, Cloud] ## Paths and levels Your level, the path for each level, and the order every course follows. - [Paths and levels: overview](https://learn.docs.sypnia.com/paths.md): Your level, the path for each level, and the order every course follows. [Engine, Cloud] - [Your level](https://learn.docs.sypnia.com/paths/your-level.md): Level = the Sypnia profile from Agent's knowledge test (~10 questions, adaptive): starter|builder|developer|senior, plus explain plain|mixed|technical and language. Learn reads it (Cloud: the account; engine: the learner sets it, or the engine reads a Sypnia Data profile). It changes: the words, which parts of a lesson appear (level blocks), the size of the exercise and its hints, which checks apply. Learn proposes a new level after a path's checkpoint lessons pass, never changes it silently; the person accepts in Account → Level. Per lesson, «simpler» / «more technical» switches only that lesson. [Engine, Cloud] - [The paths](https://learn.docs.sypnia.com/paths/the-paths.md): Sypnia's paths (Sypnia Cloud courses): starter → first-website («Your first website with AI»: build and publish without programming), use-cases-first («Your app as use cases»); builder → design-your-app, data-for-your-app, publish-and-watch; developer → cases-in-code (Sypnorm, transactions: lesson one-order-one-transaction uses place-order), tests-for-every-ending, production-with-telemetry; senior → events-between-cases, run-sypnia-yourself. A path is an ordered list of courses with checkpoint lessons; any lesson can be taken out of order; needs (prerequisites) are shown, never enforced. [Cloud] - [The Sypnia way](https://learn.docs.sypnia.com/paths/the-sypnia-way.md): The Sypnia way (curriculum order): 1 idea in your words; 2 the map of use cases (actors, cases, failures; what is not on the map is a scope error); 3 the contract (landing page + plan the person approves; promises tied to cases); 4 the design guide (each project its own; screens per case from it); 5 the data (tables each case reads/writes, row-level security); 6 the code, one case at a time with tests for every ending; 7 publish (preview, production, domain); 8 watch production with Telemetry, fix by case. Each lesson says which step it belongs to. [Engine, Cloud] ## Courses The video courses, lessons built on your project, exercises, progress and languages. - [Courses: overview](https://learn.docs.sypnia.com/courses.md): The video courses, lessons built on your project, exercises, progress and languages. [Engine, Cloud] - [Video courses](https://learn.docs.sypnia.com/courses/video-courses.md): Sypnia's courses are presented by Santi (Sypnia's founder), in Spanish and in English (every video in both, with captions in its language), a transcript on every lesson, and the lesson text in both languages; free, self-paced, no live classes. Videos are short (one idea each), show the real product (Sypnia's interface, the map, the screens), and are stored in Sypnia Files and streamed from its CDN. Chapters, speed 0.75–2×, keyboard controls, captions on by default when the video language differs from the person's. Clips of the courses appear on Sypnia's channels; the lesson page is the full version. [Cloud] - [Lessons on your project](https://learn.docs.sypnia.com/courses/lessons-on-your-project.md): Binding: each lesson declares `uses` selectors (case with failures / case that writes 2+ tables / case with where / table with RLS / trace with an error / landing promise). On opening, Learn picks a match from the learner's project (read through Cases, Data schema, Telemetry with the person's permissions), shows which one it chose and lets them pick another. No match or no project: the sample project La Espiga (public repo sespinosav/sypnia-learn-espiga) is used. The lesson text has slots ({{case.title}}…) filled from the chosen item. Data rows are never used by default, only schema and case text; traces only from preview/test environments unless the person chooses production (masked). [Engine, Cloud] - [Exercises](https://learn.docs.sypnia.com/courses/exercises.md): Exercise lifecycle: start → branch learn/ from the default branch (Sypnia Git or any git remote; local folder with the CLI) + LEARN.md brief at the root (removed by learn finish); work alone or with the agent (hints at the person's level; at starter the agent may write code, but a person approves each change; at developer+ hints only after a failed check unless asked); check → the lesson's checks in a sandbox on the branch's commit; result per check with what to fix; retry unlimited. States: started, checking, passed, failed, abandoned. Done = all checks pass. Never merged automatically; keep with a pull request (LEARN.md removed) or delete. Exercise on the sample = a fork in the learner's organization. [Engine, Cloud] - [Progress and memory](https://learn.docs.sypnia.com/courses/progress-and-memory.md): Progress per lesson: status (started|done), lesson version, the exercise's check results (names and pass/fail, never code), dates. Video position kept per lesson. Certificate: free, when every lesson of a course is done (checks passed); shows the person's name, the course and the date; in Account → Learn, downloadable, private until the person shares it. On done, a person-scope memory note: «finished (), » with the concepts it covers, so Agent explains accordingly; visible in Account → Memory, deletable. Stored in the Sypnia account (Cloud) or the engine (self-hosted). Private: organizations see a member's progress only when the member shares it (per organization). Export JSON (GET /progress/export), delete all (DELETE /progress, person only). [Engine, Cloud] - [Languages](https://learn.docs.sypnia.com/courses/languages.md): Sypnia's courses: in Spanish and in English, every video in each language with captions in its language; transcripts and lesson text in both; code, file names, commands, case and failure names always in English in both (place-order, OutOfStock). Explanations («explain this», hints) in the person's language from the profile. Lesson format: one file per language (`.lesson.md` in the first language, `..lesson.md` for others) or a single language; the engine shows the person's language, else the course's first language. [Engine, Cloud] ## Learning inside App «Explain this», short lessons at the right moment, and the agent that teaches while it builds. - [Learning inside App: overview](https://learn.docs.sypnia.com/in-app.md): «Explain this», short lessons at the right moment, and the agent that teaches while it builds. [Engine, Cloud] - [Explain this](https://learn.docs.sypnia.com/in-app/explain-this.md): «Explain this» button on every item of App's side panel (Code selection, Diff hunk/file, Data table/column, Logs line, Telemetry problem/trace/span, Map case/failure, Preview element) and in the CLI (learn explain | --case | --trace | --problem ). POST /v1/explain {item: {kind, ref}, level?, language?} → explanation at the person's level + links to the lessons that cover it + «show me more» / «simpler». Uses Sypnia AI under Learn's task explain (a task of Learn's own), with the person's permissions to read the item; secrets and masked values never sent; data rows not sent unless the item is a row the person opened. Answer not stored; a count is. Spends credits in Sypnia Cloud like any AI call (shown as Learn in the ledger). [Engine, Cloud] - [Lessons in the moment](https://learn.docs.sypnia.com/in-app/lessons-in-the-moment.md): Offers: Learn listens to events of the person's projects (first scope error, first failed Cases check, first migration proposal, first production deploy approval, first Telemetry problem on a case they own, first failed test of an ending, first design check finding) and, if a lesson covers it and it is not done, App shows one quiet offer: «2-minute lesson: why this was a scope error?» with Watch / Later / Don't offer this. Rules: never blocks or interrupts an approval or a running task; at most one offer an hour and three a day; each trigger once per person; off entirely in Account → Learn → Offers, or per project. GET /v1/offers, POST /v1/offers/{id}/dismiss. [Engine, Cloud] - [Teach me while you build](https://learn.docs.sypnia.com/in-app/teach-me-while-you-build.md): Teach mode: a session setting (say «teach me while you build», or the switch in the session header; CLI agent --teach; API session setting learn.teach=true). The agent: explains the plan in the case's terms before acting; before each step says what and why at the person's level; leaves «your turn» moments sized by level (starter: choose between options, name a failure; builder: edit a case or a field; developer: write a function or a test, the agent reviews; senior: decide the design); links lessons that cover what just happened; summarizes what was learned at the end and offers to save it as memory notes. Slower and uses more model calls, so the task budget estimate grows; the agent says so before starting. Safety rules unchanged. [Engine, Cloud] ## The lesson format Lessons as files anyone can read, the checks that prove an exercise, and how to write good lessons. - [The lesson format: overview](https://learn.docs.sypnia.com/lessons.md): Lessons as files anyone can read, the checks that prove an exercise, and how to write good lessons. [Engine, Cloud] - [Lesson files](https://learn.docs.sypnia.com/lessons/the-lesson-format.md): Format 1 (MIT). Course folder: learn//course.yaml {format: 1, id, title, description, level[], language (first), languages[], lessons[] (ids in order), checkpoints[]} + one .lesson.md per lesson (+ .es.lesson.md per extra language) + media/ (video, captions .vtt, images). Lesson frontmatter: id (kebab), title, goal (one sentence: what you can do after), level[] (starter|builder|developer|senior), step (idea|map|contract|design|data|code|publish|production), needs[] (lesson ids), minutes, video {file, captions{es,en}, chapters[]}, uses {: selector} (case: {has: failures|where|writes: 2}, table: {rls: true}, trace: {error: true}, promise: true; fallback: sample), exercise {brief, branch (default learn/), checks[]}. Body: Markdown; level blocks ':::level starter builder' … ':::'; slots {{case.title}}, {{case.id}}, {{case.failures[0].name}}, {{table.name}}; questions ':::question' blocks. Unknown fields kept with warnings; x- prefix for extensions. learn lint validates. [Engine, Cloud] - [Checks](https://learn.docs.sypnia.com/lessons/checks.md): Check kinds: cases-check (the Cases check passes on the branch); case {id?|exists|has: failures|where|status, failure: } (a case in the map matches); design-check (Sypnia Design check passes, optionally only codes[]); tests {command, case?} (a command exits 0 in the sandbox, e.g. npm test -- place-order); telemetry {case, outcome: |failure: , env: preview} (a trace of the case with that ending arrives from the branch's preview within 5 min); question (answered right by the person, in App or the CLI — never by an agent token); file {path, contains?} (a file exists). Run in a sandbox on the branch's last commit (Agent's hosted sandbox in Cloud; the configured runner self-hosted), no secrets, no production access, 10 minutes max per exercise; results: pass|fail|error (error = could not run, not the learner's fault, retried). Custom checks: tests with any command. [Engine, Cloud] - [Writing lessons](https://learn.docs.sypnia.com/lessons/writing-lessons.md): Authoring guide: one goal per lesson, a few minutes; start from the case (use cases first), say which step of the Sypnia way; write the shared text for everyone and put level-specific parts in level blocks; bind examples with uses + slots, test against the sample (learn preview --level starter --project sample); exercises small and on one case; checks that test the goal, not the exact code (prefer case/cases-check/tests over file contains); one question at most, about understanding; code names in English in every language; videos one idea each with chapters and captions; lint and preview before publishing (learn lint, learn preview, learn courses add). Organizations publish private courses in Sypnia Cloud with the admin scope. [Engine, Cloud] ## SDK, CLI and MCP The @sypnia/learn package, the learn command and the MCP tools for agents. - [SDK, CLI and MCP: overview](https://learn.docs.sypnia.com/tools.md): The @sypnia/learn package, the learn command and the MCP tools for agents. [Engine, Cloud] - [The @sypnia/learn package](https://learn.docs.sypnia.com/tools/sdk.md): @sypnia/learn (MIT, TypeScript, Node 20+). Entry points: @sypnia/learn/format (parseCourse(dir), parseLesson(file), lint(dir) → {problems[]}, render(lesson, {level, language, slots}) → {html, text, blocks}); @sypnia/learn/checks (runChecks(lesson, {repo, commit, runner}) — local runner for authors); @sypnia/learn/client (createLearn({token|session, baseUrl}) → courses.list/get, lessons.get(id,{level}), next(), exercises.start(lessonId,{project}), exercises.check(id), progress.list/export/delete, explain({kind, ref}), offers.list/dismiss). Default baseUrl https://learn.api.sypnia.com/v1; session from ~/.config/sypnia (npx @sypnia/app login). [Engine, Cloud] - [The learn command](https://learn.docs.sypnia.com/tools/cli.md): npx @sypnia/learn (learn after npm i -g @sypnia/learn); signed in with the shared session (npx @sypnia/app login; --server for an engine). Learners: courses, course , next, lesson [--level] [--lang], start [--project ] [--path ], check [--watch], hint, status, finish --keep|--drop, explain |--case|--trace|--problem, progress [--json], progress export|delete. Authors: lint , preview [--level] [--project sample|] [--lang], courses add [--org], courses remove . Flags --json, --org. Exit codes: 0 ok, 1 error, 2 usage, 3 not signed in, 4 forbidden, 5 checks failed. [Engine, Cloud] - [MCP for agents](https://learn.docs.sypnia.com/tools/mcp.md): Learn MCP at https://mcp.learn.sypnia.com (Streamable HTTP; OAuth with PKCE + dynamic client registration, or a personal access token; engine: /mcp). Tools: list_courses, get_lesson (id, level?, language?), next_lesson, get_progress, explain (kind, ref), start_exercise (lesson, project) — creates the branch, no approval needed (reversible); check_exercise (id) — runs checks; hint (exercise id). Not tools: answering questions, marking a lesson done, deleting progress, publishing courses, changing the level (person only; API 403 person_required). The agent uses the person's level to explain; every call recorded. [Engine, Cloud] ## API reference The Learn API: addresses, authentication, errors and limits. - [API reference: overview](https://learn.docs.sypnia.com/api.md): Learn API at https://learn.api.sypnia.com/v1 (Cloud) or /v1. Auth: Authorization: Bearer . Every record belongs to a person; no app secret keys. Scopes for PATs: learn (own lessons, exercises, progress, explain), read (courses), admin (publish/remove courses; org owners/admins in Cloud). Agent tokens (OAuth clients acting for a person) can do learner actions except questions, done, progress deletion, level, publishing → 403 person_required. Error shape {error {code, message}}. Codes: 400 invalid_request/invalid_lesson, 401 unauthorized, 402 insufficient_credits, 403 forbidden/person_required, 404 not_found/lesson_not_found/project_not_found, 409 exercise_exists/check_running, 413 too_large, 422 no_match (uses selector found nothing and the sample is off)/repository_unreachable, 429 rate_limited (retry-after), 503 runner_unavailable. [Engine, Cloud] - [Endpoints](https://learn.docs.sypnia.com/api/endpoints.md): Endpoints: GET /courses, GET /courses/{id}, POST /courses (admin; multipart course folder → new version), DELETE /courses/{id} (admin); GET /lessons/{id}?level=&language=&project= (rendered + bound items), GET /next; POST /lessons/{id}/exercises {project, path?} → 201 exercise {id, branch, state}; GET /exercises, GET /exercises/{id}, POST /exercises/{id}/check → 202 run, GET /exercises/{id}/checks, POST /exercises/{id}/hint, POST /exercises/{id}/finish {keep: bool}, POST /questions/{lesson}/{question}/answer (person) ; GET /progress, GET /progress/export, DELETE /progress (person); POST /explain {item {kind: diff|case|failure|trace|problem|table|column|log|code, ref}, level?, language?}; GET /offers, POST /offers/{id}/dismiss {forever}; GET|PATCH /settings {offers, offers_projects, teach_default, language, captions}; GET /health; MCP at /mcp. [Engine, Cloud] ## Architecture How Sypnia Learn is built: its parts, how they connect, and why exercises run outside the engine. - [Architecture: overview](https://learn.docs.sypnia.com/architecture.md): Learn architecture: one TypeScript service (Node 22; AGPL-3.0) with the API, the MCP server, the lesson renderer (shares @sypnia/learn/format with the CLI: parse, level blocks, slots), the binder (reads the learner's project through Cases, Data, Telemetry, Git APIs with the person's token), the exercise service (branches through Git APIs or the CLI's local git), the check orchestrator (jobs to a runner: Agent sandbox API in Cloud, sypnia-sandbox or a Docker runner self-hosted), the offers listener (events from Cases, Agent, Run, Telemetry, Design), the memory writer (Agent memory API / account); Postgres (schema sypnia_learn) for courses, lessons, exercises, check runs, progress, offers, settings; object storage for course files and videos (Sypnia Files in Cloud); Sypnia AI for explanations and hints. Console learn.app.sypnia.com in @sypnia/ui (private). [Engine, Cloud] - [Request paths](https://learn.docs.sypnia.com/architecture/request-paths.md): Paths: (1) open a lesson: GET /lessons/{id}?project= → load lesson version → resolve level (profile) and language → binder runs uses selectors against Cases (map), Data (schema only), Telemetry (preview/test traces) with the person's token, cached 10 min → render level blocks + slots → response with bound items. (2) start: POST /lessons/{id}/exercises → Git API: branch learn/ from default branch + commit LEARN.md → exercise row started. (3) check: POST /exercises/{id}/check → check_run queued → runner job {repo, commit, checks, timeout 10 min} → runner clones, runs each check, posts results (signed callback) → all pass: progress done, memory note via account memory API, Telemetry span check-exercise. (4) explain: POST /explain → read the item with the person's token → mask secrets → Sypnia AI task explain with level/language → answer streamed, not stored. (5) offers: product events (EventBridge in Cloud, webhooks self-hosted) → match trigger to undone lesson → rate rules → offer row → App polls GET /offers or receives push. [Engine, Cloud] - [Data model](https://learn.docs.sypnia.com/architecture/data-model.md): Schema sypnia_learn: courses (id, org nullable = public, title, levels, languages, current_version), course_versions (course, version, files_key, published_by, at), lessons (course, id, version, level[], step, needs[], uses jsonb, exercise jsonb, minutes, video jsonb), learners (person id from the account or OIDC subject, level, language, settings jsonb), exercises (id ex_…, person, lesson, lesson_version, project, repo, branch, state, created/updated), check_runs (id, exercise, commit, state queued|running|done|error, results jsonb [{check, result pass|fail|error, message}], started/finished), progress (person, lesson, status started|done, version, done_at, video_position), shares (person, org), offers (id, person, trigger, lesson, project, shown_at, state open|later|dismissed|forever), memory_notes (person, lesson, note_id in the account memory). No content of explanations; counts only (explain_usage: person, day, count). [Engine, Cloud] - [On AWS](https://learn.docs.sypnia.com/architecture/reference-implementation-aws.md): Sypnia Cloud reference: CloudFront (learn.api.sypnia.com, mcp.learn.sypnia.com) → Lambda (Node 22: API, MCP, renderer, binder) in us-east-1; schema sypnia_learn on the shared RDS Postgres through RDS Proxy; SQS check queue + DLQ → check orchestrator Lambda → Sypnia Agent sandbox API (ECS Fargate tasks, no public IP); results callback signed; EventBridge bus receives product events for offers; course files and videos in a Sypnia Files bucket (learn-media) served through its CloudFront with signed URLs for org courses; Sypnia AI for explanations; account memory API for notes; spans to Telemetry; secrets in SSM/KMS. Deployed with Sypnia Run. [Cloud] - [Failures and scaling](https://learn.docs.sypnia.com/architecture/failures-and-scaling.md): Failures: runner down/timeout → check result error (never fail), retried up to 3 times with backoff, then 503 runner_unavailable shown as «couldn't check, try again», exercise stays as it was; result callback lost → orchestrator polls the runner; Git down → can't start/finish (repository_unreachable), lessons still open; Cases/Data/Telemetry down → binder falls back to the sample project for that slot and says so; Sypnia AI down → explanations unavailable, lesson text, videos and checks work; memory write fails → retried from an outbox, progress is the source of truth; video CDN down → transcript still there; engine Postgres down → 503. Idempotency: check runs keyed by exercise+commit; progress writes idempotent. DLQ alarms. [Engine, Cloud] - [Codebase](https://learn.docs.sypnia.com/architecture/codebase.md): Repos (Sypnia Git, mirrored to GitHub): sespinosav/sypnia-learn (open source): engine/ (TypeScript service, AGPL-3.0), packages/learn (@sypnia/learn: format, client, CLI, checks; MIT), spec/lesson-format.md and spec/openapi.yaml, spec/mcp.json, docker/, cases/ (Learn's own map: open-lesson, start-exercise, check-exercise, explain-item, offer-lesson, delete-progress). sespinosav/sypnia-learn-espiga (open, MIT): the sample bakery project. Sypnia's courses (lessons and videos) in a private repository of Sypnia's organization; the console is private. [Engine, Cloud] ## Self-hosting Run the open-source engine for your school, your company or your community. - [Self-hosting: overview](https://learn.docs.sypnia.com/self-hosting.md): Self-hosting Learn: the engine (ghcr.io/sespinosav/sypnia-learn, port 8097) + Postgres 16 + S3-compatible storage; sign-in through a Sypnia Data engine or any OpenID Connect provider; a runner for checks (Agent's open sandbox, or the Docker runner sypnia-learn-runner); optional model endpoint for explanations (a Sypnia AI gateway or any OpenAI-compatible endpoint); optional Git (Sypnia Git engine, any git over HTTPS) and product engines (Cases, Data, Telemetry) for binding. Without them: lessons bind to the sample project and exercises work from the CLI with a local folder. [Engine] - [Docker](https://learn.docs.sypnia.com/self-hosting/docker.md): compose.yaml: learn (ghcr.io/sespinosav/sypnia-learn:1, 8097, SYPNIA_LEARN_*), db (postgres:16), storage (minio), runner (ghcr.io/sespinosav/sypnia-learn-runner:1: runs each check in a throwaway container with no network except package registries, no host mounts, 2 CPU / 2 GB / 10 min; needs the Docker socket only in the runner container; better: point SYPNIA_LEARN_RUNNER at an Agent sandbox). Health GET /v1/health; metrics GET /metrics with the root token. Migrations: SYPNIA_LEARN_AUTO_MIGRATE=true or docker compose run learn sypnia-learn migrate. Size: 256 MB for the engine; the runner needs about 2 GB per check running at once. [Engine] - [Configuration](https://learn.docs.sypnia.com/self-hosting/configuration.md): Settings (env, prefix SYPNIA_LEARN_): DATABASE_URL (required), ROOT_TOKEN (required), PUBLIC_URL (http://localhost:8097), PORT (8097), STORAGE_URL (required), AUTH_URL (Sypnia Data engine) or OIDC_ISSUER + OIDC_CLIENT_ID (+ OIDC_CLIENT_SECRET), RUNNER (agent= | docker= | off), RUNNER_SECRET, CHECK_TIMEOUT_S (600), CHECKS_PER_PERSON (3), AI_URL (OpenAI-compatible /v1) + AI_KEY + AI_TASK (explain), GIT_URL (Sypnia Git engine; else exercises from the CLI only), PRODUCTS (cases=,data=,telemetry= engine URLs for binding), SAMPLE (on), OFFERS (on), OFFERS_PER_DAY (3), EVENTS_SECRET (webhooks from product engines), OTLP_ENDPOINT/OTLP_HEADERS, AUTO_MIGRATE (false), LOG (info), MCP (true), MAX_UPLOAD_MB (2048 per course video). [Engine] - [Upgrades](https://learn.docs.sypnia.com/self-hosting/upgrades.md): Semver; image tags :1 (major), :1.4 (minor), :1.4.2. Minor and patch upgrades: pull, restart, migrations forward-only and safe to run on a live engine. Majors: release notes; the previous major gets security fixes for 6 months. Lesson format version is separate (format: 1); engines read every format they know and refuse newer ones with a clear message; learn lint warns. Course versions and progress are never rewritten by an upgrade. Back up Postgres and the storage bucket before a major. CLI and engine work one minor apart. [Engine] ## Security and privacy Who sees a learner's progress, what lessons read from your project, the threat model and the checklist. - [Security and privacy: overview](https://learn.docs.sypnia.com/security.md): Who sees a learner's progress, what lessons read from your project, the threat model and the checklist. [Engine, Cloud] - [Privacy](https://learn.docs.sypnia.com/security/privacy.md): Privacy: kept = account id, level, language, settings, progress per lesson (status, check names pass/fail, dates, video position), exercises (repo, branch, state), offers shown; not kept = code (stays in the repo), explanation content, time on page, keystrokes, video watching patterns beyond position. Progress private to the person; organizations see only what a member shares (lessons done, never code/answers). No public profiles, rankings, streaks, chat between learners, ads or selling data. Project data in lessons: read with the person's permissions; schema and case text only; rows only on «Use my rows»; production traces only on choice and masked; secrets never. Minimum age: 16 or older; Learn collects nothing beyond the above; a self-hosted engine uses its own sign-in and the operator decides who takes part. Export and delete at any time. [Engine, Cloud] - [Threat model](https://learn.docs.sypnia.com/security/threat-model.md): Threats: exercise code escapes and reaches other learners or secrets (runs only in a runner sandbox: branch only, no secrets, no production, egress limited to package registries, limits, throwaway); a lesson file injects instructions into the agent (lesson text treated as data by Agent; lesson files have no scripts; checks are a fixed set of kinds); a course author reads learners' data (authors see aggregate pass rates only, never names unless shared); an agent fakes progress (done only from passing checks; questions/deletion/level/publishing person-only, 403 person_required); forged runner results (signed callbacks, run id + commit); explanations leak secrets or rows (masked before sending; rows only on choice); organization admin sees members' learning (only what each member shares); lesson binding reads too much (person's token, schema only); spoofed product events trigger offers (signed webhooks / EventBridge source); malicious video or file in a course (types allowed: mp4/webm/vtt/png/jpg/svg sanitized; served from the storage domain, not the app's). [Engine, Cloud] - [Checklist](https://learn.docs.sypnia.com/security/checklist.md): Operators: root token in a secret store; HTTPS public URL; sign-in via Sypnia Data or OIDC with MFA available; runner = Agent sandbox or Docker runner on its own host (never the engine host), egress allowlist, limits; RUNNER_SECRET and EVENTS_SECRET set; backups of Postgres and storage; spans to Telemetry; offers per day sane. Authors: learn lint clean; no secrets or real customer data in lessons, videos or the sample; checks prove the goal; questions about understanding; private courses published to the right organization. Learners: share progress only with organizations you trust; «Use my rows» only on a test project. [Engine, Cloud] ## Sypnia Cloud Your account, organizations that teach their people, what is measured in credits, and plans. - [Sypnia Cloud: overview](https://learn.docs.sypnia.com/cloud.md): Learn in Sypnia Cloud: the Sypnia account (roll-in on first visit; level and memory come along), learn.app.sypnia.com and App's side panel. Organizations: owners and admins publish private courses for their members; members choose to share progress; billing members handle credits. Sypnia's courses free for every account, with a free certificate (self-paced, no live classes, 16 or older, Spanish and English); nothing inside them spends credits. What spends credits: «Explain this» outside courses (Sypnia AI), and an organization's private courses (storage, video delivery, their checks and hints). [Cloud] - [Credits and limits](https://learn.docs.sypnia.com/cloud/credits-and-limits.md): Never measured: anything inside Sypnia's courses (lessons, videos, exercises and their checks, hints, certificates), progress, lint/preview on your machine. Measured: «Explain this» explanations outside courses (Sypnia AI calls, shown as Learn in the ledger) and an organization's private courses (GB stored, GB of video delivered, their check minutes and hints). Paid from prepaid credits, item by item, at prices published with the plans; extra capacity per item; credits from USD 5, expire 12 months after purchase, oldest spent first, no refunds unless the mistake is ours, and then only in credits; 80/100 % notices; with no credits: Sypnia's courses keep working in full, explanations and private-course checks/hints pause (402 insufficient_credits), progress never lost. Limits in reference/limits. [Cloud] - [Plans](https://learn.docs.sypnia.com/cloud/plans.md): Learn plans: every Sypnia course is free, with its certificate (videos, lessons, exercises and their checks, hints, certificate: no credits); self-paced, no live classes; 16 or older; Spanish and English. What spends credits: «Explain this» explanations outside courses (Sypnia AI) and an organization's own private courses (storage, video delivery, their checks and hints). Those are paid on Learn's own plans, inside the global Sypnia subscription tiers, or with extra capacity per item; all prepaid (subscription in advance or credits topped up with PayPal: from USD 5, expire 12 months after purchase, oldest spent first, no refunds unless the mistake is ours, and then only in credits); the larger amount per item applies when a product plan and a tier both include Learn. [Cloud] ## Reference Glossary, limits, design decisions, common questions and the changelog. - [Reference: overview](https://learn.docs.sypnia.com/reference.md): Glossary, limits, design decisions, common questions and the changelog. [Engine, Cloud] - [Glossary](https://learn.docs.sypnia.com/reference/glossary.md): Sypnia Learn vocabulary: course, lesson, path, level, checkpoint lesson, the Sypnia way, step, exercise, exercise branch, check, check run, binding, slot, sample project, progress, certificate, memory note, explain this, lesson offer, teach mode, your turn, lesson format, level block, runner, engine. [Engine, Cloud] - [Limits](https://learn.docs.sypnia.com/reference/limits.md): Limits: lesson file 200 KB; course 200 lessons; course.yaml 64 KB; 20 checks per exercise; 10 questions per lesson; check run 10 min (engine: CHECK_TIMEOUT_S); 3 check runs at a time per person (CHECKS_PER_PERSON); runner resources 2 CPU / 2 GB; video 2 GB per file (MAX_UPLOAD_MB), 2 h; captions 1 MB; images 10 MB; binder cache 10 min; explanations 20 per minute per person; hints 5 per exercise per hour; offers 1 per hour and 3 per day; open exercises 20 per person; API 600 requests per minute per token; course versions kept forever; check run results kept 90 days (pass/fail summary in progress kept with the progress). [Engine, Cloud] - [Design decisions](https://learn.docs.sypnia.com/reference/decisions.md): Learn design decisions: use cases first in every course; one level profile shared with Agent (no second test); lessons bind to the learner's project, sample La Espiga otherwise; exercises on a branch learn/, never merged automatically; done only from passing checks, never by hand or by an agent; questions, deletion, level, publishing are person-only; progress private by default, shared per organization; memory notes in the account memory; offers rare (1/h, 3/day) and once per trigger; courses in Spanish and English (video, captions, transcripts, text); every Sypnia course and its certificate free, self-paced, no live classes, 16 or older; code names English in both languages; open lesson format (MIT) + engine AGPL-3.0, engine in TypeScript sharing the parser with the CLI; checks run in a sandbox outside the engine; no rankings, streaks or public profiles. [Engine, Cloud] - [Common questions](https://learn.docs.sypnia.com/reference/faq.md): Short answers to what people ask first about Sypnia Learn. [Engine, Cloud] - [Changelog](https://learn.docs.sypnia.com/reference/changelog.md): What changed in Sypnia Learn, newest first. [Engine, Cloud]