Author: Vadim Piccini
Date: March 2025
GitHub Repo: github.com/vadpiccini/coursera_flashcards
Coursera Flashcards is a Chrome extension that automatically captures transcripts from Coursera video lectures, summarizes them using an OpenAI model, and generates flashcards. These flashcards can then be exported for Anki to enable efficient spaced-repetition learning.
While this extension isn’t a fully autonomous agent, it demonstrates agentic AI principles by automating a multi-step pipeline:
This approach showcases how LLMs can be integrated into everyday workflows—particularly in educational contexts—to save time and effort for learners.
Coursera Flashcards consists of three main parts: a background script, a content script, and UI pages (popup + settings). Below is a simplified overview:
flowchart LR A["User clicks 'Extract Notes'"] --> B["Content script extracts transcript"] B --> C["Background script calls OpenAI API"] C --> D["Summaries & flashcards returned"] D --> E["User exports Q&A to Anki"]
Background Script – Calls the OpenAI API to generate flashcards:
function callOpenAI(textToProcess, callback) { const system_prompt = `Please summarize and create flashcards. ...`; fetch("https://api.openai.com/v1/chat/completions", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${apiKey}` }, body: JSON.stringify({ model: model, messages: [ { role: "system", content: system_prompt }, { role: "user", content: textToProcess } ], // Additional parameters }) }) .then(response => response.json()) .then(data => callback(data)) .catch(error => console.error("Error calling OpenAI:", error)); }
Content Script – Extracts transcript text from Coursera DOM elements:
function extractCourseraNotes() { const selector = ".css-4s48ix"; const elements = document.querySelectorAll(selector); let allText = []; elements.forEach((element) => { const text = element.innerText.trim(); if (text) allText.push(text); }); return allText.length > 0 ? allText.join(" ") : null; }
You can install Coursera Flashcards in one of two ways:
chrome://extensions
in your Chrome browser..csv
file and import them into Anki or another flashcard tool.Note: Coursera Flashcards is not affiliated with Coursera, OpenAI, or Anki. Your key remains in your browser’s local storage and is used only when making requests to OpenAI.
Coursera Flashcards demonstrates how agentic AI can simplify and accelerate knowledge acquisition: from raw transcript extraction to curated flashcards in one click. I invite you to explore, contribute, or simply enjoy the benefits of automated note-taking and efficient study workflows.
For questions or suggestions, please reach out via GitHub Issues or email coursera_flashcards@gmx.com
Disclaimer: The author and Coursera Flashcards are not affiliated with Coursera, OpenAI, or Anki. Use at your own discretion.Submitted to the Agentic AI Innovation Challenge 2025.