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

microsoft/generative-ai-with-javascript: A Lesson-Based Course for JavaScript Developers New to LLMs

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

1,295 stars858 forksJavaScriptMIT

At a glance

What is it?
Microsoft's MIT-licensed course teaches Generative AI through eight lessons, a companion character-chat app, and a Codespaces setup that uses GitHub Models. It is a teaching repository, not a library, and its value depends on whether you want a guided curriculum rather than API reference.
Who is it for?
Adopt this if you are a JavaScript developer who wants a structured path from LLM basics through RAG, tool calling and MCP, and you are willing to run the lessons inside a forked repository and Codespaces. Do not adopt it if you need a production SDK, a stable API surface, or a reference for a specific model provider, because the repository is a course with lessons and a companion app rather than a versioned library.
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 2 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 November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • microsoft/generative-ai-with-javascript1,295 ★ · +34
Star history
Repository2026-09-102026-11-15
microsoft/generative-ai-with-javascript1.3k1.3k

34 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The gap this course targets: JavaScript developers who have never called an LLM

Most Generative AI material assumes Python. The README frames the audience directly: developers who want to understand Generative AI and its potential for their applications, working in JavaScript. The repository answers that with a course rather than a library. Eight lessons run from an introduction to Generative AI and LLMs for JavaScript developers through prompt engineering, structured output, retrieval augmented generation, tool calling, MCP, and enhancing MCP clients with large language models. Each lesson ships as a written lesson with an assignment and a quiz, a short video, solutions, and characters you can interact with through the companion app. The course is MIT licensed, so reuse and modification are permitted under those terms. The framing device is a time-travel story where you chat with figures such as Leonardo da Vinci, Ada Lovelace, or Montezuma. That is a pedagogical choice, not a technical one, and it tells you the intended reader is someone who benefits from narrative continuity across lessons rather than someone looking up a function signature.

How the lessons, videos, and companion app fit together

The repository is organized around three artifacts. First, lessons/ holds the numbered lesson directories, each with its own README and, per the README's lesson description, an assignment, a quiz, and solutions. Second, videos/ holds session material: the README's video table lists slides in pptx and pdf form, demo directories, session scripts as markdown, and YouTube links for each session. Third, app/ holds the companion app that lets you interact with historical figures, and the README points to app/README.md for running it. The lessons are the spine; the videos and app are supporting material that demonstrate the same concepts in a different medium. Treat each lesson as self-contained teaching code rather than modules you compose into an application. That distinction matters when you evaluate the repository: you are reading a curriculum, and the code exists to illustrate the curriculum.

Getting the course running: fork, Codespaces, GitHub Models

The README gives an explicit path. Select the Fork button in the upper right-hand corner of the repository, or use the fork badge link. In your fork, click the Code button, go to the Codespaces tab, and choose Create codespace. The README states this creates a preconfigured online environment, and that you can then use GitHub Models to run the code examples and interact with AI models for free without additional setup. Two alternate routes are documented. The companion app can be run locally, with the README linking to the app directory and to docs/setup/README.md under the heading Option 2: Running the app locally. The README also notes that while Codespaces provides a quick starting point, you can run the code samples locally. The local setup details, including the exact environment variables and model credentials for local runs, live in docs/setup/README.md. If you intend to work offline or against your own model endpoint, read that setup document before forking, because the free path described in the README depends on GitHub Models.

The MCP lessons are the newest and the most consequential

The README flags MCP lessons as newly added and links two of them: lesson 7, on building and testing your first server, and lesson 8, on improving an MCP client by integrating an LLM. The lesson table describes lesson 7 as getting started with MCP to standardize how to expose prompts, resources and tools, and lesson 8 as improving your MCP app by improving clients with an LLM. For a JavaScript developer, this is the part of the course with the shortest shelf life if the protocol changes, and also the part that is hardest to find explained in a JavaScript context elsewhere. The sequencing is sensible: you build a server before you build a client that talks to one. The caveat is that these lessons sit at the end of a course that assumes you worked through prompt engineering, structured output, RAG, and tool calling first. Skipping to lesson 7 means skipping the tool-calling concepts that lesson 8 builds on.

Where the course format becomes a limitation

A course is not a dependency. The repository has no published GitHub releases, which is consistent with a teaching project whose lessons are edited in place rather than versioned. If you adopt patterns from lesson 5 on RAG or lesson 6 on tool calling, you are copying illustrative code, not pinning a package. There is no upgrade path in the sense a library has one: the README says new lessons will be added over time, which means the material can shift under you. The narrative wrapper is another constraint. A learner who wants a terse reference for structured output will find the time-travel framing and the character interactions add overhead rather than clarity. And the free model access described in the README is tied to GitHub Models inside Codespaces; check rate limits, model availability, and what happens when that free access changes. For a team standardizing on a different provider, the lessons still teach concepts, but the runnable examples may not transfer without rewriting the model call.

Alternatives and the difference in approach

The most direct alternative is provider documentation, for example the OpenAI or Azure AI Foundry docs, which are reference material organized by endpoint and parameter rather than by lesson. The difference is structural: reference docs answer what does this parameter do, while this course answers what should I build next and why. A second alternative is Microsoft's own Python-oriented Generative AI for Beginners course, which the naming of this repository echoes. The difference there is language and ecosystem: this repository keeps examples in JavaScript and targets JavaScript developers specifically, which matters if your application code is Node.js and you want examples in the same language you ship. A third option is framework documentation such as LangChain.js or the Vercel AI SDK, which give you abstractions and APIs you can install. Those are libraries with version numbers and changelogs; this is a curriculum with lessons. Choosing between them is not a quality comparison. It is a question of whether you need to learn the concepts first or wire an abstraction into an existing codebase today.

Maintenance, contribution, and licence terms

The repository is MIT licensed, which permits reuse, modification, and sharing provided the licence terms are met; that is the extent of what can be said here, and it is not legal advice. The README invites contributions through a PRs welcome badge and a call for translations: each lesson in the lessons/ folder has a translations/ directory, and you add a file named like README.<language code>.md, for example README.es.md. That is a low-friction contribution path if you want to translate rather than change code. Maintenance cost for an adopter is mostly your own time, since there is nothing to upgrade. The cost that does exist is re-reading lessons when the repository changes, because the README states new lessons will be added. There are no releases to track, so there is no changelog to scan for breaking changes. If you fork the repository to work through the exercises, your fork will diverge from the upstream lessons as they are edited, and re-syncing means resolving differences in lesson content rather than dependency versions.

Editorial conclusion

Adopt this if you are a JavaScript developer who wants a structured path from LLM basics through RAG, tool calling and MCP, and you are willing to run the lessons inside a forked repository and Codespaces. Do not adopt it if you need a production SDK, a stable API surface, or a reference for a specific model provider, because the repository is a course with lessons and a companion app rather than a versioned library. Before committing time, open lessons/05-rag/README.md and lessons/07-mcp/README.md and confirm the model access path works for you: the README's default route is GitHub Models through GitHub Codespaces, and the local route is documented separately under docs/setup/README.md.

Frequently asked questions

What is the generative-ai-with-javascript course?

It is an eight-lesson Microsoft course teaching generative AI to JavaScript developers, covering fundamentals, a first application, prompt engineering, structured output, retrieval augmented generation, tool calling, and two lessons on the Model Context Protocol. Each lesson ships written material, an assignment and quiz, solutions, a short video, and characters to interact with through a companion app.

Do I need my own API key to run the generative-ai-with-javascript examples?

Not on the intended path. The instructions are to fork the repository and create a preconfigured cloud workspace, which lets you run the examples against a hosted model service for free without additional setup. A local option is documented separately and does mean supplying your own access.

What dependencies does the generative-ai-with-javascript repository use?

Two runtime dependencies, a coding assistant SDK from GitHub and version 4 of OpenAI's client library, plus a single development dependency that is a TypeScript execution runner, which indicates the examples are written in TypeScript and run directly. The package is marked private at version 1.0.0 and there are no tagged releases.

How are the generative-ai-with-javascript lessons translated?

A single build script runs a generative tool over every lesson readme, installing a workflow from a separate repository and writing translated files into a per-lesson translations directory using a filename template. A glossary file at the root is passed in as a parameter, and the French version of the main readme already exists at the root alongside a top-level translations directory.

How many lessons are in the generative-ai-with-javascript course?

Eight. The first six cover fundamentals, a first application, prompt engineering, structured output, retrieval augmented generation, and tool calling, and the last two cover the Model Context Protocol, first how to build and test a server and then how to improve a client by putting a model behind it.

Does the generative-ai-with-javascript repository include video material?

Yes, as a table of sessions where each row lists a slide deck in a presentation format and the same deck as a document, a demo directory of code, a session script in markdown, and a hosted video link. The final visible row in that table is cut off partway through a link to a deck about a JavaScript framework.

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)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/microsoft-generative-ai-with-javascript.svg)](https://hysenlabs.com/projects/microsoft-generative-ai-with-javascript)

Was this useful?