Install
Install with PiG
pig install npm:pi-kitaniInstall with Pi
pi install npm:pi-kitaniPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./src/index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.
pi-kitani
Set up
With pi installed and ready to use, run:
pi install npm:pi-kitani
Get an API key in the Kitani dashboard, set the environment variable KITANI_API_KEY with your key, and you should be ready to go.
export KITANI_API_KEY='<Your API key here>'
You're ready. Run pi normally; the extension loads automatically:
pi
Use
Usage is mostly automatic. The extension will make your pi integrate seamlessly with Kitani AI, so you should be able to see their models when you /model, the list will be reloaded when you /reload, etc.
Here's what the extension will do:
- It registers
kitanias a model provider in pi - Fetches a fresh list of available models from Kitani AI when you open pi
- Refresh the list of models when you
/modelor/reload - API fetch: The callback fetches models from the Kitani AI
/v1/modelsendpoint
Configuration
The extension uses the Chat Completions API — Kitani's only supported API. The base URL can be overridden:
| Env var | Default | Description |
|---|---|---|
KITANI_API_BASE_URL | https://api.kitani.ai/v1 | API base URL |
KITANI_API_KEY | — | Your API key from the Kitani dashboard |
Or set it from your extension module:
import { createKitaniExtension } from "pi-kitani";
// Use a custom base URL
export default createKitaniExtension({ apiBaseUrl: "https://example.com/v1" });
Precedence: config param > environment variable > default.
💡 Troubleshoot
If something is not working properly, you're not seeing Kitani AI's models when you
/model, etc., the first place to check is your API key:echo $KITANI_API_KEYTest it against the API:
curl https://api.kitani.ai/v1/models -H "Authorization: Bearer $KITANI_API_KEY"Reload pi (while in pi, run
/reload). Check pi's console output for error messages, you'll most certainly find insights on what's wrong.If nothing works and you believe it's a bug in the extension itself, open an issue at https://github.com/joeljuca/pi-kitani/issues.
Contribute
See: CONTRIBUTING.md