Model or dataset
microsoft/generative-ai-with-javascript avatar
microsoft/generative-ai-with-javascript

microsoft/generative-ai-with-javascript: a JavaScript-first GenAI course, reviewed

Join a time-traveling adventure where you meet history’s legends while learning Generative AI technologies! ✨

1,271 stars842 forksJavaScriptMIT

At a glance

What is it?
Microsoft's course teaches Generative AI through a time-travel story and a companion app, with eight lessons from prompts to MCP. It is a teaching repo, not a library, and the setup path runs through GitHub Codespaces and GitHub Models.
Who is it for?
Adopt it if you write JavaScript and want a guided path from LLM basics to MCP servers, and you are willing to run the samples in a forked repository with GitHub Codespaces and GitHub Models. Do not adopt it if you need a library to import into a production codebase, or if your models must run against your own Azure endpoint from the first commit; the lessons are prose, quizzes and a companion app, not an SDK.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 19 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 28, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What the course actually solves, and for whom

Most Generative AI material is written for Python. A JavaScript developer who wants to add an LLM call to a Node service has to translate a notebook, a pip install and a different SDK before anything runs. This repository attacks that gap directly: every lesson is JavaScript, and the README frames the whole thing as a course rather than a library. The stated audience is developers who "wanted to understand Generative AI and the potential for your applications". The repository is a Microsoft project under the MIT licence, and the README describes the content as reusable and shareable.

The framing device is a time-travel story. Lessons have you chat with Leonardo da Vinci, Ada Lovelace or Montezuma through a companion app in the app/ directory. That is not decoration for its own sake: the characters give each lesson a concrete prompt and a concrete model call to reason about, which is easier to follow than an abstract "call the completions endpoint" example. If you want a reference implementation to copy into a product, this is the wrong shape. If you want to understand what tool calling or retrieval actually does before you pick a framework, the lesson sequence is the point.

How the lessons are structured and how the companion app fits in

Eight lessons are listed in the README table, numbered 01 through 08, each living in its own directory under lessons/. The progression is deliberate: introduction to Generative AI and LLMs, then a first AI app and system prompts, then prompt engineering, structured output, retrieval augmented generation, tool calling, MCP, and finally enhancing MCP clients with a large language model. Lessons 7 and 8 are marked in the README as newly added, and the README says more lessons will be added over time.

Each lesson, per the README, ships with a written lesson containing an assignment and a quiz, a short video, solutions for both, and characters you can interact with through the companion app. The app lives in app/ with its own README, and the repository also carries a videos/ directory with slides in pptx and pdf form, demo folders, and session scripts. That is a lot of parallel material for one topic, and it is the main structural risk: the lesson text, the video script and the app code can drift apart, and nothing in the repository layout suggests an automated check that they stay in sync. The README also notes that audio tags are used so lessons can be heard as well as read.

Installing and running your first lesson

The README's getting-started path does not begin with npm install. It begins with a fork. Step one is to select Fork in the upper right of the repository, or use the fork badge the README provides. Step two is to click Code in your forked repository, open the Codespaces tab, and choose Create codespace. According to the README, that produces a preconfigured online environment where GitHub Models can run the code examples and let you interact with AI models for free, without additional setup. The README marks this as the quick path and notes that running the samples locally is also possible, pointing at docs/setup/README.md for the local option.

Once the codespace is up, the repository is a Node project. The package.json declares "type": "module", so the samples are ES modules, and it lists two runtime dependencies and one dev dependency:

json
{
  "name": "genai-js",
  "version": "1.0.0",
  "private": true,
  "type": "module",
  "dependencies": {
    "@github/copilot-sdk": "^0.1.23",
    "openai": "^4.78.1"
  },
  "devDependencies": {
    "tsx": "^4.21.0"
  }
}

The presence of openai alongside @github/copilot-sdk tells you the samples speak an OpenAI-compatible interface, which is why GitHub Models can stand in as the provider. The only script defined in package.json is not a lesson runner. It is a translation helper that drives GenAIScript against the lesson READMEs and writes files into a translations/ directory:

bash
npm run genai:translate

That script expands to an npx genaiscript@latest run translator invocation over ./lessons/*/README.md, with a remote action, a glossary file, a target language of fr, and a filename template that places output at {{dirname}}/translations/{{basename}}.{{lang}}{{extname}}. In other words, the repository's own tooling is aimed at maintaining the course in many languages, not at running the course. For a first real use, follow the README instead: fork, open a codespace, then open lessons/02-first-ai-app/README.md and work the assignment there. Expect to write the model call yourself in that lesson; the repository gives you the environment and the GitHub Models access, not a prebuilt app to run.

Where this course stops being the right tool

The clearest limitation is that there is nothing to install as a dependency. package.json is marked "private": true, the package name genai-js is not published for consumption here, and the README never presents the repository as a package. If you arrived looking for a JavaScript SDK for Generative AI, this is not one, and no amount of reading the lessons will change that.

The second limitation is provider coupling in the happy path. The README's recommended setup runs on GitHub Codespaces with GitHub Models, and the README explicitly ties the free-model experience to that combination. That is a generous on-ramp, but it means the fastest path to a working sample is also the path with the least resemblance to a production deployment, where you bring your own key and endpoint. The README does point to a local option in docs/setup/README.md, yet the top-level README does not spell out what that local setup requires, so you cannot judge the effort from the front page alone.

Third, the course is a moving target by design. The README states that new lessons will be added over time, and lessons 7 and 8 are flagged as recent additions. That is fine for a learner and awkward for anyone treating the lesson numbering as a stable curriculum to schedule training around. There is also no release list to pin against; the repository carries no releases, so versioning happens at the level of commits on main.

How it compares with Microsoft's Python-first Generative AI course

The obvious alternative is the sibling course for Python developers, which covers the same arc of topics (prompting, structured output, RAG, function calling) in Python. The difference is not cosmetic. Choosing between them is choosing your runtime: the Python course assumes a Python environment and its ecosystem for notebooks and data work, while this repository assumes Node, ES modules, and a JavaScript toolchain. If your application is a web front end, a Node service or an edge function, the JavaScript version keeps the examples in the language you will actually ship, which matters most in the lessons on structured output and tool calling, where the shape of the parsed object and the function signature are the thing being taught.

A second alternative is to skip courses and read the OpenAI Node SDK documentation plus a framework's own guides. That is faster if you already know what you want to build and only need the API surface. It is worse if you do not yet know why retrieval exists or when tool calling beats a longer prompt, because SDK docs describe mechanics and rarely explain the decision. The trade-off here is real: this course spends your time on concepts and quizzes, and returns less immediately runnable code than a framework quickstart would.

Maintenance, licensing and the cost of keeping up

The repository is not archived, and the last push was on 2026-09-08, which is recent enough that the lesson set should still match the tooling it describes. The MIT licence covers the repository contents, which is the permissive end of the spectrum and consistent with the README's invitation to reuse, tweak and share the content. Two caveats are worth stating without pretending to give legal advice. First, the licence covers the repository, not the models or hosted services the lessons call, and those carry their own terms. Second, the repository contains material contributed through a translation workflow; the README asks readers to help translate and describes adding files such as README.es.md into each lesson's translations/ directory, so translated copies can lag the English source.

The upgrade cost is mostly yours rather than the maintainers'. Because the samples are tied to model providers and SDK versions, a dependency bump in package.json (openai is pinned to ^4.78.1, @github/copilot-sdk to ^0.1.23) can invalidate a lesson's code before the prose is revised. The translation script pins genaiscript@latest, which means the repository's own tooling resolves a new version on every run; that is convenient for maintainers and a source of surprise for anyone reproducing an old translation locally.

Editorial conclusion

Adopt it if you write JavaScript and want a guided path from LLM basics to MCP servers, and you are willing to run the samples in a forked repository with GitHub Codespaces and GitHub Models. Do not adopt it if you need a library to import into a production codebase, or if your models must run against your own Azure endpoint from the first commit; the lessons are prose, quizzes and a companion app, not an SDK. Before committing time, open lessons/07-mcp/README.md and app/README.md and check that the tooling they assume (Codespaces, GitHub Models) is acceptable in your environment, because the README's own local-run option is documented only as a link to docs/setup/README.md.

Frequently asked questions

Can I do AI with JavaScript?

Yes. This course is built entirely around JavaScript, and its package.json declares "type": "module" with the openai package as a dependency, so the samples call models from Node rather than from Python.

What programming language is used for generative AI?

Much of the public material is Python, which is why this repository exists: it teaches the same topics (prompting, structured output, RAG, tool calling, MCP) in JavaScript instead.

How do I get started with microsoft/generative-ai-with-javascript?

The README says to fork the repository, click Code, open the Codespaces tab and choose Create codespace. That gives you a preconfigured environment where GitHub Models can run the code examples without additional setup, and a local option is linked from docs/setup/README.md.

Which lessons does microsoft/generative-ai-with-javascript include?

Eight are listed in the README table: introduction to Generative AI and LLMs, a first AI app, prompt engineering, structured output, retrieval augmented generation, tool calling, MCP, and enhancing MCP clients with a large language model. The README says more lessons will be added over time.

Is microsoft/generative-ai-with-javascript a library I can install?

No. The package.json is marked "private": true and the README presents the repository as a course with lessons, quizzes and a companion app, not as a published package to add to your dependencies.

Official sources

  1. Issues
  2. License: MIT
  3. microsoft/generative-ai-with-javascript on GitHub
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/microsoft-generative-ai-with-javascript.svg)](https://hysenlabs.com/projects/microsoft-generative-ai-with-javascript)