Work with prompt.md and Pi¶
This guide shows you how to work with prompt.md files and the Pi coding agent. You describe a task in a prompt.md file, execute it with the Pi harness and track every run in the prompt-log.
Required tools¶
Make sure these tools are installed:
task- the Taskfile command line tool.pi- the coding agent harness.uv- the Python package manager.fzf- the fuzzy finder, used to select models.- Jupyter Lab - install it with
task install-jupyter-lab.
Optionally sops and age when the prompt works with encrypted secrets. See Encrypt files with SOPS and age.
Check the Pi connection¶
Verify that pi can reach the inference provider:
It should respond using the default model, for example infomaniak/moonshotai/Kimi-K2.6.
Initialize the example project¶
Create a new project and initialize it with the Taskfile:
This creates tmp/, .gitignore, task, .env.template, AGENTS.md, CHANGELOG.md, README.md and LICENSE.
Optional: open the task file and remove all help sections (marked with ===) and commands except for the Jupyter, LLM and Prompt sections.
Init Jupyter Lab¶
Create the prompt¶
Still in the project folder, create a prompt file:
File created:
Replace the @Developer section with this instruction:
Your goal is to create a Jupyter notebook `aggregate-data.ipynb` in this project.
The notebook is self-contained and must not require any external system. Use only `pandas`.
- Generate a sample dataset with 500 rows containing the columns `date`, `category` and `amount`.
- Print the number of rows and the sum of `amount` grouped by `category`.
- Write the grouped result to `summary.csv` in the project folder.
Save the file and execute the prompt with Pi:
Test the result¶
Once pi has finished and asks for review, start Jupyter Lab in a new terminal:
Open the notebook, run it and confirm that summary.csv was created. If everything works tell pi "done". Exit with ctrl + d.
Show the frontmatter of the prompt:
Commit the results¶
Commit the changes in the project:
Confirm the preview with q.
Then initialize the prompt-log and commit the prompt:
List the prompt-log entries: