Gemini Chat for Anki

AnkiWeb addon 1725302966

Adds an embedded Gemini-powered chat window to the Anki reviewer, offering context-aware grammar explanations, translations, examples, and custom per-deck prompt responses about cards.
AI-generated summary; may contain mistakes.

aiservice-client

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
3 (πŸ‘ 2 Β· πŸ‘Ž 1)
Updated
2025-11-20
Anki versions
25.09.2~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

stale

  • Last update or commit: 2025-11-20 (346 days before the snapshot).
  • Commits in the last year: 26.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

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 button and dockable sidebar that uses Gemini AI to generate flashcard explanations, mnemonics, related concepts, and follow-up chat, with streaming responses and customizable prompts.

aireview-flowshortcutsaccessibility

6 votes 61% approval πŸ‘ 6 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2026-02-12
AttendingAI

Grades written Anki answers using an LLM, retrieves supporting material via semantic RAG, offers tutor explanations, analytics, batch assessment, and optional interval suggestions.

aischedulingreview-flowstatisticsquiz

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 1 Anki 25.02.6~ Updated 2026-01-10
Anki Semantic Search

Enables semantic and keyword search across selected Anki notes, generating cited AI answers through local or cloud providers.

aisearch

3 votes 44% approval πŸ‘ 3 Β· πŸ‘Ž 0 ⭐ 3 Anki 25.09.2~ Updated 2026-06-15
Card Assistant β€” LLM Chat Panel (OpenRouter, Ollama & Gemini)

Provides a dockable side-panel chat assistant for asking LLM questions about the current flashcard while reviewing, supporting OpenRouter, local Ollama, and Google Gemini with streaming, context-aware responses.

ai

2 votes 34% approval πŸ‘ 2 Β· πŸ‘Ž 0 ⭐ 1 Anki 2.1.66~ Updated 2026-02-27

Description

Gemini Chat for 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: 1698042138
  4. Click OK and 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

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! πŸŽ“