Extension

rgasper/zot-kagi-extension

extension for kagi api usage in zot

extension

Install from GitHub and zot copies the extension into $ZOT_HOME/extensions/. Git-installed extensions update with zot update.

shell
zot ext install https://github.com/rgasper/zot-kagi-extension
repository
rgasper/zot-kagi-extension
author
rgasper
stars
1
forks
0
open issues
0
language
Python
license
MIT
topics
zot-extension
created
Jun 7, 2026
updated
Jun 10, 2026

Security note: zot extensions can execute code. Review the source before installing third-party extensions.

Readme

zot-kagi-extension

A zot extension that gives the AI agent two LLM-callable tools backed by the Kagi API:

Tool What it does
kagi_search Web search — returns ranked results with titles, URLs, and snippets
kagi_extract Content extraction — fetches full markdown content from up to 10 URLs

Prerequisites

  • Python 3.10+
  • uv — used to run the extension (manages its own virtualenv automatically)
  • A Kagi API key — get one at https://kagi.com/api
  • zot installed and on $PATH

Installation

1. Set your API key

Add this to your shell profile (~/.zshrc, ~/.bashrc, etc.):

export KAGI_API_KEY=your_api_key_here

2. Install the extension

zot ext install https://github.com/rgasper/zot-kagi-extension

This clones the repo into $ZOT_HOME/extensions/ so zot update can keep it current alongside your other extensions.

For a single zot session (no install, great for development):

zot --ext /path/to/zot-kagi-extension

Tools

kagi_search

Search the web and get back ranked results.

Parameter Type Required Description
query string The search query
limit integer Max results (default 10, max 20)

kagi_extract

Extract full markdown content from one or more URLs.

Parameter Type Required Description
urls string[] List of HTTPS URLs to extract (max 10)

Logs

zot ext logs kagi        # print the extension's stderr log
zot ext logs kagi -f     # tail it live

Development

Edit main.py, then reload without restarting zot:

/reload-ext