kagi-fastgpt
Skill18 starsChanged 10 months agoMITView on GitHub
Ask questions and get AI-synthesized answers backed by live web search, via Kagi's FastGPT API. Returns a direct answer with cited references. Use when you need a quick, authoritative answer rather than raw search results.
- Reads credentials
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- kagi-enrichSkill
- kagi-searchSkill
- kagi-summarizerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Create an account at https://kagi.com/signup
- Distinctive: line 19
Add funds at: https://kagi.com/settings/billing_api
- Very specific: line 20
Add to your shell profile (~/.profile or ~/.zprofile):
- Distinctive: line 89
Use kagi-fastgpt: when you need a direct answer synthesized from web sources (e.g.
- Distinctive: line 90
Use kagi-search: when you need raw search results to scan, compare, or extract data from yourself
- Distinctive: line 91
Use web-browser: when you need to interact with a page or the content is behind JavaScript
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Kagi FastGPT
Get AI-generated answers with cited web sources using Kagi's FastGPT API. FastGPT runs a full web search under the hood and synthesizes results into a concise answer — ideal for factual questions, API lookups, and current-events queries.
This skill uses a Go binary for fast startup and no runtime dependencies. The binary can be downloaded pre-built or compiled from source.
Setup
Requires a Kagi account with API access enabled. Uses the same KAGI_API_KEY as the kagi-search skill.
- Create an account at https://kagi.com/signup
- Navigate to Settings → Advanced → API portal: https://kagi.com/settings/api
- Generate an API Token
- Add funds at: https://kagi.com/settings/billing_api
- Add to your shell profile (
~/.profileor~/.zprofile):export KAGI_API_KEY="your-api-key-here" - Install the binary — see Installation below
Pricing
1.5¢ per query ($15 USD per 1000 queries). Cached responses are free.
Usage
{baseDir}/kagi-fastgpt.sh "query" # Ask a question (default)
{baseDir}/kagi-fastgpt.sh "query" --json # JSON output
{baseDir}/kagi-fastgpt.sh "query" --no-refs # Answer only, no references
{baseDir}/kagi-fastgpt.sh "query" --no-cache # Bypass response cache
{baseDir}/kagi-fastgpt.sh "query" --show-balance # Show API balance for this call
{baseDir}/kagi-fastgpt.sh balance # Show last cached API balance
{baseDir}/kagi-fastgpt.sh "query" --timeout 60 # Custom timeout (default: 30s)Options
| Flag | Description |
--json | Emit JSON output (see below) |
--no-refs | Suppress references in text output |
--no-cache | Bypass cached responses (use for time-sensitive queries) |
--show-balance | Print API balance to stderr for this call |
--timeout <sec> | HTTP timeout in seconds (default: 30) |
Output
Default (text)
Prints the synthesized answer, followed by a numbered reference list:
Python 3.11 was released on October 24, 2022 and introduced several improvements...
--- References ---
[1] What's New In Python 3.11 — Python 3.11.3 documentation
https://docs.python.org/3/whatsnew/3.11.html
The headline changes in Python 3.11 include significant performance improvements...
[2] ...Token usage is printed to stderr. API balance is only shown when you pass --show-balance.
To check balance separately without cluttering every response:
{baseDir}/kagi-fastgpt.sh balance
{baseDir}/kagi-fastgpt.sh balance --jsonJSON (--json)
Returns a JSON object with:
query— the original queryoutput— the synthesized answertokens— tokens consumedreferences[]— array of{ title, url, snippet }objectsmeta— API metadata (id,node,ms)
When to Use
- Use kagi-fastgpt when you need a direct answer synthesized from web sources (e.g. "What version of X was released last month?", "How do I configure Y?")
- Use kagi-search when you need raw search results to scan, compare, or extract data from yourself
- Use web-browser when you need to interact with a page or the content is behind JavaScript
Installation
Option A — Download pre-built binary (no Go required)
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64|arm64) ARCH="arm64" ;;
esac
TAG=$(curl -fsSL "https://api.github.com/repos/joelazar/kagi-skills/releases/latest" | grep '"tag_name"' | cut -d'"' -f4)
BINARY="kagi-fastgpt_${TAG}_${OS}_${ARCH}"
mkdir -p {baseDir}/.bin
curl -fsSL "https://github.com/joelazar/kagi-skills/releases/download/${TAG}/${BINARY}" \
-o {baseDir}/.bin/kagi-fastgpt
chmod +x {baseDir}/.bin/kagi-fastgpt
# Verify checksum (recommended)
curl -fsSL "https://github.com/joelazar/kagi-skills/releases/download/${TAG}/checksums.txt" | \
grep "${BINARY}" | sha256sum --checkPre-built binaries are available for Linux and macOS (amd64 + arm64) and Windows (amd64).
Option B — Build from source (requires Go 1.26+)
cd {baseDir} && go build -o .bin/kagi-fastgpt .Alternatively, just run {baseDir}/kagi-fastgpt.sh directly — the wrapper auto-builds on first run if Go is available.
The binary has no external dependencies — only the Go standard library.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

