@pithos-kit/answer
Interactive Q&A extraction and answer submission for Pi assistant responses.
Package details
Install @pithos-kit/answer from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@pithos-kit/answer- Package
@pithos-kit/answer- Version
0.3.0- Published
- Sep 3, 2026
- Downloads
- 315/mo · 41/wk
- Author
- anton-kochev
- License
- MIT
- Types
- extension
- Size
- 32 KB
- Dependencies
- 0 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
answer
Interactive Q&A extraction for pi assistant responses.
answer adds an /answer command that turns questions from the last assistant response into an interactive answer form, then submits the compiled answers back to the agent.
It demonstrates the prompt-generator pattern with custom TUI:
/answergets the last assistant message.- A spinner is shown while questions are extracted as structured JSON.
- A custom TUI lets you navigate questions and write answers.
- When done, the compiled answers are submitted as a new user message.
Install
pi install npm:@pithos-kit/answer
Inside a pithos container this extension may be preinstalled — /answer then works with no install step.
Pithos .pithos config
pi:
extensions:
"@pithos-kit/answer": "npm:0.3.0"
For local development from this repository:
pi install ./pithos.answer
pi install ./pithos.answer -l # project-local
Temporary test run:
pi -e ./pithos.answer
Usage
After an assistant response that contains questions, run:
/answer
/answer --help
Use --help or -h to show usage without extracting questions or calling a model.
Keys in the TUI:
Tab: go to next questionShift+Tab: go to previous questionUp/Down: focus and navigate options when a question has themSpace/Enter: select the focused option (singleormultiple, depending on the question)- Long free-text answers wrap across multiple lines
Shift+Enter/Alt+Enter: insert a newline in the free-text answerLeft/Right: move within the free-text answerEnter: save and go next when options are not focused; on the last question, submit if completeCtrl+S: submit when all questions are answered or have selected optionsEsc: cancel
Notes
This package imports pi runtime packages as peer dependencies:
@earendil-works/pi-ai@earendil-works/pi-coding-agent@earendil-works/pi-tuitypebox
Do not bundle those dependencies; pi provides them at runtime.