← Catalog

@pi-unipi/ask-user

Structured user input tool for Pi coding agent — single-select, multi-select, freeform

Extension

Install

Install with PiG

pig install npm:@pi-unipi/ask-user

Install with Pi

pi install npm:@pi-unipi/ask-user
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.

{
  "skills": [
    "./skills"
  ],
  "themes": [],
  "prompts": [],
  "extensions": [
    "./index.ts"
  ]
}

README

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

Ask User

Let the agent stop and ask you multiple-choice questions when it needs a decision.

@pi-unipi/ask-user · part of UniPi

What it does

  • Adds the ask_user tool. The tool is off by default.
  • Shows 1 to 4 questions in one dialog. Each question has 2 to 4 options.
  • Adds an "Other (type your own)" option, so you can type a free answer. You can paste or drop images and files into this answer.
  • Sends a question that you do not answer as "skipped". A skipped question does not stop the dialog.
  • Shows each answer in the transcript as a short tree.
  • Can send a notification while it waits for you, through Notify.
── Planet ✓ · Foods 2 · Last book ─────────────────────────────────────
  What was the last book you read?
    Can't remember
    Don't read books
  ❭ Other (type your own)
    └ Dune, cover: [Image #1]
───────────────────────────────────────────────────────────────────────
↑↓ navigate · ↵ select · ctrl+v image · ←→ switch question · esc cancel
? Not ready to answer, help me out!

Quick start

UniPi installs this package:

pi install npm:@pi-unipi/unipi

To install this package alone:

pi install npm:@pi-unipi/ask-user

To turn on the tool:

  1. Open /unipi:settings.
  2. Select the Ask User group.
  3. Set Enable ask_user to on.

When the tool is off, it tells the agent to ask in its reply.

Answer the questions

KeyWhat it does
↑ / ↓Moves between options.
1–9Selects that option. In a multi-select question, it toggles the option.
SpaceToggles an option in a multi-select question.
EnterSelects and goes to the next question. On the last question, it sends all answers.
← / →, Tab, Shift+TabGoes to another question. In an "Other" field with text, ← and → move the cursor.
Ctrl+VPastes an image from the clipboard into the "Other" field.
?Tells the agent that you are not ready to answer and want to talk first.
EscStops the agent turn. A setting can make Esc send your answers.

In the "Other" field, you type text directly. The option numbers disappear, so digits go into the text. A pasted image becomes [Image #N], and a file path becomes [File #N]. The tool sends images to the model with your answers.

Agent tools

ToolWhat it does
ask_userAsks 1 to 4 questions in one dialog and waits for the answers.
ask_user({
  questions: [{
    header: "Database",                       // 16 characters or fewer
    question: "Which database should the service use?",
    options: [                                // 2–4 options
      { label: "Postgres", description: "JSON columns, full-text search" },
      { label: "SQLite", description: "No setup, single writer" },
    ],
    multi_select: false,                      // optional
    other: true,                              // optional, false removes "Other"
  }],
})

The result starts with User answered your questions:. A JSON object follows, with one key for each question: { "selected": [...], "custom_text": "...", "skipped": false }. Images follow as image content.

Other facts:

  • An option can have action: "end_turn". This option ends the turn.
  • An option can have action: "new_session" and a prefill message. You then select Compact & run or Run directly. Workflow skills use this to start the next step.
  • The tool runs one dialog at a time. Thus several calls in one message cannot hide each other.
  • The tool also accepts the older single-question form: question, context, options, allowMultiple, allowFreeform. It ignores timeout.
  • In a subagent, the tool fails. The error tells the subagent to give the question to its lead.
  • With no interactive UI, the tool tells the agent to ask in its reply.

Settings

Open /unipi:settings → Ask User. A change applies to the next question.

KeyDefaultWhat it does
enabledfalseGives the agent the ask_user tool.
notifyOnAsktrueSends a notification while the agent waits.
maxQuestions4Maximum questions in one dialog (1–4). The tool description changes in new sessions.
escapestopstop ends the agent turn. send sends your answers and skips the rest.
digitAdvancetrueIn a single-choice question, a number key also goes to the next question.
otheragentagent lets the agent decide. always and never override the agent.
helpLinetrueShows the "Not ready to answer" line. The ? key works in all cases.

See also