# 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. Every page of the documentation follows, in reading order. Each one starts with its title and its address. --- ## 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. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/start/ For agents: 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. Sypnia Learn teaches you to build software the way Sypnia builds it: first what people can do in your app, as use cases, and then the design, the data, the code, publishing and watching it in production. It starts where you are, uses your own project as the material, and checks each exercise for you. > **In plain words** > > You learn by doing your own project, not a made-up one. If you are building the website of your bakery, the lessons talk about your bakery's orders. - **\[Engine]** **The Sypnia Learn engine** is open source. A school, a company or a community runs it for its own courses, written in the open lesson format. - **\[Cloud]** **Sypnia Cloud** adds Sypnia's own courses, presented by Santi, your progress in your Sypnia account, lessons inside App, and exercises checked in hosted sandboxes. * [What Sypnia Learn is](/start/what-it-is/): Courses and guided learning for building software with use cases first, who it is for, and what it is not. * [How it works](/start/how-it-works/): From your level to a lesson about your own project, an exercise on a branch, and the check that marks it done. * [Open source and Sypnia Cloud](/start/open-source-and-cloud/): What the open-source engine does for your own courses, and what Sypnia Cloud adds. * [Quickstart](/start/quickstart/): Take the level test, open your first lesson, do its exercise on your project and see it checked. * [Quickstart: self-host](/start/quickstart-self-host/): Run the engine with Docker, add a course folder, and check a lesson's exercise. * [How Sypnia uses it](/start/how-sypnia-uses-it/): Sypnia's courses are built on Telemetry's real cases, Telemetry watches Learn, and Sypnia's team learns with it. --- ## What Sypnia Learn is > Courses and guided learning for building software with use cases first, who it is for, and what it is not. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/start/what-it-is/ For agents: 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. Sypnia Learn is where you learn to build software the Sypnia way. Every course follows the same order: what people can do in your app comes first, as **use cases**, and everything else (the design, the data, the code, publishing, watching production) is built on top of them. ### What it does | | What it means for you | Read more | | ------------------------------ | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | **Starts at your level** | the short test you take when you start Sypnia sets your level, and lessons are written for it | [Your level](https://learn.docs.sypnia.com/paths/your-level) | | **A path for every level** | from someone who has never programmed to a senior developer | [The paths](https://learn.docs.sypnia.com/paths/the-paths) | | **Free courses, at your pace** | every Sypnia course is free, self-paced like an academy, and gives a free certificate when you finish it | [Plans](https://learn.docs.sypnia.com/cloud/plans) | | **Video courses with Santi** | Sypnia's courses are presented by Santi, in Spanish and in English | [Video courses](https://learn.docs.sypnia.com/courses/video-courses) | | **Lessons on your project** | the examples are your cases, your tables and your traces, not a textbook's | [Lessons on your project](https://learn.docs.sypnia.com/courses/lessons-on-your-project) | | **Exercises on a real case** | each exercise changes your project on a branch of its own, and is checked automatically | [Exercises](https://learn.docs.sypnia.com/courses/exercises) | | **Progress in your memory** | what you learned is saved in the same memory the agent reads, so it explains better | [Progress and memory](https://learn.docs.sypnia.com/courses/progress-and-memory) | | **Learning inside App** | «Explain this» on anything, short lessons at the right moment, an agent that teaches while it builds | [Learning inside App](https://learn.docs.sypnia.com/in-app) | | **Lessons as files** | a lesson is a Markdown file in an open format: anyone can read it, write one, or run their own courses | [The lesson format](https://learn.docs.sypnia.com/lessons/the-lesson-format) | ### Who it is for - **People who do not program** and want to build and publish their own website or app with AI, and understand what they built. - **People who build with AI already** and want to know why things break and how to keep them working. - **Developers** who want to work with use cases, contracts and traces, and **seniors** who want the architecture behind them. - **Schools, companies and communities** that teach their own people with the open-source engine. ### What it is not - **Not a generic programming school.** It teaches one way of building, Sypnia's, with the tools of the suite. What it teaches about the web, data and testing is true anywhere. - **Not homework the agent does for you.** The agent explains and gives hints; a lesson counts as done only when its checks pass on work you approved. - **Not live classes.** Courses are self-paced, like an academy: you start, stop and come back when you want. - **Not a race.** There are no rankings, no streaks and no public profiles. Learn is for people 16 or older. --- ## How it works > From your level to a lesson about your own project, an exercise on a branch, and the check that marks it done. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/start/how-it-works/ For agents: 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. #### 1. Your level Learn reads your level from your Sypnia profile: `starter`, `builder`, `developer` or `senior`. It comes from the short test you take the first time you use Sypnia, and you can change it at any time. #### 2. The next lesson Your path suggests the next lesson whose prerequisites you have done. You can also pick any lesson yourself. #### 3. A lesson about your project The lesson is put together for your level and for your project. A lesson about failures uses a case of your own map that has failures, such as «Order for today» with `OutOfStock`. With no project yet, it uses the sample bakery, La Espiga. #### 4. The exercise, on its own branch Starting the exercise creates the branch `learn/` in your project's repository, with what to do written at the top. Your main branch is never touched. #### 5. The check `learn check`, or **Check** in App, runs the lesson's checks in a sandbox: the Cases check, `design check`, your tests, a look at the preview's traces, or a short question. When every check passes, the lesson is done. #### 6. Your progress, remembered Learn records the lesson as done and writes a short note in your memory («finished “Failures have names”, 2026-11-18»), so the agent knows what you already know. The branch stays yours: keep it with a pull request, or delete it. ### Where things live | Thing | Where | | ------------------------- | -------------------------------------------------------------------------------------- | | Your courses and progress | `https://learn.app.sypnia.com` **\[Cloud]**, and in App's side panel | | The API | `https://learn.api.sypnia.com/v1` **\[Cloud]**, or your engine's address **\[Engine]** | | The MCP server | `https://mcp.learn.sypnia.com` **\[Cloud]** | | Lessons | Markdown files (`*.lesson.md`) in a course folder | | Exercises | a branch `learn/` in your project's repository | | Your level and memory | your Sypnia account, read by Agent, Cases, App and Learn | --- ## Open source and Sypnia Cloud > What the open-source engine does for your own courses, and what Sypnia Cloud adds. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/start/open-source-and-cloud/ For agents: 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 **\[Engine]** | Sypnia Cloud **\[Cloud]** | | ---------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | Courses | the ones you write or add, in the open lesson format | Sypnia's courses, presented by Santi, free and with a free certificate, plus the ones your organization adds | | Videos | your own files, in your storage | Sypnia's videos, in Spanish and English, with captions and transcripts | | Sign-in | a Sypnia Data engine, or any OpenID Connect provider | your Sypnia account | | Level and memory | the level the learner sets, progress in the engine | your Sypnia profile and memory, shared with Agent, Cases and App | | Exercise checks | your runner: the open-source Agent sandbox, or a Docker runner | hosted sandboxes, free in Sypnia's courses | | Explanations | any model endpoint you configure: a Sypnia AI gateway or an OpenAI-compatible one | Sypnia AI: hints free in Sypnia's courses, «Explain this» paid with credits | | Inside App | when you self-host App and list your engine in it | included | | License | the engine under AGPL-3.0; `@sypnia/learn` and the lesson format under MIT | a hosted service | The lesson format, the API, the CLI and the MCP tools are the same in both, so a course written for your own engine works in Sypnia Cloud for your organization, and the other way around. --- ## Quickstart > Take the level test, open your first lesson, do its exercise on your project and see it checked. Applies to: Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/start/quickstart/ For agents: 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. At the end you will have finished your first lesson, with its exercise on a branch of your project and a note in your memory that says so. The example is Ana's bakery, La Espiga. #### 1. Open Learn In [App](https://app.docs.sypnia.com/), open **Learn** from the products menu, or go to `https://learn.app.sypnia.com`. If you have not taken the short level test yet, Learn asks you to take it first: about ten questions, five minutes. **You should see:**Your path, with the first lesson suggested: «Failures have names». #### 2. Watch or read the lesson The lesson explains why «Order for today» names what can go wrong (`OutOfStock`, `Closed`) and what the customer reads each time. It uses your own map; Ana sees her own bakery's case. #### 3. Start the exercise Choose **Start the exercise**, or in a terminal: ```bash npx @sypnia/app login npx @sypnia/learn start failures-have-names --project la-espiga ``` **You should see:**`Branch learn/failures-have-names created in la-espiga. What to do: LEARN.md` #### 4. Do it The exercise asks for a new case, «Cancel an order until 10 am», with the failure that tells the customer it is too late. Ana asks the agent in App for help; it gives hints at her level and proposes the case, and she approves it: `cases/orders/cancel-order.case.yaml` ```yaml id: cancel-order title: Cancel an order until 10 am actor: customer goal: Cancel a pick-up order made by mistake where: shop.my-orders.order-detail failures: - name: TooLate when: it is 10 am or later on the pick-up day tell: «It's too late to cancel. Call us and we will help.» ``` #### 5. Check it Choose **Check**, or: ```bash npx @sypnia/learn check ``` **You should see:** `cases check ✓ · case cancel-order ✓ · failure TooLate ✓ · question ✓ — lesson done` #### 6. Keep it or let it go The branch is yours. Open a pull request to keep the new case in your project, or delete the branch. Either way, the lesson stays done. Next: the path suggests the following lesson. See [The paths](https://learn.docs.sypnia.com/paths/the-paths). --- ## Quickstart: self-host > Run the engine with Docker, add a course folder, and check a lesson's exercise. Applies to: the Sypnia engine (open source, self-hosted). Source: https://learn.docs.sypnia.com/start/quickstart-self-host/ For agents: 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. At the end your own engine serves a course, and a learner's exercise is checked by it. #### 1. Start the engine Copy the `compose.yaml` from [Docker](https://learn.docs.sypnia.com/self-hosting/docker), set a root token and how people sign in, then: ```bash docker compose up -d curl http://localhost:8097/v1/health ``` **You should see:**`{"status":"ok"}` #### 2. Add a course A course is a folder of lesson files ([The lesson format](https://learn.docs.sypnia.com/lessons/the-lesson-format)). Check it and upload it: ```bash npx @sypnia/learn login --server http://localhost:8097 npx @sypnia/learn lint ./courses/team-onboarding npx @sypnia/learn courses add ./courses/team-onboarding ``` **You should see:**`team-onboarding: 6 lessons, 0 problems. Published as version 1.` #### 3. Take a lesson In the repository of a project: ```bash npx @sypnia/learn start first-case npx @sypnia/learn check ``` **You should see:**Each check with ✓ or ✗ and what to fix. Configure the runner that checks exercises before real learners use it: [Configuration](https://learn.docs.sypnia.com/self-hosting/configuration). --- ## How Sypnia uses it > Sypnia's courses are built on Telemetry's real cases, Telemetry watches Learn, and Sypnia's team learns with it. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/start/how-sypnia-uses-it/ For agents: 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. Telemetry is the pilot of the Sypnia suite: it is built on Sypnia from end to end and uses every Sypnia product. This is how it uses Learn, and how Learn uses the rest. ### Telemetry as course material Sypnia's courses teach with a real product, not a toy. The deeper lessons build small pieces of Telemetry's own map: | Lesson | What it uses from Telemetry | | -------------------------------------- | ---------------------------------------------------------------------------------------------- | | reading a case that runs in production | the case «See a problem» (`see-a-problem`), its place in Telemetry's screens and its failures | | AI inside a case | the case `analyze-problem`, the call it makes to Sypnia AI and the span it leaves in the trace | | events between cases | how a new problem starts the alert, as published events of Telemetry's map | Only what is safe to show is used: case files, screens and traces from Telemetry's own test projects, never a customer's data. ### Telemetry watches Learn - **Errors and speed** of lesson pages and videos arrive in Telemetry like any app's. - **Where people get stuck.** A check that fails again and again for many learners appears as a problem grouped by lesson, so the lesson gets fixed, not the learners. - **Unclear lessons.** Scope errors in exercises and rage clicks on lesson screens point to a step that needs better words. - **Learn's own cases** (`start-exercise`, `check-exercise`, `explain-item`) are traced, with the calls to Git, the sandbox and Sypnia AI inside them. ### Sypnia's team learns with it New people at Sypnia take a private course of Sypnia's organization: how the suite is built, the map of each product, and how to read Telemetry. It is written in the same lesson format as any course. ### Learn runs on Sypnia Its code lives in [Sypnia Git](https://git.docs.sypnia.com/), people sign in with [Sypnia Data](https://data.docs.sypnia.com/), videos are stored in [Sypnia Files](https://files.docs.sypnia.com/), it is deployed with [Sypnia Run](https://run.docs.sypnia.com/), explanations go through [Sypnia AI](https://ai.docs.sypnia.com/), exercises are checked in [Sypnia Agent](https://agent.docs.sypnia.com/)'s sandboxes, and its screens follow its guide in [Sypnia Design](https://design.docs.sypnia.com/). --- ## Paths and levels > Your level, the path for each level, and the order every course follows. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/paths/ Learn meets you where you are. Your level decides how each lesson is written, and your path decides what comes next. Every course follows the same order: use cases first. - [Your level](/paths/your-level/): Where your level comes from, what it changes in a lesson, and how it grows with you. - [The paths](/paths/the-paths/): A path for every level, from your first website to running the suite yourself, and the courses in each. - [The Sypnia way](/paths/the-sypnia-way/): The order every course follows: use cases first, then the contract, the design, the data, the code, publishing and production. --- ## Your level > Where your level comes from, what it changes in a lesson, and how it grows with you. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/paths/your-level/ For agents: 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. Your level comes from the short test you take the first time you use Sypnia, described in [Sypnia Agent's docs](https://agent.docs.sypnia.com/start/your-level). Learn reads the same profile, so you never take two tests. ### What your level changes in a lesson | Level | The words | What the exercise asks | The hints | | ------------- | ------------------------------------------ | ------------------------------------------------------------ | ---------------------------------------------------- | | **Starter** | plain words, no jargon, one idea at a time | change a case in words; the agent writes the code | many, and the agent can show the answer step by step | | **Builder** | plain words with the names of things | change a case and its data; read a short summary of the code | when you ask | | **Developer** | technical and short | write the code and its tests | only after a failed check | | **Senior** | terse; trade-offs | design the change and defend it | none by default | The level never hides a lesson from you. You can take any lesson; Learn tells you if it expects something you have not done yet. ### For one lesson only Say «explain it more simply» or «more technical», or choose the level switch at the top of a lesson. That lesson changes; your level stays. ### Growing Each path has a few **checkpoint lessons**. When you pass them, Learn proposes the next level and shows why. It never changes your level on its own: you accept it in **Account → Level**, in App, or say no. Your agent reads the same level, so its explanations grow with you too. --- ## The paths > A path for every level, from your first website to running the suite yourself, and the courses in each. Applies to: Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/paths/the-paths/ For agents: 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. A **path** is the list of courses for one level, in order. Each course is a set of short lessons with exercises. You can leave the path whenever you want and take any lesson; Learn tells you what it expects you to know first. | Path | Courses | You end up able to | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | **Starter** | «Your first website with AI» (`first-website`) · «Your app as use cases» (`use-cases-first`) | describe your app as use cases, build it with the agent, publish it at your own address, and know when something goes wrong | | **Builder** | «Design your app» (`design-your-app`) · «Data for your app» (`data-for-your-app`) · «Publish and watch» (`publish-and-watch`) | write a design guide, decide your tables and who can see each row, use previews, read your app's problems | | **Developer** | «Cases in code» (`cases-in-code`) · «Tests for every ending» (`tests-for-every-ending`) · «Production with Telemetry» (`production-with-telemetry`) | write cases with Sypnorm, keep an order in one transaction, test every ending of a case, follow a trace to the line that failed | | **Senior** | «Events between cases» (`events-between-cases`) · «Run Sypnia yourself» (`run-sypnia-yourself`) | connect cases through their results without loops, and run the open-source suite on your own infrastructure | ### The first course «Your first website with AI» is for someone who has never programmed. By its last lesson you have a website online, built with the agent from your own words, and you know what each piece is for. It is the door to everything else. ### Two people, one project Ana starts the starter path with her bakery. Her friend Marco, a developer, helps her with the shop and takes the lesson «One order, one transaction» from «Cases in code» on the same project: his lesson uses «Order for today» too, but asks him to write the code that reserves the bread and its test. --- ## The Sypnia way > The order every course follows: use cases first, then the contract, the design, the data, the code, publishing and production. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/paths/the-sypnia-way/ For agents: 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. Every course, at every level, follows the same order. It is the order Sypnia's own products are built in. | Step | What you do | Where it lives | | ------------------------------ | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | **1. The idea, in your words** | say what your app is for and who uses it | a conversation with the agent | | **2. The map of use cases** | list what each person can do, and what can go wrong in each case | [Sypnia Cases](https://cases.docs.sypnia.com/): `cases/map.yaml` and one file per case | | **3. The contract** | a landing page and a plan you approve: what the app promises, case by case | the landing and the plan, checked against the map | | **4. The design** | a design guide of your own, and the screens of each case designed with it | [Sypnia Design](https://design.docs.sypnia.com/) | | **5. The data** | the tables each case reads and writes, and who can see each row | [Sypnia Data](https://data.docs.sypnia.com/) | | **6. The code** | one case at a time, with a test for every ending, failures included | your repository, with [Sypnia Agent](https://agent.docs.sypnia.com/) | | **7. Publishing** | a preview for each change, then production at your own address | [Sypnia Run](https://run.docs.sypnia.com/) and [Sypnia Domains](https://domains.docs.sypnia.com/) | | **8. Production** | read what really happens, case by case, and fix what fails | [Sypnia Telemetry](https://telemetry.docs.sypnia.com/) | ### Why use cases first A use case is something a person can do, in plain words: «Order for today». When everything else hangs from a case (its screen, its tables, its code, its trace), you can always answer the questions that matter: what does this code do for someone, what breaks if I change it, and what did the customer see when it failed. Something someone tried that is not on the map is a **scope error**, and the fix starts by adding the case. Each lesson says which step it belongs to, so you always know where you are. --- ## Courses > The video courses, lessons built on your project, exercises, progress and languages. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/courses/ A course is a short series of lessons. Each lesson has a video or a text (often both), an example taken from your own project, and an exercise that is checked for you. - [Video courses](/courses/video-courses/): Sypnia's courses with Santi: how a lesson video is made, what comes with it, and where else the clips appear. - [Lessons on your project](/courses/lessons-on-your-project/): How a lesson finds the right case, table or trace in your own project, and what it uses when you have none. - [Exercises](/courses/exercises/): How an exercise changes a real case on a branch of its own, how the agent helps, and how it is checked. - [Progress and memory](/courses/progress-and-memory/): What Learn records about what you learned, the note it leaves in your memory, your certificate, and how you see or delete it. - [Languages](/courses/languages/): Courses in Spanish and in English, captions and transcripts, lesson text in both languages, and explanations in yours. --- ## Video courses > Sypnia's courses with Santi: how a lesson video is made, what comes with it, and where else the clips appear. Applies to: Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/courses/video-courses/ For agents: 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. Sypnia's own courses are presented by **Santi**, who builds Sypnia. He shows the real product on screen (the map, the screens, the code, the traces) and explains each step in plain words. ### What a lesson video is like - **One idea per video**, a few minutes long, with chapters. - **The real interface**, the same you use, not slides. - **In Spanish and in English.** Every video exists in both languages, with captions, and the lesson page has the full transcript in both. See [Languages](https://learn.docs.sypnia.com/courses/languages). - **Free, at your pace.** Every Sypnia course is free and self-paced: there are no live classes, and you watch when you want. - **The text beside it.** Every lesson also has a written version, at your level, with the example taken from your project. You can learn from the text alone. ### Watching | You can | How | | ---------------- | --------------------------------------------------------------------- | | change the speed | 0.75× to 2× | | jump to a part | the chapters under the video | | use the keyboard | space to pause, arrows to move 5 seconds, `c` for captions | | read instead | the transcript, with each paragraph linked to its moment in the video | | come back later | the video remembers where you stopped | Videos are stored in [Sypnia Files](https://files.docs.sypnia.com/) and served from its network, close to you. ### Clips elsewhere Short clips of the courses appear on Sypnia's channels. The lesson in Learn is always the complete version, with the example from your project and the exercise. --- ## Lessons on your project > How a lesson finds the right case, table or trace in your own project, and what it uses when you have none. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/courses/lessons-on-your-project/ For agents: 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). A lesson about failures is clearer when the failure is yours. So every lesson says what kind of example it needs, and Learn finds one in your project. ### How Learn picks the example #### 1. The lesson asks The lesson file says what it needs, for example «a case with at least one failure» or «a case that writes to two tables». #### 2. Learn looks in your project It reads your map from Cases, your tables from Data and your traces from Telemetry, with **your** permissions. #### 3. It shows its choice At the top of the lesson: «This lesson uses your case “Order for today”». Choose **Use another** to pick a different one. ### What a lesson can ask for | It asks for | Example from La Espiga | | ---------------------------------------- | -------------------------------------------------------------------------- | | a case with failures | «Order for today», with `OutOfStock` and `Closed` | | a case that writes to several tables | «Order for today» writes `order` and `order_item`: the transactions lesson | | a case with a place in the app (`where`) | «Order for today» at `shop.order-for-today` | | a table with row-level security | `order`: a customer sees only their own orders | | a trace with an error | a failed «Order for today» in the preview | | a promise of the landing page | «Order before 9 and pick up warm bread» | ### No project yet Lessons use **La Espiga**, Sypnia's sample bakery, until you have a project of your own. It is an open repository with a full map, a design guide, tables and a preview, so every lesson has something real to point at. Exercises on the sample run on your own copy. ### What a lesson never takes - **Rows of your data.** Lessons use the names of your tables and columns, never their contents, unless you choose **Use my rows** for that lesson. - **Production traces**, unless you choose them. By default lessons use traces from previews and tests, and production traces are always masked the way Telemetry masks them. --- ## Exercises > How an exercise changes a real case on a branch of its own, how the agent helps, and how it is checked. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/courses/exercises/ For agents: 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. An exercise asks you to change something real: add a case, name a failure, write the test of an ending. It happens on a branch of its own, so your app keeps working while you learn. ### The life of an exercise | State | What it means | | ----------- | ---------------------------------------------------------------- | | `started` | the branch `learn/` exists, with the brief in `LEARN.md` | | `checking` | the checks are running on your last commit | | `failed` | at least one check did not pass; each one says what to fix | | `passed` | every check passed: the lesson is done | | `abandoned` | you stopped it; the branch is deleted, the lesson stays open | You can check as many times as you like. Nothing counts against you. ### With the agent You can do the exercise alone, or ask the agent in App or in your terminal. It knows the lesson and your level: - **Starter**: it explains the step, proposes the change and waits for your approval. You decide; it writes. - **Builder**: it points to what to change and explains the code it writes. - **Developer and senior**: it gives a hint only after a failed check, or when you ask. The agent never runs `learn check` as a way to guess an answer, and it cannot mark a lesson as done: only passing checks do. ### When it is done The branch stays in your repository. Choose: - **Keep it**: `learn finish --keep` removes `LEARN.md` and opens a pull request. Ana keeps «Cancel an order until 10 am» in her bakery's app. - **Let it go**: `learn finish --drop` deletes the branch. The lesson stays done. Learn never merges anything into your main branch. ### Which repository | Your project | Where the branch goes | | ----------------------------- | ---------------------------------------------------------- | | in Sypnia Git | the project's repository | | in GitHub or another git host | the same repository, through your git remote, from the CLI | | none (the sample) | your own copy of La Espiga in your organization | --- ## Progress and memory > What Learn records about what you learned, the note it leaves in your memory, your certificate, and how you see or delete it. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/courses/progress-and-memory/ For agents: 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). Learn keeps a short record of what you learned, so it can suggest the next step and so the agent can explain at the right depth. ### What is recorded | Recorded | Not recorded | | ---------------------------------------------------- | ------------------------------------------------ | | each lesson you started or finished, and its version | the code you wrote (it stays in your repository) | | the names of the checks and whether they passed | your answers' text beyond pass or fail | | where you stopped in each video | how long you looked at a page | | the date of each step | anything about your customers | ### The note in your memory When you finish a lesson, Learn adds one note to your memory, the same memory the agent reads: > Finished «Failures have names» (Your app as use cases), 2026-11-18. Knows: failures in a case, what the person is told. So when Ana later asks the agent about a new case, it talks about failures as something she already knows. You see these notes in **Account → Memory** with every other note, and you can change or delete any of them. ### Your certificate When every lesson of a course is done (each one counts as done when its checks pass), Learn gives you that course's **certificate**, free. It shows your name, the course and the date you finished it. You find it in **Account → Learn**, next to your progress, and download it from there. Nobody else sees it unless you share it. ### Who can see it Only you. When you learn inside an organization (a company teaching its team, a school), you choose whether to share your progress with it, organization by organization. Shared progress shows which lessons are done, never your code or your answers. ### Taking it with you, or deleting it - **Export**: **Account → Learn → Download my progress** gives you a JSON file. - **Delete**: **Delete my progress** removes every record and the notes Learn wrote. It cannot be undone, so App asks you to confirm. --- ## Languages > Courses in Spanish and in English, captions and transcripts, lesson text in both languages, and explanations in yours. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/courses/languages/ For agents: 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. | Part of a lesson | Spanish | English | | ---------------------- | ---------------- | ---------------- | | The video | in Spanish | in English | | Captions | in Spanish | in English | | The transcript | yes | yes | | The lesson text | yes | yes | | Explanations and hints | in your language | in your language | Every Sypnia course is in Spanish and in English. Each video exists in both languages, with captions in its language, and the written lesson and its transcript exist in both too, so you can learn fully in either. ### Code is always in English In both languages, everything that is programming stays in English: file names (`cases/orders/place-order.case.yaml`), commands, case and failure names (`place-order`, `OutOfStock`). The lesson explains them in your words; it never translates them. ### Your own courses A lesson can exist in one language or several, one file per language ([The lesson format](https://learn.docs.sypnia.com/lessons/the-lesson-format)). Learn shows each person their language when it exists, and the course's first language otherwise. --- ## Learning inside App > «Explain this», short lessons at the right moment, and the agent that teaches while it builds. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/in-app/ You also learn while you work. In [App](https://app.docs.sypnia.com/), anything you look at can be explained at your level, a short lesson can appear at the moment it matters, and the agent can teach you while it builds. - [Explain this](/in-app/explain-this/): Ask for an explanation of any diff, case, trace, error, table or log line, at your level. - [Lessons in the moment](/in-app/lessons-in-the-moment/): Short lessons offered when something happens that they explain, never forced, and easy to turn off. - [Teach me while you build](/in-app/teach-me-while-you-build/): A way of working where the agent explains each step before it takes it, and leaves some steps for you. --- ## Explain this > Ask for an explanation of any diff, case, trace, error, table or log line, at your level. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/in-app/explain-this/ For agents: «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). Every item in App's side panel has an **Explain this** button. The explanation is written for your level, about the exact thing you are looking at. | You look at | You can ask | Ana gets, as a starter | | ------------------------------ | --------------------------------------- | --------------------------------------------------------------------------------------- | | a **diff** of the agent's work | what this change does and why | «This adds the rule: after 10 am, the cancel button tells the customer it is too late.» | | a **case** on the map | what it means, what each failure is for | what the customer sees when bread runs out | | a **trace** or a **problem** | what happened, step by step | «The order was saved, but the pick-up code e-mail bounced.» | | a **table** or a **column** | what it holds, who can read it | «Each row is one order. Customers see only their own.» | | a **log line** or an **error** | what it says, in plain words | what failed, and which case it belongs to | | a selection of **code** | what these lines do | the idea first, then the names | Under each explanation: **Simpler**, **More technical**, and the lessons that cover the topic, if you want to go deeper. ### From the terminal ```bash npx @sypnia/learn explain src/orders/place-order.ts:40-62 npx @sypnia/learn explain --case cancel-order npx @sypnia/learn explain --problem pay-button-does-nothing ``` ### What is sent to the model Only the item you asked about and what is needed to understand it (the case it belongs to, the names around it), read with your permissions. **Secret values and masked columns are never sent.** Rows of data are sent only when the item is a row you opened yourself. The explanation is not stored. In Sypnia Cloud an explanation is a call to [Sypnia AI](https://ai.docs.sypnia.com/), paid with credits like any other, and shown as Learn in your ledger. Inside a Sypnia course, hints and checks are free ([Plans](https://learn.docs.sypnia.com/cloud/plans)). --- ## Lessons in the moment > Short lessons offered when something happens that they explain, never forced, and easy to turn off. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/in-app/lessons-in-the-moment/ For agents: 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. Some things are easier to learn right when they happen. When you meet one of them for the first time, App can offer a short lesson about it. ### When an offer appears | The first time… | The offer | | --------------------------------------------------------------- | ---------------------------------------------------- | | someone tried something that is not on your map (a scope error) | «Why this is a scope error, and how to add the case» | | the Cases check fails | «What the check looks at» | | the agent proposes a change to your tables | «What a migration is, and why it asks you first» | | you approve a deploy to production | «Preview and production» | | Telemetry finds a problem in a case of yours | «Reading a problem» | | a test of a failure fails | «Testing every ending» | | `design check` reports a finding | «Why the guide wins» | Each offer appears **once**, only when a lesson covers it and you have not done that lesson yet. ### The rules - **Never in the way.** An offer is a quiet line under the conversation. It never appears in the middle of an approval or while a task is running. - **Rarely.** At most one offer an hour, and three a day. - **Your choice.** **Watch** opens the lesson in the side panel, **Later** keeps it in **Learn → For later**, **Don't offer this** never shows that one again. - **Off with one switch.** Turn offers off in **Account → Learn → Offers**, for every project or for one. --- ## Teach me while you build > A way of working where the agent explains each step before it takes it, and leaves some steps for you. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/in-app/teach-me-while-you-build/ For agents: 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. Normally the agent builds and tells you what it did. In **teach mode** it teaches as it goes: it says what it is about to do and why, and leaves some steps for you. ### Turning it on - Say «teach me while you build» in the chat, or turn on **Teach** in the session's header in App. - In the terminal: `npx @sypnia/agent --teach "customers can cancel until 10 am"`. It stays on for that session only. ### What changes | | Normally | In teach mode | | --------------- | ---------------------------- | -------------------------------------------------------- | | Before starting | a short plan | the plan in the case's words, and what you will learn | | Each step | done, then summarized | explained first, at your level, then done | | Your turn | only decisions that need you | also small steps left for you, sized for your level | | Along the way | — | links to the lessons that cover what just happened | | At the end | a summary of the change | what you learned, and an offer to save it in your memory | ### Your turn, by level | Level | What the agent leaves for you | | ------------- | ---------------------------------------------------------------------- | | **Starter** | choose between two options, name a failure and what the customer reads | | **Builder** | write a case's steps, add a field to a table | | **Developer** | write a function or a test; the agent reviews it | | **Senior** | decide the design; the agent argues the other side | ### What it costs Teach mode is slower and uses more of the model, so a task's budget estimate is larger. The agent tells you the new estimate before it starts. The safety rules are the same: it still asks before anything that cannot be undone. --- ## The lesson format > Lessons as files anyone can read, the checks that prove an exercise, and how to write good lessons. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/lessons/ A lesson is a Markdown file with a short header. The format is open (MIT), so anyone can read a lesson in any editor, write their own, and run their courses on the open-source engine or in their organization in Sypnia Cloud. - [Lesson files](/lessons/the-lesson-format/): Every field of a course and a lesson, the level blocks and the slots filled from the learner's project. - [Checks](/lessons/checks/): Every kind of check an exercise can have, what each one looks at, and where it runs. - [Writing lessons](/lessons/writing-lessons/): How to write a lesson that works at every level, binds to the learner's project, and is checked fairly. --- ## Lesson files > Every field of a course and a lesson, the level blocks and the slots filled from the learner's project. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/lessons/the-lesson-format/ For agents: 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. ### A course: `learn//course.yaml` `learn/use-cases-first/course.yaml` ```yaml format: 1 id: use-cases-first title: Your app as use cases description: Describe what people can do in your app, and what can go wrong. level: [starter, builder] language: es languages: [es, en] lessons: [what-is-a-use-case, failures-have-names, journeys, the-map-is-the-scope] checkpoints: [the-map-is-the-scope] ``` | Field | Type | What it is | | ---------------------------- | ----- | ------------------------------------------------------------ | | `format` | `1` | the format version; tools refuse one they do not know | | `id`, `title`, `description` | text | the course; `id` matches `^[a-z][a-z0-9-]{1,62}$` | | `level` | list | the levels it is written for | | `language`, `languages` | codes | the language it was made in first, and every language it has | | `lessons` | list | lesson ids, in order | | `checkpoints` | list | lessons that, once passed, let Learn propose the next level | ### A lesson: `learn//.lesson.md` `learn/use-cases-first/failures-have-names.lesson.md` ```markdown --- id: failures-have-names title: Failures have names goal: You can name what can go wrong in a case, and what the person is told. level: [starter, builder] step: map needs: [what-is-a-use-case] minutes: 8 video: file: media/failures-have-names.mp4 captions: { es: media/failures-have-names.es.vtt, en: media/failures-have-names.en.vtt } chapters: [{ at: 0, title: A case that can fail }, { at: 95, title: What the customer reads }] uses: case: { has: failures } exercise: brief: Add a case where a customer cancels an order, with the failure that says it is too late. checks: - cases-check - case: { exists: true, has: failures } - question: why-name-it --- Your case «{{case.title}}» can end badly: {{case.failures[0].name}}. :::level starter Think of what your customer reads when that happens. That sentence is part of your app. ::: :::level builder The failure's `name` is what the code and the traces use; its `tell` is what the person reads. ::: :::question why-name-it Why give a failure a name instead of showing «Error»? - [x] So the person knows what happened and what to do - [ ] So the app looks more technical ::: ``` ### The header | Field | Required | What it is | | ------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id`, `title` | yes | a stable id and the title people see | | `goal` | yes | one sentence: what you can do after the lesson | | `level` | yes | the levels it is written for | | `step` | yes | where it sits in [the Sypnia way](https://learn.docs.sypnia.com/paths/the-sypnia-way): `idea`, `map`, `contract`, `design`, `data`, `code`, `publish` or `production` | | `needs` | no | lessons it expects you to have done; shown, never enforced | | `minutes` | no | about how long it takes | | `video` | no | the file, its captions per language and its chapters | | `uses` | no | what to take from the learner's project, by slot ([Lessons on your project](https://learn.docs.sypnia.com/courses/lessons-on-your-project)) | | `exercise` | no | the `brief`, the `branch` (default `learn/`) and the `checks` ([Checks](https://learn.docs.sypnia.com/lessons/checks)) | ### Selectors in `uses` | Slot | Selector | Picks | | --------- | ------------------------------------------ | ----------------------------------------------------------------------------- | | `case` | `has: failures`, `has: where`, `writes: 2` | a case with failures, with a place in the app, or writing at least two tables | | `table` | `rls: true` | a table with row-level security | | `trace` | `error: true` | a trace that ended in a failure (preview or test by default) | | `promise` | `true` | a promise of the landing page with its cases | With no match, the slot is filled from the sample project, La Espiga. ### The body - **Markdown**, with the slots `{{case.title}}`, `{{case.id}}`, `{{case.failures[0].name}}`, `{{table.name}}`, `{{trace.case}}` filled from the chosen items. - **Level blocks** `:::level starter builder` … `:::` appear only for those levels. Text outside them is for everyone. - **Questions** `:::question ` … `:::` with options; `[x]` marks the right ones. A question can be a check. ### Rules - **One file per language**: `failures-have-names.lesson.md` is the course's first language, `failures-have-names.en.lesson.md` another one. Same header fields; only text changes. - **Unknown fields** are kept and reported as warnings. Your own fields start with `x-`. - `npx @sypnia/learn lint ` checks everything above. --- ## Checks > Every kind of check an exercise can have, what each one looks at, and where it runs. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/lessons/checks/ For agents: 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. Each check looks at one thing on your exercise branch and says **pass** or **fail**, with what to fix. A lesson is done when every check passes. | Check | Passes when | Example | | -------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------- | | `cases-check` | the [Cases check](https://cases.docs.sypnia.com/) passes on the branch | the map has no broken references | | `case` | a case of the map matches what the lesson asks | `case: { id: cancel-order, failure: TooLate }` | | `design-check` | [`design check`](https://design.docs.sypnia.com/) reports nothing, or nothing of some codes | the cancel screen uses only the guide's pieces | | `tests` | a command exits with 0 in the sandbox | `tests: { command: "npm test -- place-order" }` | | `telemetry` | a trace of the case with that ending arrives from the branch's preview | `telemetry: { case: place-order, failure: OutOfStock }` | | `question` | the learner answers the lesson's question right | `question: why-name-it` | | `file` | a file exists, and contains a text if given | `file: { path: tests/cancel-order.test.ts }` | ### Where checks run - **Sypnia Cloud**: in a hosted sandbox of [Sypnia Agent](https://agent.docs.sypnia.com/), on the last commit of your exercise branch. The `telemetry` check waits for the branch's preview on Run. - **Self-hosted**: in the runner you configure: the open-source Agent sandbox, or a Docker runner ([Configuration](https://learn.docs.sypnia.com/self-hosting/configuration)). The sandbox has your branch and nothing else: no secrets, no production data, no network beyond what installing dependencies needs. ### Results | Result | Meaning | | ------- | --------------------------------------------------------------------------------------------------------------------- | | `pass` | done | | `fail` | something to change; the check says what, at your level | | `error` | the check could not run (a timeout, a preview that did not start). It is never your fault: Learn retries, and says so | ### Questions are for people A `question` check is answered by you, in App or in the terminal. An agent can explain the question, but an agent's token cannot answer it: the API refuses with `403 person_required`. --- ## Writing lessons > How to write a lesson that works at every level, binds to the learner's project, and is checked fairly. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/lessons/writing-lessons/ For agents: 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. ### One lesson, one goal A lesson teaches one thing you can then do, written as its `goal`: «You can name what can go wrong in a case». If the goal needs «and», it is two lessons. ### Start from a case Lessons follow [the Sypnia way](https://learn.docs.sypnia.com/paths/the-sypnia-way): start from what a person does in the app, and only then talk about screens, tables or code. Set `step` to say where the lesson sits. ### Write once, for every level Write the shared explanation for everyone, then add what only some levels need in level blocks. A starter needs the idea and what the customer sees; a developer needs the names and the code. Avoid writing four separate lessons. ### Use the learner's project Ask for examples with `uses`, and write with the slots (`{{case.title}}`). Then preview the lesson as different people: ```bash npx @sypnia/learn preview failures-have-names --level starter --project sample npx @sypnia/learn preview failures-have-names --level developer --project la-espiga ``` ### Check the goal, not the answer - Prefer checks that prove the goal: a `case` with a failure, a passing `cases-check`, a `tests` command. - Avoid checks on the exact text of a file: there are many right answers. - At most one `question`, about understanding, never about memory. - Keep exercises small: one case, one change. ### Code stays in English In every language, file names, commands, case and failure names stay in English. Explain them; never translate them. ### Publish ```bash npx @sypnia/learn lint ./learn/use-cases-first npx @sypnia/learn courses add ./learn/use-cases-first ``` On your own engine, publishing needs the `admin` scope. In Sypnia Cloud, an organization's owners and admins publish courses for their own members. --- ## SDK, CLI and MCP > The @sypnia/learn package, the learn command and the MCP tools for agents. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/tools/ Three ways to use Learn outside App: the `@sypnia/learn` package in your own code, the `learn` command in a terminal, and the MCP server for agents. All three speak to the same [API](https://learn.docs.sypnia.com/api). - [The @sypnia/learn package](/tools/sdk/): Read and validate lesson files, render a lesson for a level, run checks, and read progress from your code. - [The learn command](/tools/cli/): Courses, lessons, exercises, checks and progress from your terminal, and the tools for authors. - [MCP for agents](/tools/mcp/): The Learn MCP server and its tools: what an agent can do for a learner, and what only the learner can. --- ## The @sypnia/learn package > Read and validate lesson files, render a lesson for a level, run checks, and read progress from your code. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/tools/sdk/ For agents: @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). ```bash npm install @sypnia/learn ``` | Import | For | | ---------------------- | --------------------------------------------------------------------------- | | `@sypnia/learn/format` | reading, validating and rendering lesson files: for authors and their tools | | `@sypnia/learn/checks` | running a lesson's checks on your machine while you write it | | `@sypnia/learn/client` | the Learn API: courses, lessons, exercises, progress, explanations | ### Authors `lint-course.ts` ```ts import { lint, parseLesson, render } from '@sypnia/learn/format'; const { problems } = await lint('./learn/use-cases-first'); if (problems.length) console.table(problems); const lesson = await parseLesson('./learn/use-cases-first/failures-have-names.lesson.md'); const { text } = render(lesson, { level: 'starter', language: 'en', slots: { case: { title: 'Order for today', failures: [{ name: 'OutOfStock' }] } } }); ``` ### Apps and scripts `next-lesson.ts` ```ts import { createLearn } from '@sypnia/learn/client'; const learn = createLearn(); // the session of `npx @sypnia/app login` const next = await learn.next(); const exercise = await learn.exercises.start(next.id, { project: 'la-espiga' }); const result = await learn.exercises.check(exercise.id); console.log(result.status, result.checks); ``` `createLearn({ token, baseUrl })` takes a personal access token and your engine's address instead. A token belongs to a person: Learn has no secret key for apps, because every record belongs to someone. --- ## The learn command > Courses, lessons, exercises, checks and progress from your terminal, and the tools for authors. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/tools/cli/ For agents: 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. ```bash npx @sypnia/learn next ``` It uses the session of `npx @sypnia/app login`, shared by every Sypnia command line. With your own engine, sign in once with `npx @sypnia/learn login --server `. ### For learners | Command | Does | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | `learn courses`, `learn course ` | the courses, and one course with your progress | | `learn next` | the next lesson of your path | | `learn lesson [--level] [--lang]` | read a lesson in the terminal | | `learn start [--project ] [--path ]` | start its exercise: the branch and `LEARN.md`; `--project` defaults to the `project` of the folder's `sypnia.toml` | | `learn check [--watch]` | run the checks on your last commit; `--watch` checks on every commit | | `learn hint` | one hint, at your level | | `learn status` | the exercise you are on and its last results | | `learn finish --keep` \| `--drop` | keep the branch with a pull request, or delete it | | `learn explain `, `--case `, `--trace `, `--problem ` | an explanation at your level | | `learn progress [--json]` | what you have done | | `learn progress export`, `learn progress delete` | download, or delete, all your progress | ### For authors | Command | Does | | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | `learn lint ` | check a course folder against [the format](https://learn.docs.sypnia.com/lessons/the-lesson-format) | | `learn preview [--level] [--project sample\|] [--lang]` | the lesson as one learner would see it | | `learn courses add [--org ]` | publish a course, or a new version of it | | `learn courses remove ` | take a course down; learners keep their progress | ### Exit codes | Code | Meaning | | ---- | --------------------------------------- | | 0 | done | | 1 | an error | | 2 | wrong use of the command | | 3 | not signed in | | 4 | not allowed | | 5 | the checks ran, and at least one failed | --- ## MCP for agents > The Learn MCP server and its tools: what an agent can do for a learner, and what only the learner can. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/tools/mcp/ For agents: 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. ```bash claude mcp add --transport http sypnia-learn https://mcp.learn.sypnia.com ``` `https://mcp.learn.sypnia.com` signs in with your Sypnia account (OAuth with PKCE and dynamic client registration) or a personal access token. Your own engine serves the same tools at `/mcp`. | Tool | Does | | ---------------- | ---------------------------------------------------------------------------- | | `list_courses` | courses and your progress in each | | `get_lesson` | a lesson, rendered for your level and project | | `next_lesson` | the next lesson of your path | | `get_progress` | what you have done | | `explain` | an explanation of a case, trace, problem, table, file or diff, at your level | | `start_exercise` | create the exercise branch in a project | | `check_exercise` | run the checks on the branch's last commit | | `hint` | one hint for the exercise, at your level | ### What only you can do These are not tools, and the API refuses them to an agent's token with `403 person_required`: - answering a lesson's **questions**; - marking a lesson as **done** (only passing checks do); - **deleting** your progress; - changing your **level**; - **publishing** a course. So your agent can be your tutor (find the next lesson, explain, give a hint, run the checks) without ever doing the learning for you. Every call is recorded with the exercise. --- ## API reference > The Learn API: addresses, authentication, errors and limits. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/api/ For agents: 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. API: `https://learn.api.sypnia.com/v1` **\[Cloud]**, or your engine's address followed by `/v1` **\[Engine]**. ### Authentication `Authorization: Bearer `. Every record in Learn belongs to a person, so there are no secret keys for apps. The token is one of: | Token | Who | Can | | ----------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | | your Sypnia session | you, in App or a Sypnia command line | everything you can do | | a personal access token | you, from a script | its scopes: `learn` (your lessons, exercises, progress, explanations), `read` (courses), `admin` (publish and remove courses) | | an agent's token | an agent acting for you | learner actions, except those reserved to people | | the engine's root token | the engine's operator **\[Engine]** | everything, on that engine | **Reserved to people**: answering questions, deleting progress, changing the level and publishing courses. An agent's token gets `403 person_required`. No one can mark a lesson as done by hand: only passing checks do. ### Errors ```json { "error": { "code": "check_running", "message": "The checks of this exercise are already running. Wait for them, or follow them at GET /v1/exercises/ex_7Hq2/checks." } } ``` | Status | 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`, `repository_unreachable` | | 429 | `rate_limited` (with `retry-after`) | | 503 | `runner_unavailable` | A failed check is not an error: `POST /exercises/{id}/check` answers `202`, and the result says which checks failed. Limits are in [Limits](https://learn.docs.sypnia.com/reference/limits). - [Endpoints](/api/endpoints/): Courses, lessons, exercises and checks, progress, explanations, offers and settings. --- ## Endpoints > Courses, lessons, exercises and checks, progress, explanations, offers and settings. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/api/endpoints/ For agents: 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. ### Courses and lessons | Method and path | Does | | --------------------------------------------- | ---------------------------------------------------------------------------------- | | `GET /courses` | Courses you can take, with your progress | | `GET /courses/{id}` | A course, its lessons and checkpoints | | `POST /courses` | Publish a course folder, or a new version (`admin`) | | `DELETE /courses/{id}` | Take a course down (`admin`); progress is kept | | `GET /lessons/{id}?level=&language=&project=` | A lesson rendered for a level and language, with the items chosen from the project | | `GET /next` | The next lesson of your path | ### Exercises and checks | Method and path | Does | | -------------------------------------------- | --------------------------------------------------------------------------- | | `POST /lessons/{id}/exercises` | `{ project }` → `201` the exercise, its branch and state | | `GET /exercises`, `GET /exercises/{id}` | Your exercises; one of them | | `POST /exercises/{id}/check` | Run the checks on the branch's last commit → `202` a run | | `GET /exercises/{id}/checks` | The runs and the result of each check | | `POST /exercises/{id}/hint` | One hint, at your level | | `POST /exercises/{id}/finish` | `{ keep: true }` opens a pull request; `{ keep: false }` deletes the branch | | `POST /questions/{lesson}/{question}/answer` | Answer a question (a person only) | ### Progress | Method and path | Does | | ---------------------- | ------------------------------------------------------------------ | | `GET /progress` | What you have done | | `GET /progress/export` | All of it, as JSON | | `DELETE /progress` | Delete all of it, and the memory notes Learn wrote (a person only) | ### Explanations, offers and settings | Method and path | Does | | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `POST /explain` | `{ item: { kind, ref }, level?, language? }` → an explanation and the lessons that cover it. `kind`: `diff`, `case`, `failure`, `trace`, `problem`, `table`, `column`, `log`, `code` | | `GET /offers` | Lessons offered to you right now | | `POST /offers/{id}/dismiss` | `{ forever: true }` never offers it again | | `GET /settings`, `PATCH /settings` | `offers`, `offers_projects`, `teach_default`, `language`, `captions` | ### The engine | Method and path | Does | | --------------- | --------------------------------------------------------------- | | `GET /health` | `{ "status": "ok" }` | | `/mcp` | the MCP server ([MCP](https://learn.docs.sypnia.com/tools/mcp)) | The OpenAPI document is in the engine's repository, at `spec/openapi.yaml`. --- ## Architecture > How Sypnia Learn is built: its parts, how they connect, and why exercises run outside the engine. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/architecture/ For agents: 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). **Figure**: Sypnia Learn: the engine renders lessons for you and your project, starts and checks exercises outside itself, and remembers what you learned. 1. You, App, the CLI or your agent call the API or the MCP server. 2. A lesson is rendered for your level and filled with items from your project. 3. Your project is read with your permissions: the map, the tables, the traces, the repository. 4. An exercise becomes a branch; its checks are sent as a job. 5. The runner checks the branch in a sandbox and sends back each result. 6. Explanations and hints come from Sypnia AI, at your level. 7. When a lesson is done, a note is written in your memory. The engine is one service with the API, the MCP server, the lesson renderer, the binder that reads your project, the exercise service, the check orchestrator, the offers listener and the memory writer. It keeps its state in Postgres and course files and videos in object storage. Exercises never run inside the engine: a runner checks them in a sandbox. | Part | What it does | Language | Open source | | -------------------------------------------------------------------------------------- | --------------------------------------------- | ------------------------------------------------- | ------------- | | **Learn engine**: API, MCP, renderer, binder, exercises, checks, offers, memory writer | everything in the diagram's frame | TypeScript (Node 22) | yes, AGPL-3.0 | | **`@sypnia/learn`**: the lesson format, the CLI, the client | for learners, authors and their tools | TypeScript | yes, MIT | | **The runner** | checks exercises in a sandbox | Sypnia Agent's sandbox (Rust), or a Docker runner | yes | | **Sypnia's courses** | the lessons and videos presented by Santi | Markdown and video | no | | **Console** at `learn.app.sypnia.com` | courses, progress and settings in the browser | TypeScript (React, `@sypnia/ui`) | no | ### Why TypeScript Learn spends its time rendering Markdown and calling other products, not on a hot path. Writing the engine in the same language as `@sypnia/learn` means the CLI, the console and the engine read lesson files with **the same parser**, so a lesson that passes `learn lint` renders the same everywhere. ### Why exercises run outside An exercise is someone's code. Running it inside the engine would put every learner's work next to everyone's progress. The runner is a separate sandbox with only the branch, no secrets and no production access. - [Request paths](/architecture/request-paths/): What happens when you open a lesson, start an exercise, check it, ask for an explanation, and get an offer. - [Data model](/architecture/data-model/): The tables of the Learn engine and what each one holds. - [On AWS](/architecture/reference-implementation-aws/): How Sypnia Cloud runs Learn on AWS: the services, where each part runs, and how it scales. - [Failures and scaling](/architecture/failures-and-scaling/): What happens to a lesson, an exercise or your progress when a part of Learn, or a product it uses, fails. - [Codebase](/architecture/codebase/): Where Learn's code, the lesson format and the sample project live. --- ## Request paths > What happens when you open a lesson, start an exercise, check it, ask for an explanation, and get an offer. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/architecture/request-paths/ For agents: 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. ### Opening a lesson #### 1. The lesson and you `GET /lessons/failures-have-names?project=la-espiga` loads the current version of the lesson, your level from your profile and your language. #### 2. Your project The binder answers each `uses` selector by reading your project with **your** token: the map from Cases, the table names from Data, preview traces from Telemetry. What it found is kept for 10 minutes. #### 3. Rendered Level blocks for other levels are dropped, the slots are filled, and the answer names the items it chose. ### Starting an exercise `POST /lessons/{id}/exercises` asks Git to create `learn/` from your default branch and commit `LEARN.md` to it, then records the exercise as `started`. From the CLI with a local folder, the branch is created on your machine and pushed when you check. ### Checking #### 1. Queued `POST /exercises/{id}/check` records a run and sends a job to the runner: the repository, the commit, the checks and a 10-minute limit. #### 2. Run The runner clones that commit into a sandbox and runs each check. A `telemetry` check waits for the branch's preview to send the expected trace. #### 3. Results The runner sends the results back, signed. When every check passes, the lesson is marked done, a note is written in your memory, and the run appears as a span of the case `check-exercise` in Telemetry. ### Explaining `POST /explain` reads the item with your token, replaces secret values and masked columns, and asks [Sypnia AI](https://ai.docs.sypnia.com/) for an explanation at your level and in your language. The answer streams back and is not stored. ### Offering a lesson Products publish events (a scope error in Cases, a failed check, a production deploy, a new problem in Telemetry). Learn matches each one to a lesson you have not done, applies the rules (once per trigger, at most one an hour and three a day), and records an offer that App shows. --- ## Data model > The tables of the Learn engine and what each one holds. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/architecture/data-model/ For agents: 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). | Table | Holds | | ----------------- | ------------------------------------------------------------------------------------------------------ | | `courses` | each course: its organization (empty for public courses), title, levels, languages and current version | | `course_versions` | every published version, where its files are, who published it and when | | `lessons` | each lesson of a version: level, step, needs, `uses`, exercise and checks, video | | `learners` | a person: their id (from the Sypnia account, or the engine's sign-in), level, language and settings | | `exercises` | each exercise: person, lesson and its version, project, repository, branch, state | | `check_runs` | each run: the commit, its state and the result of every check, with the message shown | | `progress` | per person and lesson: started or done, the version, when, and where the video stopped | | `shares` | the organizations a person shares their progress with | | `offers` | lessons offered: the trigger, the lesson, when it was shown and what the person chose | | `memory_notes` | which notes in the person's memory Learn wrote, so deleting progress deletes them too | | `explain_usage` | how many explanations a person asked for, per day; never their content | Course files and videos live in object storage, under the version that published them, so a learner always sees the version they started. --- ## On AWS > How Sypnia Cloud runs Learn on AWS: the services, where each part runs, and how it scales. Applies to: Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/architecture/reference-implementation-aws/ For agents: 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. | Part | AWS service | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | API, MCP server, renderer, binder | Lambda (Node 22) behind CloudFront at `learn.api.sypnia.com` and `mcp.learn.sypnia.com`, in `us-east-1` | | State | the schema `sypnia_learn` on Sypnia's shared Postgres (RDS), through RDS Proxy | | Check jobs | an SQS queue with a dead-letter queue, read by the check orchestrator (Lambda) | | Running checks | [Sypnia Agent](https://agent.docs.sypnia.com/)'s sandboxes: ECS Fargate tasks with no public address | | Product events for offers | an EventBridge bus that Cases, Agent, Run, Telemetry and Design publish to | | Course files and videos | a bucket `learn-media` in [Sypnia Files](https://files.docs.sypnia.com/), served through its CDN; videos of an organization's private courses with signed addresses | | Explanations and hints | [Sypnia AI](https://ai.docs.sypnia.com/) | | Memory notes | the memory of the Sypnia account | | Secrets | SSM Parameter Store and KMS | Learn is deployed with [Sypnia Run](https://run.docs.sypnia.com/), like every Sypnia product, and watched with Telemetry. ### How it scales Opening lessons is many small, cacheable reads: Lambda scales with them, and what the binder found is cached for 10 minutes. Checks are the heavy part; they go through the queue, so a burst (a class of thirty checking at once) waits its turn instead of failing, and each learner can have three checks running at a time. --- ## Failures and scaling > What happens to a lesson, an exercise or your progress when a part of Learn, or a product it uses, fails. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/architecture/failures-and-scaling/ For agents: 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. | When this fails | What you see | What Learn does | | -------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------- | | the runner, or a check times out | «We couldn't check this time; it is not your work» | marks the check `error`, retries up to three times, then lets you check again | | the runner's answer is lost | nothing | asks the runner for the result itself | | Git | you cannot start or finish an exercise (`repository_unreachable`) | lessons still open and can be read | | Cases, Data or Telemetry | the lesson uses the sample bakery for that example, and says so | tries your project again next time | | Sypnia AI | «Explanations are not available right now» | lessons, videos and checks keep working | | writing the note in your memory | nothing | keeps the note in an outbox and retries; your progress is already saved | | the video network | the video does not load | the text and the transcript are still there | | the engine's database | Learn is unavailable (`503`) | nothing is lost; every write is repeated safely | ### Never twice A check run is keyed by the exercise and the commit, so checking the same commit twice reuses the result, and marking a lesson done twice changes nothing. In Sypnia Cloud, messages that fail again and again land in a dead-letter queue with an alarm. --- ## Codebase > Where Learn's code, the lesson format and the sample project live. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/architecture/codebase/ For agents: 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. | Repository | What it holds | License | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- | | `sespinosav/sypnia-learn` | the engine (`engine/`), `@sypnia/learn` (`packages/learn/`), the format and API specs (`spec/`), Docker files, and Learn's own map of cases (`cases/`) | engine AGPL-3.0; package and format MIT | | `sespinosav/sypnia-learn-espiga` | La Espiga, the sample bakery: map, design guide, tables, code and tests | MIT | | Sypnia's courses | the lessons and videos presented by Santi | private | | The console | `learn.app.sypnia.com` | private | The repositories live in [Sypnia Git](https://git.docs.sypnia.com/), with a copy on GitHub. ### Learn's own map Learn is built the way it teaches. Its cases include `open-lesson`, `start-exercise`, `check-exercise`, `explain-item`, `offer-lesson` and `delete-progress`, each with its failures, and its traces in Telemetry are grouped by them. --- ## Self-hosting > Run the open-source engine for your school, your company or your community. Applies to: the Sypnia engine (open source, self-hosted). Source: https://learn.docs.sypnia.com/self-hosting/ For agents: 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. You run the engine when you want your own courses for your own people: a school teaching a class, a company onboarding its team, a community with its own lessons. ### What you need | Piece | Required | Choices | | ------------------------- | -------------------------------- | ------------------------------------------------------------------------------------- | | The engine | yes | `ghcr.io/sespinosav/sypnia-learn`, port 8097 | | Postgres 16 or newer | yes | any | | S3-compatible storage | yes, for course files and videos | MinIO, Amazon S3, Sypnia Files | | Sign-in | yes | a [Sypnia Data](https://data.docs.sypnia.com/) engine, or any OpenID Connect provider | | A runner for checks | for exercises | Sypnia Agent's open-source sandbox, or the Docker runner | | A model endpoint | for «Explain this» and hints | a [Sypnia AI](https://ai.docs.sypnia.com/) gateway, or any OpenAI-compatible endpoint | | Git and the other engines | to bind lessons to real projects | a Sypnia Git engine or any git host; Cases, Data and Telemetry engines | Without the other engines, lessons use the sample project, and learners do exercises from the CLI on a local folder. - [Docker](/self-hosting/docker/): Run the engine with Docker Compose, with Postgres, storage and the Docker runner. - [Configuration](/self-hosting/configuration/): Every setting of the engine, its environment variable and its default. - [Upgrades](/self-hosting/upgrades/): How versions work, how to upgrade the engine, and what happens to courses and progress. --- ## Docker > Run the engine with Docker Compose, with Postgres, storage and the Docker runner. Applies to: the Sypnia engine (open source, self-hosted). Source: https://learn.docs.sypnia.com/self-hosting/docker/ For agents: 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. `compose.yaml` ```yaml services: learn: image: ghcr.io/sespinosav/sypnia-learn:1 ports: ["8097:8097"] environment: SYPNIA_LEARN_DATABASE_URL: postgres://sypnia:${DB_PASSWORD}@db:5432/sypnia_learn SYPNIA_LEARN_ROOT_TOKEN: ${SYPNIA_LEARN_ROOT_TOKEN} SYPNIA_LEARN_PUBLIC_URL: https://learn.myschool.org SYPNIA_LEARN_OIDC_ISSUER: https://accounts.myschool.org SYPNIA_LEARN_OIDC_CLIENT_ID: sypnia-learn SYPNIA_LEARN_STORAGE_URL: s3://sypnia-learn?endpoint=http://storage:9000 SYPNIA_LEARN_RUNNER: docker=http://runner:8098 SYPNIA_LEARN_RUNNER_SECRET: ${RUNNER_SECRET} SYPNIA_LEARN_AI_URL: http://ai:8095/v1 SYPNIA_LEARN_AUTO_MIGRATE: "true" depends_on: [db, storage, runner] runner: image: ghcr.io/sespinosav/sypnia-learn-runner:1 environment: SYPNIA_LEARN_RUNNER_SECRET: ${RUNNER_SECRET} volumes: ["/var/run/docker.sock:/var/run/docker.sock"] db: image: postgres:16 environment: { POSTGRES_USER: sypnia, POSTGRES_PASSWORD: "${DB_PASSWORD}", POSTGRES_DB: sypnia_learn } volumes: [db:/var/lib/postgresql/data] storage: image: minio/minio command: server /data volumes: [storage:/data] volumes: { db: {}, storage: {} } ``` - **The Docker runner** runs each check in a throwaway container: no network except package registries, nothing from the host mounted, 2 CPUs, 2 GB and 10 minutes at most. It is the only container that sees the Docker socket. For stronger isolation, point `SYPNIA_LEARN_RUNNER` at a [Sypnia Agent](https://agent.docs.sypnia.com/) sandbox instead. - **Explanations** need a model endpoint; leave `SYPNIA_LEARN_AI_URL` out and «Explain this» and hints are off. - **Health** is `GET /v1/health`; metrics for Prometheus at `GET /metrics`, with the root token. - **Size.** The engine needs about 256 MB of memory. The runner needs about 2 GB for each check running at the same time. --- ## Configuration > Every setting of the engine, its environment variable and its default. Applies to: the Sypnia engine (open source, self-hosted). Source: https://learn.docs.sypnia.com/self-hosting/configuration/ For agents: 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). Settings are environment variables starting with `SYPNIA_LEARN_`. #### `SYPNIA_LEARN_DATABASE_URL`* **Key:** `database_url` * **Type:** string * **Default:** `none (required)` * \[Engine]Postgres 16 or newer. #### `SYPNIA_LEARN_ROOT_TOKEN`* **Key:** `root_token` * **Type:** string (secret) * **Default:** `none (required)` * \[Engine]The token that can do everything on this engine, such as publishing courses. Keep it in a secret store. #### `SYPNIA_LEARN_PUBLIC_URL`* **Key:** `public_url` * **Type:** URL * **Default:** `http://localhost:8097` * \[Engine]The address learners, the CLI and agents use. #### `SYPNIA_LEARN_PORT`* **Key:** `port` * **Type:** number * **Default:** `8097` * \[Engine]The port the engine listens on. #### `SYPNIA_LEARN_STORAGE_URL`* **Key:** `storage_url` * **Type:** URL * **Default:** `none (required)` * \[Engine]S3-compatible storage for course files and videos. #### `SYPNIA_LEARN_AUTH_URL`* **Key:** `auth_url` * **Type:** URL * **Default:** `empty` * \[Engine]A Sypnia Data engine to sign people in. Use this or the OpenID Connect settings. #### `SYPNIA_LEARN_OIDC_ISSUER`* **Key:** `oidc_issuer` * **Type:** URL * **Default:** `empty` * \[Engine]Any OpenID Connect provider, with `SYPNIA_LEARN_OIDC_CLIENT_ID` and, when the provider needs it, `SYPNIA_LEARN_OIDC_CLIENT_SECRET`. #### `SYPNIA_LEARN_RUNNER`* **Key:** `runner` * **Type:** string * **Default:** `off` * \[Engine]Where checks run: `agent=` (a Sypnia Agent sandbox), `docker=` (the Docker runner) or `off` (no exercises checked on the engine). Results are signed with `SYPNIA_LEARN_RUNNER_SECRET`. #### `SYPNIA_LEARN_CHECK_TIMEOUT_S`* **Key:** `check_timeout_s` * **Type:** number * **Default:** `600` * \[Engine]The longest a check run may take. #### `SYPNIA_LEARN_CHECKS_PER_PERSON`* **Key:** `checks_per_person` * **Type:** number * **Default:** `3` * \[Engine]Check runs one person can have at the same time. #### `SYPNIA_LEARN_AI_URL`* **Key:** `ai_url` * **Type:** URL * **Default:** `empty` * \[Engine]An OpenAI-compatible endpoint for explanations and hints, such as a Sypnia AI gateway's `/v1`, with `SYPNIA_LEARN_AI_KEY`. The task or model name sent is `SYPNIA_LEARN_AI_TASK` (default `task:explain`). Empty: explanations and hints are off. #### `SYPNIA_LEARN_GIT_URL`* **Key:** `git_url` * **Type:** URL * **Default:** `empty` * \[Engine]A Sypnia Git engine, to create exercise branches for learners. Empty: exercises start from the CLI, on a local folder. #### `SYPNIA_LEARN_PRODUCTS`* **Key:** `products` * **Type:** string * **Default:** `empty` * \[Engine]The engines lessons read from, as `name=url` separated by commas: `cases`, `data`, `telemetry`. #### `SYPNIA_LEARN_SAMPLE`* **Key:** `sample` * **Type:** boolean * **Default:** `true` * \[Engine]Use the sample bakery when a learner's project has no match. Off: such a lesson answers `422 no_match`. #### `SYPNIA_LEARN_OFFERS`* **Key:** `offers` * **Type:** boolean * **Default:** `true` * \[Engine]Offer lessons in the moment. Events come from the product engines as webhooks signed with `SYPNIA_LEARN_EVENTS_SECRET`; at most `SYPNIA_LEARN_OFFERS_PER_DAY` (default 3) per person a day. #### `SYPNIA_LEARN_OTLP_ENDPOINT`* **Key:** `otlp_endpoint` * **Type:** URL * **Default:** `empty` * \[Engine]Where the engine's spans go: Sypnia Telemetry or any OpenTelemetry endpoint, with headers in `SYPNIA_LEARN_OTLP_HEADERS`. #### `SYPNIA_LEARN_MAX_UPLOAD_MB`* **Key:** `max_upload_mb` * **Type:** number * **Default:** `2048` * \[Engine]The largest video file a course can carry. #### `SYPNIA_LEARN_AUTO_MIGRATE`* **Key:** `auto_migrate` * **Type:** boolean * **Default:** `false` * \[Engine]Run database migrations on start. #### `SYPNIA_LEARN_MCP`* **Key:** `mcp` * **Type:** boolean * **Default:** `true` * \[Engine]Serve the MCP server at `/mcp`. #### `SYPNIA_LEARN_LOG`* **Key:** `log` * **Type:** string * **Default:** `info` * \[Engine]`error`, `warn`, `info` or `debug`. --- ## Upgrades > How versions work, how to upgrade the engine, and what happens to courses and progress. Applies to: the Sypnia engine (open source, self-hosted). Source: https://learn.docs.sypnia.com/self-hosting/upgrades/ For agents: 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. ### Versions The engine follows semantic versions. Image tags: `:1` (the newest 1.x), `:1.4`, `:1.4.2`. | Upgrade | What to do | | -------------- | --------------------------------------------------------------------------------- | | patch or minor | pull the image and restart; migrations only add, and are safe on a running engine | | major | read the release notes, back up Postgres and the storage bucket, then upgrade | The previous major gets security fixes for six months after a new one. ### Courses and progress - **Nothing is rewritten.** An upgrade never changes a published course version or anyone's progress. - **The lesson format has its own version** (`format: 1`). An engine reads every format it knows and refuses a newer one with a clear message; `learn lint` warns before you publish. - **The CLI** works with an engine one minor version apart, older or newer. --- ## Security and privacy > Who sees a learner's progress, what lessons read from your project, the threat model and the checklist. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/security/ Learning is personal. Learn keeps the least it can about you, reads your project only with your permissions, and runs every exercise away from everything else. - [Privacy](/security/privacy/): What Learn keeps about a learner, who can see it, what it reads from a project, and the minimum age. - [Threat model](/security/threat-model/): What could go wrong in Sypnia Learn, and how each threat is answered. - [Checklist](/security/checklist/): What to check before you run Learn for real learners, and before you publish a course. --- ## Privacy > What Learn keeps about a learner, who can see it, what it reads from a project, and the minimum age. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/security/privacy/ For agents: 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. ### What Learn keeps about you | Kept | Not kept | | ---------------------------------------------- | -------------------------------------------------------- | | your account id, level, language and settings | the code of your exercises (it stays in your repository) | | each lesson you started or finished, and when | the text of explanations | | the names of each check and whether it passed | how long you looked at a page, or what you typed | | your exercises: repository, branch, state | anything about your app's customers | | where you stopped in each video | | | the lessons offered to you, and what you chose | | You can download all of it or delete all of it at any time ([Progress and memory](https://learn.docs.sypnia.com/courses/progress-and-memory)). ### Who sees your progress - **You.** - **An organization you share it with**, and only the lessons you finished, never your code or your answers. Sharing is your choice, organization by organization, and you can stop it. - **Nobody else.** There are no public profiles, rankings, streaks or chats between learners, no ads, and no data sold or shared for advertising. ### What lessons read from your project Lessons and explanations read your project **with your permissions**, never more: - the text of your cases and the names of your tables and columns; - the **rows** of a table only when you choose **Use my rows** for that lesson; - **production traces** only when you choose them, always masked the way Telemetry masks them; - **secret values never**. ### Minimum age Learn is for people **16 or older**. It collects nothing about a learner beyond the list above. A school or company that runs the open-source engine uses its own sign-in, and decides who takes part and under which rules. --- ## Threat model > What could go wrong in Sypnia Learn, and how each threat is answered. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/security/threat-model/ For agents: 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). | Threat | Answer | | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | An exercise's code escapes and reaches other learners or secrets | it runs only in a runner sandbox: the branch and nothing else, no secrets, no production access, network only to package registries, time and memory limits, thrown away afterwards | | A lesson file carries instructions aimed at the agent | the agent treats lesson text as data, never as orders; lesson files contain no scripts; checks are a fixed set of kinds, not code from the lesson | | A course's author reads learners' data | authors see how many learners pass each check, never who, unless a learner shares with the author's organization | | An agent fakes progress | only passing checks mark a lesson done; questions, deleting progress, the level and publishing are for people (`403 person_required`) | | Forged check results | the runner's results are signed and tied to the run and the commit | | An explanation leaks a secret or customer data | secret values and masked columns are removed before anything is sent; rows only when the learner chooses | | An organization watches its members' learning | it sees only what each member shares, and only lessons done | | A lesson reads more of a project than it needs | it reads with the learner's own token, names and case text only | | Fake product events trigger offers | events come signed (webhooks) or from a known source (EventBridge in Sypnia Cloud) | | A harmful file inside a course | only video, captions and images are accepted, SVG is cleaned, and files are served from the storage domain, never from the app's | --- ## Checklist > What to check before you run Learn for real learners, and before you publish a course. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/security/checklist/ For agents: 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. ### Running an engine - [ ] The root token lives in a secret store, never in the repository. - [ ] The public address uses HTTPS. - [ ] People sign in through a Sypnia Data engine or your OpenID Connect provider, with two-step sign-in available. - [ ] The runner is a Sypnia Agent sandbox, or the Docker runner on **its own machine**, never next to the engine. - [ ] The runner only reaches package registries, and has time and memory limits. - [ ] `SYPNIA_LEARN_RUNNER_SECRET` and `SYPNIA_LEARN_EVENTS_SECRET` are set. - [ ] Postgres and the storage bucket are backed up. - [ ] The engine's spans go to Telemetry, so you see where learners get stuck. ### Publishing a course - [ ] `learn lint` reports nothing. - [ ] No secret, password or real customer data in a lesson, a video or the sample. - [ ] Each check proves the lesson's goal, not one exact answer. - [ ] Questions ask about understanding. - [ ] A private course is published to the right organization. ### Learning - [ ] Share your progress only with organizations you trust. - [ ] Choose **Use my rows** on a test project, not on production data. --- ## Sypnia Cloud > Your account, organizations that teach their people, what is measured in credits, and plans. Applies to: Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/cloud/ For agents: 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). ### Your account The same Sypnia account as every product. The first time you open Learn you are added to it (roll-in), and your level and memory come with you. ### Organizations | Role | In Learn | | -------------------- | -------------------------------------------------------------------------------------- | | **Owner**, **admin** | publish private courses for the organization's members; see the progress members share | | **Billing** | top up and watch the credits Learn uses | | **Member** | take courses; choose whether to share progress with the organization | - [Credits and limits](/cloud/credits-and-limits/): What Learn measures in Sypnia Cloud, how it is paid with credits, and its limits. - [Plans](/cloud/plans/): Sypnia's courses and their certificates are free; what is paid, and the three ways to pay for it. --- ## Credits and limits > What Learn measures in Sypnia Cloud, how it is paid with credits, and its limits. Applies to: Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/cloud/credits-and-limits/ For agents: 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. ### Never measured Everything inside Sypnia's courses is free: the lessons, the videos, the exercises and their checks, the hints, and the certificate. Your progress, and `learn lint` or `learn preview` on your machine, are not measured either. ### What is measured | Item | Unit | | ----------------------------------------------------- | --------------------------------------------------------- | | «Explain this», outside a course | each call to Sypnia AI, shown as **Learn** in your ledger | | Private courses of an organization | GB stored, and GB of video delivered | | Checks and hints in an organization's private courses | minutes of sandbox time, and each hint | ### How it is paid From your **prepaid credits**, item by item, at the prices published with the plans, or from what your plan includes. You can buy **extra capacity** for one item for the month. Nothing is billed afterwards. App shows what Learn spent, by project and by lesson. Credits are bought in [App](https://app.docs.sypnia.com/account/credits), from USD 5. They expire 12 months after you buy them, and the oldest are spent first. Credits are not refunded, except when the mistake is ours, and then only in credits. ### When credits run out 1. When **80 %** of your credits are spent, counted from the balance after your last top-up, the owners and billing members get an e-mail and a notice in the app; again at **100 %**. 2. Sypnia's courses never stop: they are free, so lessons, videos, checks, hints, certificates and your progress keep working with or without credits. 3. From 100 % there are **7 days of grace**: «Explain this» and your organization's private courses keep working as on your plan, and nothing is deleted. 4. After the 7 days, «Explain this» and the checks and hints of private courses wait for credits: they answer `402 insufficient_credits`, and App offers to top up. Private courses, their videos and everyone's progress stay. Nothing is lost. The limits are in [Limits](https://learn.docs.sypnia.com/reference/limits). --- ## Plans > Sypnia's courses and their certificates are free; what is paid, and the three ways to pay for it. Applies to: Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/cloud/plans/ For agents: 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. ### Sypnia's courses are free Every course Sypnia publishes is free, for every Sypnia account, and so is its [certificate](https://learn.docs.sypnia.com/courses/progress-and-memory#your-certificate). Nothing inside a course spends credits: not the videos, the lessons, the exercises and their checks, the hints, or the certificate. Courses are self-paced, like an academy: there are no live classes, and you start, stop and come back whenever you want. They are in Spanish and English ([Languages](https://learn.docs.sypnia.com/courses/languages)). Learn is for people 16 or older. ### What is paid Two things outside Sypnia's courses spend credits ([Credits and limits](https://learn.docs.sypnia.com/cloud/credits-and-limits)): - **«Explain this»** on anything in App or the command line, outside a course ([Explain this](https://learn.docs.sypnia.com/in-app/explain-this)). - **An organization's own private courses**: their storage, their video delivery, and the checks and hints of their exercises. ### Three ways to pay for them 1. **Learn on its own**, with its own plans. 2. **The Sypnia subscription**: one monthly subscription with every Sypnia product, in tiers that each include an amount of Learn. 3. **Extra capacity**: on any plan, buy more of one item for the month (explanations, check minutes, storage for private courses). Everything is **prepaid**: a subscription paid in advance, or credits topped up with PayPal. When a product plan and a subscription tier both include Learn, you get the larger amount of each item. Credits are bought in [App](https://app.docs.sypnia.com/account/credits), from USD 5. They expire 12 months after you buy them, and the oldest are spent first. Credits are not refunded, except when the mistake is ours, and then only in credits. --- ## Reference > Glossary, limits, design decisions, common questions and the changelog. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/reference/ - [Glossary](/reference/glossary/): Every word these docs use with a fixed meaning. - [Limits](/reference/limits/): Every limit of Sypnia Learn, in the engine and in Sypnia Cloud. - [Design decisions](/reference/decisions/): The choices behind Sypnia Learn, and why each one was made. - [Common questions](/reference/faq/): Short answers to what people ask first about Sypnia Learn. - [Changelog](/reference/changelog/): What changed in Sypnia Learn, newest first. --- ## Glossary > Every word these docs use with a fixed meaning. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/reference/glossary/ For agents: 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. One name per thing, in these docs, in App and in the API. **Binding**: Choosing the case, table or trace of your project that a lesson uses as its example. **Certificate**: What Learn gives you, free, when every lesson of a course is done. It shows your name, the course and the date. **Check**: One thing an exercise must prove, such as a passing Cases check or a case with a failure; it passes, fails, or could not run. **Check run**: Running every check of an exercise on one commit, in a sandbox. **Checkpoint lesson**: A lesson that, once passed, lets Learn propose your next level. **Course**: A short series of lessons about one subject, in order, written in the lesson format. **Engine**: The open-source Learn service (AGPL-3.0) that serves courses, starts and checks exercises and keeps progress. **Exercise**: A real change to your project that a lesson asks for, made on a branch of its own and checked automatically. **Exercise branch**: The branch `learn/` where an exercise lives; Learn never merges it. **Explain this**: The button that explains any diff, case, trace, error, table or log line at your level. **Lesson**: One idea you can then use, with a video or a text (often both), an example from your project and, usually, an exercise. **Lesson format**: The open format (MIT) of course and lesson files. **Lesson offer**: A short lesson App suggests when something happens that it explains; shown once, never forced. **Level**: How much you already know: `starter`, `builder`, `developer` or `senior`, from the short test you take when you start Sypnia. **Level block**: A part of a lesson's text shown only to some levels. **Memory note**: A short fact in your memory that a finished lesson leaves, so the agent knows what you know. **Path**: The list of courses for one level, in order, from `starter` to `senior`. **Progress**: The record of the lessons you started and finished, and whether their checks passed. **Runner**: The sandbox that checks exercises, outside the engine. **Sample project**: La Espiga, Sypnia's sample bakery, used when you have no project or no match. **Slot**: A place in a lesson's text, such as `{{case.title}}`, filled from the item chosen in your project. **Step**: Where a lesson sits in the Sypnia way, such as `map` or `data`. **The Sypnia way**: The order every course follows: the idea, the map of use cases, the contract, the design, the data, the code, publishing and production. **Teach mode**: A way of working where the agent explains each step before it takes it and leaves some steps for you. **Your turn**: A small step the agent leaves for you in teach mode, sized for your level. --- ## Limits > Every limit of Sypnia Learn, in the engine and in Sypnia Cloud. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/reference/limits/ For agents: 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). | What | Limit | Self-hosted setting | | -------------------------------- | --------------------------------------------------------------------- | -------------------------------- | | A lesson file | 200 KB | — | | `course.yaml` | 64 KB | — | | Lessons in a course | 200 | — | | Checks in an exercise | 20 | — | | Questions in a lesson | 10 | — | | One check run | 10 minutes | `SYPNIA_LEARN_CHECK_TIMEOUT_S` | | Check runs at a time, per person | 3 | `SYPNIA_LEARN_CHECKS_PER_PERSON` | | A check's sandbox | 2 CPUs, 2 GB of memory | the runner's own settings | | Open exercises, per person | 20 | — | | A video file | 2 GB and 2 hours | `SYPNIA_LEARN_MAX_UPLOAD_MB` | | A captions file | 1 MB | — | | An image in a course | 10 MB | — | | Explanations, per person | 20 a minute | — | | Hints, per exercise | 5 an hour | — | | Lesson offers, per person | 1 an hour, 3 a day | `SYPNIA_LEARN_OFFERS_PER_DAY` | | What the binder found | kept 10 minutes | — | | API requests, per token | 600 a minute | — | | Check run details | kept 90 days; the pass or fail of each check stays with your progress | — | | Published course versions | kept while the course exists | — | --- ## Design decisions > The choices behind Sypnia Learn, and why each one was made. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/reference/decisions/ For agents: 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. | # | Decision | What Sypnia Learn does, and why | | -- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 1 | **Use cases first** | Every course follows [the Sypnia way](https://learn.docs.sypnia.com/paths/the-sypnia-way): the map before the screens, the data and the code. It is how Sypnia's own products are built. | | 2 | **One level, one test** | Learn reads the level from the same profile as Agent and Cases. Nobody takes two tests, and the agent's explanations grow with the lessons. | | 3 | **Your project is the material** | Lessons take their examples from the learner's own map, tables and traces; the sample bakery fills in when there is no match. People learn faster about what they care about. | | 4 | **Exercises on a branch** | Every exercise lives on `learn/`, and Learn never merges it. Learning never breaks a working app. | | 5 | **Only checks mark a lesson done** | Not a person by hand and not an agent. Progress means something only if it was proven. | | 6 | **Some things are for people** | Answering questions, deleting progress, changing the level and publishing courses refuse an agent's token (`403 person_required`). An agent is a tutor, not a substitute. | | 7 | **Private progress** | Progress belongs to the learner; an organization sees what a member shares, and only lessons done. | | 8 | **Memory notes** | A finished lesson leaves one note in the learner's memory, visible and deletable like any other, so the agent knows what they know. | | 9 | **Offers are rare** | Once per trigger, at most one an hour and three a day, never during an approval or a running task. Learning in the moment should help, not nag. | | 10 | **Spanish and English** | Sypnia's courses are in Spanish and in English, video, captions, transcripts and text, so nobody learns in a second language. Code names stay in English in both. | | 11 | **Free, like an academy** | Every Sypnia course and its certificate are free, and courses are self-paced, with no live classes. Learning the Sypnia way should cost nothing and fit around a working day. Learn is for people 16 or older. | | 11 | **An open format** | Lessons are Markdown files in a format under MIT; the engine is AGPL-3.0, like Sypnia's other engines. Anyone can read a lesson, and anyone can run their own courses. | | 12 | **TypeScript engine** | The engine shares the lesson parser with the CLI and the console, so a lesson renders the same everywhere. | | 13 | **Checks outside the engine** | A learner's code runs only in a sandbox with the branch and nothing else. | | 14 | **No race** | No rankings, streaks or public profiles. People learn at their own pace. | --- ## Common questions > Short answers to what people ask first about Sypnia Learn. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/reference/faq/ #### Do I need to know how to program? No. The starter path is for people who have never programmed, and its first course ends with your website online. The agent writes the code; you learn what each piece does and decide. #### Do I need a project? No. Until you have one, lessons use La Espiga, Sypnia's sample bakery, and exercises run on your own copy of it. #### Which language are the courses in? In Spanish and in English: every video, its captions, the lesson text and the transcript exist in both. See [Languages](https://learn.docs.sypnia.com/courses/languages). #### Do the courses cost anything? No. Every Sypnia course is free, and so is its certificate. Nothing inside a course spends credits. What does spend credits is «Explain this» outside a course, and an organization's own private courses ([Plans](https://learn.docs.sypnia.com/cloud/plans)). #### Is there a certificate? Yes, free. When every lesson of a course is done, Learn gives you that course's certificate ([Your certificate](https://learn.docs.sypnia.com/courses/progress-and-memory#your-certificate)). #### Are there live classes? No. Courses are self-paced, like an academy: you start, stop and come back whenever you want, and the agent and the hints help you along. #### Is there a minimum age? Yes. Learn is for people 16 or older. #### Will the agent do the exercises for me? It helps at your level, and at the starter level it can write the code you decide on. But a lesson counts as done only when its checks pass, and the questions are yours to answer. #### Will an exercise break my app? No. It lives on its own branch, and Learn never merges it. You decide whether to keep it with a pull request. #### Who sees my progress? You, and an organization only if you share it with that organization. See [Privacy](https://learn.docs.sypnia.com/security/privacy). #### Can my company or school run its own courses? Yes. Write them in [the lesson format](https://learn.docs.sypnia.com/lessons/the-lesson-format) and run the open-source engine, or publish them as private courses of your organization in Sypnia Cloud. #### Is what I learn only useful with Sypnia? The order of work is Sypnia's, and the exercises use Sypnia's products. What you learn about use cases, data, tests and reading production is true anywhere. --- ## Changelog > What changed in Sypnia Learn, newest first. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://learn.docs.sypnia.com/reference/changelog/ ### 2026-11-18 Sypnia Learn and its documentation: levels and paths, the Sypnia way, free video courses in Spanish and English with a free certificate, self-paced, lessons on your own project, exercises on a branch and their checks, progress in your memory, learning inside App («Explain this», lessons in the moment, teach mode), the open lesson format, the SDK, CLI and MCP, the API, the architecture on AWS, self-hosting, security and privacy, and Sypnia Cloud.