Gemini Chat for Anki

AnkiWeb addon 1725302966

Integrates an AI chat assistant into Anki review for grammar explanations, translations, examples, and custom card questions with per-deck prompts.
AI-generated summary; may contain mistakes.

ai

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
3 (πŸ‘ 2 Β· πŸ‘Ž 1)
Updated
2025-11-20
Anki versions
25.09.2~
Description language
en

Maintenance

stale

  • Last update or commit was 315 days before the snapshot (2025-11-20).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
23.0925.09.2+2025-11-20
History across monthly snapshots

Loading…

Similar addons

AnkiExplain

Adds an Explain sidebar to Anki reviews, providing Gemini AI explanations, follow-up chat, customizable prompts, streaming responses, model choices, and accessibility improvements.

aireview-flowshortcutsappearanceaccessibility

Rating 5 πŸ‘ 5 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2026-02-12
Grammar Trainer

Creates interactive dropdown fill-in-the-blank grammar cards manually or with optional AI assistance, supporting many languages, automatic cloze generation, smart distractors, and text-to-speech.

card-creationaicard-templatesclozequiz

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 ⭐ 0 Anki 25.07.1~ Updated 2026-09-26
word ai validator

Validates word usage, phrasal verbs, idioms, and collocations using OpenAI or Gemini AI with Cambridge, Oxford, and OZDIC dictionary examples and customizable rules.

aisync-integrationdictionary

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2025-04-10

README

πŸ€– Gemini Chat for Anki

AnkiWeb Anki

An intelligent AI chat assistant seamlessly integrated into your Anki study sessions. Get instant help with grammar explanations, translations, examples, and custom questions while reviewing your cards.


πŸ“– Overview

Gemini Chat for Anki brings AI-powered assistance directly into your Anki reviewer. Whether you need grammar explanations, translations, or want to ask custom questions about your cards, this add-on makes your study sessions more interactive and productive using Google's Gemini API.

✨ Key Features

  • πŸ’¬ Embedded Chat Window – Built directly into the Anki reviewer
  • 🎯 Context-Aware Responses – AI automatically receives your card content
  • βš™οΈ Per-Deck Configuration – Different prompts for different decks
  • πŸ“ Multiple Note Type Support – Works with various card templates
  • ✏️ Custom Prompts – Ask any question about your cards
  • πŸ”§ Flexible API Support – Compatible with Gemini and other AI models

πŸš€ Installation

Quick Install from AnkiWeb

  1. Open Anki
  2. Go to Tools β†’ Add-ons β†’ Get Add-ons...
  3. Enter code: 1725302966
  4. Click OK and restart Anki

AnkiWeb: https://ankiweb.net/shared/info/1725302966

Manual Installation

  1. Clone or download this repository:

    git clone https://github.com/YuValeryc/Anki-AI-assitant.git
    
  2. Copy to your Anki add-ons directory:

    • Windows: %APPDATA%\Anki2\addons21\
    • macOS: ~/Library/Application Support/Anki2/addons21/
    • Linux: ~/.local/share/Anki2/addons21/
  3. Restart Anki


βš™οΈ Initial Configuration

Step 1: Get Your Gemini API Key

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Click Create API Key
  4. Copy the generated API key

Step 2: Configure the Add-on

  1. In Anki, go to Tools β†’ Gemini Chat Config
  2. In the configuration window:
    • Paste your API Key in the API Key field
    • Leave the API Endpoint as default (or customize if needed)
    • Click Save

🎯 Enabling Chatbot for a Deck

Follow these steps to configure the chatbot for a specific deck:

Step 1: Open Deck Configuration

  1. Go to Tools β†’ Gemini Chat Config
  2. In the configuration window, you'll see:
    • Deck Selector dropdown at the top
    • Note Type Selector below it
    • Prompt Configuration area

Step 2: Select Your Deck

  1. Click the Deck Selector dropdown
  2. Choose the deck you want to enable the chatbot for
  3. The add-on will scan for available note types in that deck

Step 3: Choose Note Type

  1. Click the Note Type Selector dropdown
  2. Select the note type you're using for your cards
  3. The add-on will display available fields for that note type

Step 4: Configure Prompts

You have two options:

Option A: Use Pre-defined Prompts

  1. In the Prompt Templates section, you'll see options like:
    • Explain Grammar
    • Translate Sentence
    • Provide Examples
    • Simplify Explanation
  2. Select the prompt that matches your study needs
  3. Click Save

Option B: Create Custom Prompt Template

  1. Select Custom Prompt from the dropdown
  2. In the text area, write your custom prompt template
  3. Use field placeholders like {Front}, {Back}, {Word}, etc.
  4. Example custom prompt:
    Explain the grammar structure of: {Sentence}
    Also provide 2 example sentences using the same pattern.
    
  5. Click Save

Step 5: Test the Configuration

  1. Open your deck and start reviewing
  2. You should see a Chat button in the bottom-right corner
  3. Click it to test the chatbot

πŸ“ Using Custom Prompts During Review

There are two ways to use custom prompts:

Method 1: Quick Custom Question (Recommended)

  1. While reviewing a card, click the Chat button
  2. In the chat window, select Custom Prompt from the dropdown
  3. The input field below will become enabled
  4. Type your question (the card fields are automatically included)
  5. Examples:
    • "Can you give me 5 more example sentences?"
    • "What's the difference between this word and its synonym?"
    • "Explain this grammar point in simple terms"
  6. Click Send

Method 2: Pre-configured Custom Prompts

  1. Configure custom prompt templates in Tools β†’ Gemini Chat Config
  2. Save multiple prompt templates for different purposes
  3. During review, select your saved template from the dropdown
  4. Click Send

πŸ’‘ Usage Examples

Example 1: Language Learning Deck

Deck: Japanese Vocabulary
Note Type: Basic
Fields: Word, Reading, Meaning, Example

Configuration:

  • Deck: Japanese Vocabulary
  • Note Type: Basic
  • Custom Prompt Template:
    For the word "{Word}" ({Reading}):
    1. Provide 3 example sentences with English translation
    2. List common collocations
    3. Mention any similar words and their differences
    

Example 2: Medical School Deck

Deck: Anatomy
Note Type: Cloze
Fields: Text, Extra

Configuration:

  • Deck: Anatomy
  • Note Type: Cloze
  • Custom Prompt Template:
    About this medical concept: {Text}
    
    Please explain:
    - Clinical significance
    - Common exam questions
    - Memory techniques to remember this
    

Example 3: On-the-Fly Questions

While reviewing any card:

  1. Click Chat button
  2. Select Custom Prompt
  3. Type specific questions like:
    • "What are common mistakes with this concept?"
    • "Can you create a mnemonic to remember this?"
    • "Give me a real-world application example"

πŸ”§ Advanced Configuration

Multiple Note Types in One Deck

If your deck contains multiple note types:

  1. Open Tools β†’ Gemini Chat Config
  2. Select your deck
  3. Configure each note type separately:
    • Set up prompts for Note Type 1
    • Click Save
    • Select Note Type 2 from dropdown
    • Set up prompts for Note Type 2
    • Click Save
  4. The add-on will automatically use the correct prompt based on the card's note type

Custom API Endpoints

To use a different AI model:

  1. Go to Tools β†’ Gemini Chat Config
  2. Change the API Endpoint field
  3. Adjust the API Key accordingly
  4. Click Save

Field Mapping

The add-on automatically detects your card fields. You can use them in custom prompts:

  • Use curly braces: {FieldName}
  • Common field names: {Front}, {Back}, {Word}, {Sentence}, {Extra}
  • If a field is missing, it's safely skipped

πŸ› οΈ Troubleshooting

Chat Button Not Appearing

  • βœ… Ensure add-on is enabled: Tools β†’ Add-ons
  • βœ… Restart Anki after installation
  • βœ… Make sure you're in the reviewer (not deck browser)

No Response from AI

  • βœ… Check API key in Tools β†’ Gemini Chat Config
  • βœ… Verify internet connection
  • βœ… Check API rate limits (Gemini has daily limits)
  • βœ… Review console logs: Press Ctrl + Shift + (Windows) orCmd + Shift + (macOS)

Incorrect or Empty Fields

  • βœ… Open configuration and verify note type selection
  • βœ… Check that field names match exactly (case-sensitive)
  • βœ… Ensure the card has content in those fields

Custom Prompt Input Disabled

  • βœ… Make sure you selected "Custom Prompt" from the dropdown
  • βœ… The input field only activates when Custom Prompt is selected
  • βœ… Try clicking the dropdown again to refresh

Configuration Not Saving

  • βœ… Click Save button after changes
  • βœ… Restart Anki
  • βœ… Check file permissions in add-on directory

πŸ“Š Debug Logging

For detailed troubleshooting:

  1. Go to Tools β†’ Gemini Chat Config
  2. Enable Log to Console and/or Log to File
  3. Reproduce the issue
  4. Check logs:
    • Console: Ctrl + Shift + (Windows/Linux) orCmd + Shift + (macOS)
    • Log File: Located in the add-on directory

🀝 Contributing

Contributions are welcome! Feel free to:

  • πŸ› Report bugs via GitHub Issues
  • πŸ’‘ Suggest new features
  • πŸ”§ Submit pull requests
  • πŸ“š Improve documentation

πŸ“„ License

This project is open source and available under the MIT License.


πŸ™ Acknowledgments

  • Built for Anki – the powerful spaced repetition system
  • Powered by Google Gemini API
  • Made with ❀️ for the Anki learning community

πŸ“ž Support

Happy Learning! πŸŽ“