# Flash Cards from PDF

Turns a PDF into study flash cards, with optional AI-generated images per concept.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<DocsBaseSwitcher base="flue" agent="flashcards-pdf" />

<AgentPreview
  agent="flashcards-pdf"
  framework="flue"
  inputFields="[
  {
    name: &#x22;url&#x22;,
    label: &#x22;PDF URL&#x22;,
    placeholder: &#x22;https://example.com/biology-chapter.pdf&#x22;,
    type: &#x22;text&#x22;,
  },
]"
/>

## Summary [#summary]

The **Flash Cards from PDF Agent** turns a document into ready-to-study flash
cards. It extracts the text, identifies the concepts worth memorizing, and writes
concise front/back pairs — and on request, generates an illustrative image for
each card. Reach for it to build study decks from textbooks, slides, or notes.

## Install [#install]

```bash
npx shadcn@latest add https://agentcn.vercel.app/r/flue/flashcards-pdf.json
```

## Composition [#composition]

```text
agents/
└── flashcards-pdf.ts      # Conversational card-writing agent
workflows/
└── flashcards-pdf.ts      # Typed Flashcards output
tools/
├── parse-pdf.ts           # Extract text from a PDF
└── generate-image.ts      # Generate an image for a concept
```

## Customization [#customization]

* **Reshape the deck.** Edit the `Flashcards` valibot schema to add tags, hints,
  or difficulty.
* **Swap the image model.** Edit `generate-image.ts` or drop images entirely.
* **Export the deck.** Add a tool that writes to Anki, CSV, or your SRS.
* **Swap the model.** Change the `model` field on the agent.
