@audsiui/pi-keenable

Web search and page fetch tools for pi, powered by the Keenable API

Packages

Package details

extensionskill

Install @audsiui/pi-keenable from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@audsiui/pi-keenable
Package
@audsiui/pi-keenable
Version
0.1.1
Published
Aug 26, 2026
Downloads
308/mo · 26/wk
Author
audsiui
License
MIT
Types
extension, skill
Size
24.8 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ],
  "skills": [
    "./skills"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-keenable

Web search and page fetch tools for pi, powered by the Keenable API.

Registers two tools the model can call, plus a skill documenting the search workflow:

  • keenable_search — search the web, returns ranked results with title, URL, description, snippet and dates
  • keenable_fetch — fetch a page as markdown (title, description, author, content; refuses private/internal hosts)
  • keenable-web-search skill — workflow guidance loaded into the model context

Both tools appear in the system prompt's Available tools section, with usage guidelines injected into Guidelines while active.

Install

pi install npm:@audsiui/pi-keenable

Or project-local: pi install -l npm:@audsiui/pi-keenable

API key

Keenable offers keyless public endpoints (rate limited per IP, consume no credits) and keyed endpoints (no IP rate limit, require an API key from keenable.ai).

Login stores the key in ~/.pi/agent/keenable.json:

/keenable login          # prompts for the key
/keenable login keen_xxx # or pass it inline
/keenable logout         # removes the stored key

Auth resolution order: stored key → KEENABLE_API_KEY environment variable → keyless public endpoints.

Base URL (for proxies/gateways):

/keenable base-url           # show the effective base URL
/keenable base-url https://proxy.example.com   # store one (https enforced)
/keenable base-url clear     # remove the stored override

Base URL resolution order: KEENABLE_API_URL environment variable wins, then the stored value, then https://api.keenable.ai (plain http only for localhost).

Usage

The model decides when to use the tools (e.g. "搜索一下最近 Rust 的稳定版本" or "用 keenable_fetch 读一下 https://example.com 的内容"). Recommended workflow: search → keenable_fetch promising results → cite the opened page, never a snippet alone.

Tool features:

  • keenable_search: query (natural-language description), mode (pro), site (one domain), max_results (1–50), snippet_max_length (180–10000), query_time, published_after/published_before and acquired_after/acquired_before (YYYY-MM-DD, ISO timestamp, or relative deltas like 7d, 6mo, 1y)
  • keenable_fetch: url, max_chars (default 50000), live (fetch from source instead of Keenable's index), prompt (LLM extraction instruction, up to 2000 chars — content contains only the answer)

Development

# try it without installing
pi -e ./extensions/keenable.ts

# install from local path
pi install /path/to/pi-keenable

License

MIT