← Catalog

@adaptiqai/pi

AdaptiqAI for Pi: your workspace's models, conversations AdaptiqAI remembers, and your saved knowledge, in one Pi package.

Package

Install

Install with PiG

pig install npm:@adaptiqai/pi

Install with Pi

pi install npm:@adaptiqai/pi
Review before installing

Packages 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": [
    "./lib/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.13 (README.md). PiG does not review it.

AdaptiqAI for Pi

Your AdaptiqAI workspace in Pi: its models, conversations that AdaptiqAI remembers, and your saved knowledge, in one Pi package.

Install

pi install npm:@adaptiqai/pi

Then sign in: run /login adaptiqai (or /adaptiq signin) in Pi. Your browser opens; you sign in (or create an account) and approve, and Pi picks it up by itself. Without a browser, give a key from the AdaptiqAI console instead, either as ADAPTIQAI_API_KEY or as Pi's own key for the adaptiqai provider in ~/.pi/agent/auth.json. When you have both, a key AdaptiqAI refuses gives way to the other.

Choose a model from the AdaptiqAI provider (/model, or pi --provider adaptiqai --model <id>). The list is the models in your workspace, each with its own context window, output limit, thinking levels, sampling and prices.

What it does

  • A conversation is one AdaptiqAI session. Every turn carries Pi's session id as x-adaptiq-session-id, so AdaptiqAI keeps the conversation's memory, and the collections and conversations you attach to it reach the model.
  • Nothing is compacted. AdaptiqAI keeps the whole conversation, so on an AdaptiqAI model Pi's compaction (/compact, or automatic) is declined, with one line a conversation saying why. Branch summaries run once, marked ephemeral, and never become a conversation. On Pi 1.4 and later the cache-warming replays are switched off.
  • Each model as its card describes it. Pi's thinking levels map onto the model's own, and go in the field the model reads them from. A new conversation starts at the level the card names, unless you chose one (--thinking, defaultThinkingLevel or modelThinkingLevels in Pi's settings, or in Pi itself). The card's sampling goes with every request.
  • Pi's cost display is right. Prices come from your workspace; what a turn reads from the conversation's memory counts as a cache read, what it saves as a cache write.
  • AdaptiqAI's answers, in plain words. While memory is being prepared or you wait in line, the line beside Pi's spinner says so. A busy model is asked again as long as AdaptiqAI says to wait (up to eight times). An empty balance says so with the link to add funds; a full memory says what to free up, never to start over. When idle conversations go to sleep to make room, or memory gets full, Pi tells you.
  • Switching models. Choose another model in a conversation whose memory is on an AdaptiqAI model, and Pi tells you how to switch back (/model adaptiqai/<id>) or start fresh (/new).
  • A Pi that works for another Pi (one an extension or the agent starts to run with -p, --mode json or RPC) names the first as its parent. A one-off run, or one that keeps nothing (--no-session), is folded under that conversation in the console. A conversation Pi keeps and the parent comes back to (in RPC, or started with --session, --session-id, --continue, --resume or --fork) is a line of work of its own: it is listed on its own, linked to that conversation. A Pi you open yourself from Pi's terminal is a conversation of its own.
  • Tools for the agent: adaptiq_knowledge (what this conversation uses; find words, ids or names in the text of its collections, with the exact lines as document:line; search the library by name, use or stop a collection), adaptiq_memory (how full the memory is; the saved collections; keep a conversation private) and adaptiq_create_knowledge (save material as a collection, only when you ask).
  • A turn that offers the knowledge tool is told which ready collections its conversation reads, once and again when they change, in a message Pi keeps hidden in the session, so the agent looks things up there with find.
  • Updates. When a newer version is on npm, Pi tells you. /adaptiq update installs it through Pi (pi update npm:@adaptiqai/pi) and loads it in place, after one yes. A version pinned in Pi's settings stays; Pi says the command that installs the new one. Where Pi installs packages with pnpm or bun, a new release is offered once it is a day old, as they wait that long.

In Pi's terminal

The screens of the DeepSeek Harness plugin, as Pi draws them:

  • Pi's footer shows this conversation's memory against the model's window, and after a turn what it read from memory and what it cost: AdaptiqAI · Memory 25k / 5M · 24k from memory · free · last turn $0.0006 · alt+m menu.
  • alt+m (or /adaptiq memory) opens the memory menu: what the model sees, saving (Remember or Private), what this conversation uses, and what its requests processed. On macOS the terminal's Option key must send Meta, as for Pi's own alt keys.
  • /adaptiq opens the settings panel: the account, the models with their queues, memory, Save new conversations, and links.
  • /adaptiq knowledge lists every collection and earlier conversation on the model: space uses one here or stops it. A collection built for another model can be made available here, and a new collection is made from files you drop into the terminal.
  • A failure asks what to do: Add funds, Sign in, Free up space or Continue privately, in a dialog.
  • @ lists earlier conversations above Pi's files. One you pick is read in this conversation from memory once you send the message.

Outside Pi's terminal (RPC, print and JSON mode) the same comes as words.

/adaptiq

The same command as in every AdaptiqAI plugin, with Pi's own memory and update.

CommandDoes
/adaptiqthe settings panel; outside Pi's terminal, workspace, models and memory
/adaptiq statusworkspace, models and memory, in words
/adaptiq memorythis conversation's memory: saving, knowledge in use, processed (alt+m)
/adaptiq signinconnect your AdaptiqAI account in the browser
/adaptiq privatestop saving new messages of this conversation
/adaptiq remembersave this conversation to memory again
/adaptiq knowledgeknowledge used in this conversation, and what else you can use
/adaptiq use <name>use a collection or an earlier conversation here
/adaptiq stop <name>stop using it here (nothing is deleted)
/adaptiq openopen this conversation in AdaptiqAI Knowledge
/adaptiq updateinstall the new version of AdaptiqAI for Pi and load it
/adaptiq diagnosticsa report you can send to support (no secrets)
/adaptiq signoutforget the connection on this computer

/adaptiq signout signs Pi out too, as /logout does; an API key you gave stays. Signing out with Pi's /logout signs the plugin out the next time Pi starts.

Configuration

VariableDefault
ADAPTIQAI_API_KEYnone: the browser sign-in
ADAPTIQAI_API_BASEhttps://api.adaptiqai.com
ADAPTIQAI_CONSOLE_URLhttps://memory.adaptiqai.com/memory

The sign-in, the plugin's state and the last model list are kept in ~/.pi/agent/adaptiqai/ (or under PI_CODING_AGENT_DIR), readable by you alone. Pi's own copy of the sign-in is in its auth.json, which the plugin changes only under Pi's lock.

Development

pnpm install
pnpm --filter @adaptiqai/pi run build
pnpm --filter @adaptiqai/pi run test
pi install ./packages/pi    # try it in your own Pi