docs(coding-agent): document AI_AGENT process marker

closes #7747
This commit is contained in:
Vegard Stikbakke
2026-08-11 09:04:09 +02:00
parent cf5f35216b
commit 9cb7f493e7
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -9,6 +9,7 @@
### Changed
- Replaced the inherited Mistral SDK transport with a native Chat Completions HTTP stream, eliminating its generated client and schema runtime overhead.
- Documented the generic `AI_AGENT=pi` process marker and how it differs from `PI_CODING_AGENT=true` ([#7747](https://github.com/earendil-works/pi/issues/7747)).
## [0.84.1] - 2026-08-07
@@ -3,14 +3,19 @@
Pi uses environment variables in three ways:
- Variables such as `PI_OFFLINE` configure the Pi process.
- Pi sets `PI_CODING_AGENT` so child processes can detect that they run inside Pi.
- Pi sets process markers so child processes can identify Pi as the launching agent.
- Commands run by the LLM-callable bash tool receive `PI_*` variables describing the current session.
Provider API-key variables are documented separately in [Providers](providers.md#environment-variables-or-auth-file).
## Process Marker
The CLI and RPC entry points set `PI_CODING_AGENT=true`. Child processes inherit it and can use it to detect that they run inside Pi. It is not session-specific and is not set automatically when Pi is embedded through the SDK.
The CLI and RPC entry points set two process markers:
- `AI_AGENT=pi` is a generic marker that lets tooling identify Pi as the agent that launched the process.
- `PI_CODING_AGENT=true` is Pi-specific and lets child processes detect that they run inside Pi.
Child processes inherit both markers. They are not session-specific and are not set automatically when Pi is embedded through the SDK.
## Bash Tool Session Environment