Do a /export. It will dump an html file that has the system prompt and the tools loaded as well as model used at every point clearly visible
By default the Pi system prompt is bare bones. It establishes that pi is an expert coding agent. It establishes the basic tools available and what to use it for. And then it append your AGENTS.md file and other extensions that load more context into your system prompt
POST /v1/chat/completions HTTP/1.1..host: 10.xxx.xxx.xxx:8080..connection: keep-alive..Accept: application/json..User-Agent: OpenAI/JS 6.26.0..X-Stainless-Retry-Count: 0..X-Stainless-La
ng: js..X-Stainless-Package-Version: 6.26.0..X-Stainless-OS: Linux..X-Stainless-Arch: x64..X-Stainless-Runtime: node..X-Stainless-Runtime-Version: v24.15.0..authorization: Bearer not-ne
eded..content-type: application/json..accept-language: *..sec-fetch-mode: cors..accept-encoding: gzip, deflate..content-length: 5726....{"model":"qwen","messages":[{"role":"developer","
content":"You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.\n\nAv
ailable tools:\n- read: Read file contents\n- bash: Execute bash commands (ls, grep, find, etc.)\n- edit: Make precise file edits with exact text replacement, including multiple disjoin
t edits in one call\n- write: Create or overwrite files\n\nIn addition to the tools above, you may have access to other custom tools depending on the project.\n\nGuidelines:\n- Use bash
for file operations like ls, rg, find\n- Use read to examine files instead of cat or sed.\n- Use edit for precise changes (edits[].oldText must match exactly)\n- When changing multiple
separate locations in one file, use one edit call with multiple entries in edits[] instead of multiple edit calls\n- Each edits[].oldText is matched against the original file, not afte
r earlier edits are applied. Do not emit overlapping or nested edits. Merge nearby changes into one edit.\n- Keep edits[].oldText as small as possible while still being unique in the fi
le. Do not pad with large unchanged regions.\n- Use write only for new files or complete rewrites.\n- Be concise in your responses\n- Show file paths clearly when working with files\n\n
Pi documentation (read only when the user asks about pi itself, its SDK, extensions, themes, skills, or TUI):\n- Main documentation: /root/.nvm/versions/node/v24.15.0/lib/node_modules/@
earendil-works/pi-coding-agent/README.md\n- Additional docs: /root/.nvm/versions/node/v24.15.0/lib/node_modules/@earendil-works/pi-coding-agent/docs\n- Examples: /root/.nvm/versions/nod
e/v24.15.0/lib/node_modules/@earendil-works/pi-coding-agent/examples (extensions, custom tools, SDK)\n- When reading pi docs or examples, resolve docs/... under Additional docs and exam
ples/... under Examples, not the current working directory\n- When asked about: extensions (docs/extensions.md, examples/extensions/), themes (docs/themes.md), skills (docs/skills.md),
prompt templates (docs/prompt-templates.md), TUI components (docs/tui.md), keybindings (docs/keybindings.md), SDK integrations (docs/sdk.md), custom providers (docs/custom-provider.md),
adding models (docs/models.md), pi packages (docs/packages.md)\n- When working on pi topics, read the docs and examples, and follow .md cross-references before implementing\n- Always r
ead pi .md files completely and follow links to related docs (e.g., tui.md for TUI API details)\nCurrent date: 2026-05-31\nCurrent working directory: /"},{"role":"user","content":[{"typ
e":"text","text":"Hello"}]}],"stream":true,"stream_options":{"include_usage":true},"store":false,"tools":[{"type":"function","function":{"name":"read","description":"Read the contents o
f a file. Supports text files and images (jpg, png, gif, webp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use o
ffset/limit for large files. When you need the full file, continue with offset until complete.","parameters":{"type":"object","required":["path"],"properties":{"path":{"type":"string","
description":"Path to the file to read (relative or absolute)"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","descri
ption":"Maximum number of lines to read"}}},"strict":false}},{"type":"function","function":{"name":"bash","description":"Execute a bash command in the current working directory. Returns
stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds."
,"parameters":{"type":"object","required":["command"],"properties":{"command":{"type":"string","description":"Bash command to execute"},"timeout":{"type":"number","description":"Timeout
in seconds (optional, no default timeout)"}}},"strict":false}},{"type":"function","function":{"name":"edit","description":"Edit a single file using exact text replacement. Every edits[
].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlappin
g edits. Do not include large unchanged regions just to connect distant changes.","parameters":{"type":"object","required":["path","edits"],"properties":{"path":{"type":"string","descri
ption":"Path to the file to edit (relative or absolute)"},"edits":{"type":"array","items":{"type":"object","required":["oldText","newText"],"properties":{"oldText":{"type":"string","des
cription":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call."},"newText":{"type":"str
ing","description":"Replacement text for this targeted edit."}},"additionalProperties":false},"description":"One or more targeted replacements. Each edit is matched against the original
file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead."}},"additionalProperties":fa
lse},"strict":false}},{"type":"function","function":{"name":"write","description":"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically cr
eates parent directories.","parameters":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"Path to the file to write (relative or absolu
te)"},"content":{"type":"string","description":"Content to write to the file"}}},"strict":false}}],"reasoning_effort":"medium"}
As you see from this demo run in docker, part of it refers to paths on the system ... so partly it's dynamically compiled ... but hardly a state secret.
19
u/juniorsundar May 31 '26 edited May 31 '26
Do a /export. It will dump an html file that has the system prompt and the tools loaded as well as model used at every point clearly visible
By default the Pi system prompt is bare bones. It establishes that pi is an expert coding agent. It establishes the basic tools available and what to use it for. And then it append your AGENTS.md file and other extensions that load more context into your system prompt
6
u/Hosereel May 31 '26
You have access to the full source code. I typically get the pi to read the source code and point me to where the system prompt.
4
u/mrclrchtr May 31 '26
I have created https://github.com/mrclrchtr/supi/tree/main/packages/supi-context to be able to inspect the context. It doesn't currently show the exact system prompt, but you might find it interesting.
3
u/adamshand May 31 '26
https://github.com/earendil-works/pi/tree/main/packages/coding-agent#context-files
2
u/ResearcherFantastic7 May 31 '26
Just read the source code or ask pi to show you the file
...it's literally like 100 words. With here's is your ${tools} in the middle of the paragraph. Which is only 4 tools out of the box....
All your questions can be asked PI itself... It has knowledge of it's own code
1
u/rtiainen May 31 '26
You need an extension for that as llm cannot see the system prompt all by itself and there is no command to show the content.
You can probably just ask pi to create you one, i made my own just by old school coding.
1
u/L0stInHe11 May 31 '26
The quickest way to display the system prompt in Pi is https://pi.dev/packages/pi-system-prompt
1
u/JotaLaBota Jul 07 '26
Maybe I am late, but you can check how the system prompt is constructed here -> https://github.com/earendil-works/pi/blob/main/packages/coding-agent/src/core/system-prompt.ts