Skip to content

Repository files navigation

@joeljuca/pi-explabs

npm version License GitHub Codeberg Author

Experiential Labs provider extension for the pi coding agent, featuring dynamic model discovery — models are fetched from the Experiential Labs API whenever pi refreshes the model list.

Features

  • 🔍 Dynamic model discovery — models are fetched live from the Experiential Labs API
  • 🔄 Auto-refresh — model list updates when you open /model in pi
  • 🛠️ Zero configuration — just set your API key and go
  • 🔌 Multiple API formats — supports Chat Completions, Responses, and Anthropic Messages APIs

Set up

First, you'll obviously need pi installed in your system. Instructions at pi.dev.

Then, installing the extension is trivial:

pi install npm:@joeljuca/pi-explabs

You'll need an API key to authenticate. Get one at experientiallabs.ai.

Set an environment variable EXPLABS_API_KEY with your API key, somehow. I use and recommend direnv, but any method will do.

EXPLABS_API_KEY='<Your API key here>'

You're ready. Run pi normally, the extension should be automatically:

pi

Use

Usage is mostly automatic. The extension will make your pi integrate seamlessly with Experiential Labs, 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 extenstion will do:

  1. It registers explabs as a model provider in pi
  2. Fetches a fresh list of available models from Experiential Labs when you open pi
  3. Refresh the list of models when you /model or /reload
  4. API fetch: The callback fetches models from the Experiential Labs /v1/models endpoint

💡 Troubleshoot

If something is not working properly, you're not seeing Experiential Labs' models when you /model, etc., the first place to check is your API key:

echo $EXPLABS_API_KEY

Test it against the API:

curl https://api.experientiallabs.ai/v1/models -H "Authorization: Bearer $EXPLABS_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-explabs/issues.

Contribute

See: CONTRIBUTING.md

License

Apache-2.0 © Joel Jucá

About

Pi extension for Experiential Labs

Topics

Resources

Contributing

Stars

17 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages