omp packages

pi-experientiallabs0.3.0

Pi extension for the Experiential Labs inference provider

xyenon Published 9 days ago MIT ~1.2K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-experientiallabs

npm version

Use Experiential Labs models in Pi, with automatic model discovery, wallet balance display, and request diagnostics. The extension selects the protocol for each model automatically.

Install and configure

Requires Pi 1.1.0 or newer.

pi install npm:pi-experientiallabs

Create a key at API Keys, then open Pi and use /login → Experiential Labs. Alternatively, set EXPLABS_API_KEY or EXPERIENTIAL_API_KEY in your environment.

Use /model and search for explabs to select a chat model. Available models include public models that support text output and tools, plus your organization's custom and local models when they support those capabilities. Batch and image-generation models are not included.

[!IMPORTANT] Open Pi interactively to discover models or refresh their capabilities and prices. Previously discovered models remain available if a refresh fails.

For a different gateway, set EXPLABS_BASE_URL with or without /v1. The default is https://api.experientiallabs.ai/v1.

Balance and request details

While using an Experiential Labs model, the status line shows your remaining wallet balance and refreshes after each turn. This is your general balance; free-model daily and hourly token quotas are not displayed.

After a chat response, another status line shows the serving provider and the reported wallet charge. If you use your own upstream provider key (BYOK), its reported cost is shown separately. Pi's token-cost totals are estimates; actual charges can differ because of promotions, routing, or BYOK.

Use /explabs to inspect the latest successful response on the current session branch, including its request ID, provider, costs, reported data-retention status, and parameter adjustments. The command makes no inference request. Details remain available when you resume a session or navigate /tree.

For virtual or routed models, balance and diagnostics follow the most recent successful response from the actual serving model. Some responses do not report costs or have no saved diagnostics; missing costs are shown as unknown.

Decision classifiers

These models answer classification questions rather than chat messages:

Model ID Model
jev-latest Jev
clef Clef
clef-flash Clef Flash
gpt-6-luna-decisions GPT-6 Luna Decisions, with text and image input

Classifiers use the same Experiential Labs credential as chat models. They do not appear in /model; invoke them from an extension or Pi's Codemode tool. gpt-6-luna-decisions is separate from the gpt-6-luna chat model.

To enable Codemode, add this to ~/.pi/agent/settings.json or your project's .pi/settings.json:

{
  "defaultTools": ["+codemode"]
}

Then use a Codemode script such as:

const model = await models.getModelOfType("classifier", "explabs", "jev-latest");
if (!model) throw new Error("Open Pi interactively to refresh the model catalog");

const result = await models.classify(model, {
  state: { prompt: "The task to evaluate" },
  questions: {
    complexity: {
      type: "choice",
      instructions: "How demanding is this task?",
      criteria: { simple: "Routine work", complex: "Subtle or cross-cutting work" },
    },
  },
});
if (result.stopReason !== "stop") throw new Error(result.errorMessage ?? result.stopReason);
text(result.answers);

Replace jev-latest with another classifier ID to use it. Questions support choice, bool, and score. Luna Decisions also accepts an optional images array of { type: "image", data, mimeType } blocks.

Optional tags and tracing

Use tags to group chat spending, or tracing labels with the platform's configured Langfuse integration:

EXPLABS_TRACE=1 \
EXPLABS_TRACE_NAME=pi \
EXPLABS_TAGS='{"project":"my-project","purpose":"coding"}' \
pi
Environment variable Purpose
EXPLABS_TRACE=1 Include Pi's session identifier when available
EXPLABS_TRACE_NAME Set a trace label
EXPLABS_USER_ID Set an attribution identifier
EXPLABS_TAGS Set spending tags as a JSON object with string values; maximum 16 entries and 8 KiB

Session identifiers and attribution tags are not sent by default. Tracing requires an existing platform integration; the extension does not set one up.

License

MIT