hermes-kagi-plugin
Kagi web search, content extraction, and enriched search for Hermes Agent.
Catalog name: web-kagi-enriched (install with hermes plugins install web-kagi-enriched).
What it does
Replaces the default web_search and web_extract backends with Kagi — the search engine that actually respects its users. Plus a bonus kagi_enriched_search tool that exposes Kagi's full enrichment data (infoboxes, adjacent questions, interesting finds, related searches, etc.).
- Search:
web_searchroutes through Kagi's v1 search API - Extract: URL content extraction via Kagi's v1 extract API (reads full page content as markdown)
- Enriched Search:
kagi_enriched_searchreturns the full Kagi response with all special categories - No crawl support — Kagi doesn't expose a crawl endpoint
Why not the official Kagi MCP server?
The kagimcp server targets Kagi's v0 API, which requires a separate API key scope. This plugin targets the v1 API — the same key you already use for /api/v1/extract.
Prerequisites
- Hermes Agent 0.18.0 or newer (the manifest declares
requires_hermes: ">=0.18.0") - A Kagi API key with v1 access
httpx(already pulled in by Hermes — this plugin declares no dependencies of its own)
Hermes needs the plugin at load time. An older Hermes skips the plugin when the
manifest's floor does not match.
Installation
Option 1: From the Hermes plugin catalog (recommended)
hermes plugins install web-kagi-enriched
Option 2: Drop-in from git
cd ~/.hermes/plugins
git clone https://github.com/fastfinge/hermes-kagi-plugin.git web-kagi-enriched
Then enable it:
# ~/.hermes/config.yaml
plugins:
enabled:
- web-kagi-enriched
web:
backend: "kagi"
Option 3: As a copied plugin directory
Copy the files to ~/.hermes/plugins/web-kagi-enriched/:
web-kagi-enriched/
├── plugin.yaml # manifest
├── __init__.py # registers the provider + enriched search tool
├── provider.py # Kagi v1 API implementation (search + extract)
└── tools.py # kagi_enriched_search tool
Set your API key:
# ~/.hermes/.env
KAGI_API_KEY=your-key-here
Reload Hermes.
Configuration
web:
# Use Kagi for both search and extract
backend: "kagi"
# Or split them:
search_backend: "kagi"
extract_backend: "kagi"
The provider registers itself as web provider kagi. The existing catalog
entry web-kagi (a different implementation) registers the same provider name,
so install one or the other — with both installed, web.search_backend: kagi
is ambiguous and whichever plugin loads last wins.
Tools
kagi_enriched_search
A dedicated tool that surfaces all the enrichment data Kagi returns — stuff the standard Hermes web_search contract strips out.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | (required) | Search query |
workflow | string | "search" | Type of results: search, images, videos, news, podcasts |
limit | integer | 10 | Max results (1–100) |
include_enrichment | boolean | true | Include infoboxes, adjacent questions, interesting finds, related searches, direct answers |
Response structure:
{
"success": true,
"query": "best programming language 2025",
"workflow": "search",
"web_results": [...],
"images": [...],
"videos": [...],
"news": [...],
"infobox": [...],
"adjacent_questions": [...],
"direct_answers": [...],
"related_searches": [...],
"interesting_finds": [...],
"interesting_news": [...],
"listicles": [...],
"code_results": [...],
"package_tracking": [...],
"weather": [...],
"web_archive": [...]
}
Only categories that actually have results are included. Empty categories are omitted.
Environment
| Variable | Required | Description |
|---|---|---|
KAGI_API_KEY | Yes | Your Kagi v1 API key |
Both the provider and the tool resolve the key through
agent.web_search_provider.get_provider_env, which honours the active profile
under a multiplexing gateway — a profile without a Kagi key is refused, not
served another profile's. The plugin never reads .env files or any other
credential store directly.
Privacy and disclosures
- Network: every
web_search,web_extractandkagi_enriched_searchcall
sends the query (or the URLs passed toweb_extract) tohttps://kagi.com/api/v1
with yourKAGI_API_KEYas a bearer token, and Kagi bills the call to your
account. Nothing else leaves the machine. - Credentials:
KAGI_API_KEYonly, resolved through Hermes' profile-scoped
route (see Environment above). It is never logged, written or refreshed. - Not present: no files written, no shell commands, no background processes,
no telemetry, no self-updater, no reads outside the plugin's own files, no extra
tools or hooks beyond the two declared inplugin.yaml. - Not affiliated with Kagi.
Files
| File | Purpose |
|---|---|
provider.py | KagiWebSearchProvider — search + extract implementation |
tools.py | kagi_enriched_search tool with full enrichment data |
__init__.py | Plugin entry point — registers provider + tool |
plugin.yaml | Hermes plugin manifest (kind: backend) |
CHANGELOG.md | Version history |
API coverage
| Endpoint | Hermes mapping | Status |
|---|---|---|
POST /api/v1/search | web_search | ✅ Working |
POST /api/v1/search | kagi_enriched_search | ✅ Working |
POST /api/v1/extract | web_extract | ✅ Working |
POST /api/v0/summarize | — | ❌ Not implemented (requires separate v0 key) |
Known issues
- Kagi's v1 search occasionally returns no results for broad queries; the plugin falls back through news → video → podcast → interesting finds → code categories when that happens.
- Summarization is not supported because Kagi's Summarizer API is v0-only and requires a separate API key scope.
provider.pyimports the privatetools.interrupt.is_interruptedflag to bail
out of a long extract. Hermes' bundled web providers do the same; there is no
public plugin seam for it yet.
Credits
Written by Samuel Proulx, with help from Nous.
License
MIT — do whatever you want, just don't blame us if your API bill explodes.
README from the reviewed commit 0683974; it updates when the author re-pins.

fastfinge