Extensions for the pi coding agent
  • TypeScript 100%
Find a file
2026-07-20 12:40:53 +02:00
extensions init: add all extensions to repository 2026-06-23 11:54:26 +02:00
.gitignore init: add all extensions to repository 2026-06-23 11:54:26 +02:00
package.json init: add all extensions to repository 2026-06-23 11:54:26 +02:00
README.md fix: README.md 2026-07-20 12:40:53 +02:00
tsconfig.json init: add all extensions to repository 2026-06-23 11:54:26 +02:00

pi-agent-extensions

Extensions for the pi coding agent.

Install

Install pi using the following command:

curl -fsSL https://pi.dev/install.sh | sh

Then install the extensions package:

pi install git:forgejo.phytec.de/akapoor/pi-agent-extensions@main

After installing, run /reload in pi to pick up the extensions.

What's included

Extension Purpose
ask-mode Read-only Q&A mode for safe codebase exploration
plan-mode Read-only exploration, then tracked plan execution
questionnaire Interactive single or multi-question dialogs
confluence Search, read, create, and update Confluence pages
jira Search, create, update, and transition Jira issues
jenkins Inspect jobs, builds, nodes, queues, and pipeline logs

Setup

Most extensions need authentication before they can talk to external services. Run the interactive commands below in pi to persist credentials; each stores a JSON file in ~/.pi/agent/ with restricted permissions where available:

  • Confluence: /confluence-auth, for Confluence the Personal Access Token can be accessed through : Settings --> Personal Access Tokens

  • Jira: /jira-auth, for Jira the Personal Access Token can be accessed through: Profile --> Personal Access Tokens

  • Jenkins: /jenkins-auth, for Jenkins the API Token can be accessed through: Profile --> Security --> API Token

Please note to provide host details as the full URL, like: https://wiki.phytec.com/, https://jira.phytec.com/, https://ci-jenkins.phytec.de

Environment variables are also supported; see each extension's README.

Development

Clone the repo, then test an extension locally without installing:

pi -e ./extensions/<name>

Type-check the whole package:

npm install
npm run lint

Updating

Rerun the original install command to advance to the latest branch commit.

pi install git:forgejo.phytec.de/phytec-internal/pi-agent-extensions@main

Why this repo?

Pi is a small, open-source agent harness: a few core tools, a short system prompt, and an extension system that lets you add exactly what you need. This repo packages the extensions that developers can use at PHYTEC for day to day embedded Linux work.

No baked-in MCP server, no hidden sub-agent framework, and no vendor guardrails eating half the context window. If you need a tool, you add it. If you don't, it stays out of your way.

The model gets direct access to your code and your tools, not a cloud sandbox.

Models and cost

PHYTEC developers already have GitHub Copilot, so the easiest start is /login inside pi and reuse that subscription. You can also plug in Anthropic, OpenAI, Google, Groq, OpenRouter, Bedrock, or any other provider you already pay for.

Frontier models are impressive, but running them all day is expensive unless you have an unlimited budget. A cheaper alternative is the $20/month Ollama Cloud route, which gives you a wide range of open-weight models (Llama, Qwen, Kimi, etc.) without per-token billing.

We are also testing local LLM agents on our own servers for complete data sovereignty. That work is still in progress.

What to ask: prompts I have actually tested

The extensions cover the cross-tool work that developers use every day. The prompts below are based on real ones that returned results when I ran them in pi against our internal BSP and CI systems. You can use them as a template for your own prompts.

Build and CI-based

  • What is the status of the last build of BSP_Development/build-BSP-Yocto-Ampliphy-i.MX8MM-master-next?
  • Why did the last build of BSP_Development/build-BSP-Yocto-Ampliphy-i.MX8MM-master-next fail?
  • Get the Allure summary for the latest build of BSP_Testing/BSP-Yocto-Ampliphy-AM335x-PD24.1.y-next/test_phyboard-wega-r2-am335x-1_phytec-headless-image_ampliphy.

Documentation-based

  • Find the latest Software Team Meeting page in the DEVMZ Confluence space and list the action items.
  • Fetch the full content of the BSPYoctoNXPi.MX8MPPD26.1.0 release page.
  • Create a new Confluence page under my profile with information about what we discussed.

Issue tracking

  • List the ten highest-priority open bugs in the BSPYOCTO project.
  • Create a Jira bug for the AI Infrastructure Project and tag Akarshan Kapoor. Set priority to High.

Read exploration

  • /ask: Explain the device tree structure in this BSP tree.
  • /ask: What does imx8mp.dtsi include, and which overlays are applied for the custom carrier board?
  • /plan: Map out how I would migrate this patch from Kernel 5.15 to 6.1 before making any edits.

They are the kind of cross-tool tasks that normally need a few browser tabs. Now they can happen in one terminal session.

The models that seem to perform best are listed below in no particular order:

  1. Claude Sonnet 4.5 (from Github Copilot/Anthropic)
  2. Claude Sonnet 4.6 (from Github Copilot/Anthropic)
  3. Gemini 3.1 Pro (from Github Copilot/Google)
  4. Claude Opus 4.5 and later (from Github Copilot/Anthropic)
  5. Kimi K 2.6 and later. (From Ollama Cloud)
  6. GLM 5.1 and later.(From Ollama Cloud)
  7. GPT 5 and later (From Github Copilot/OpenAI)
  8. Minimax M2.5 and later. (From Ollama Cloud)

Privacy and trust considerations

Pi keeps everything on your machine: the agent loop, the extensions, and the credentials stored in ~/.pi/agent/. There is no vendor cloud layer silently summarizing your sessions, no models.dev fetch, and no telemetry endpoint to opt out of.

The same cannot be said for every alternative. A few things worth knowing before you pick a tool for your actual source code:

  • Claude Code ships as a closed-source binary on npm. In March 2026, Anthropic accidentally published a source map that exposed ~512,000 lines of the CLI source code in the @anthropic-ai/claude-code npm package. It was a packaging mistake, not a data breach, but it is a reminder that you are trusting a vendors build-and-release hygiene. It is also Claude-only and requires an Anthropic subscription or API billing (there are ways to get around that, but they are not officially supported).
  • OpenCode is open source and genuinely useful, but it has a track record of not being private by default. Open issues document that the CLI can phone home for session-title generation, models.dev catalog refreshes, update checks, and the experimental web UI, even when you have configured a local model. The community has filed workarounds and disable flags, but getting to a fully air-gapped or local-only setup still requires careful configuration. See the discussion in anomalyco/opencode#10416, anomalyco/opencode#459, anomalyco/opencode#2224, and anomalyco/opencode#24429. None of that makes OpenCode a bad project; it just means privacy is not the default yet.

Tips

  1. Add an AGENTS.md in your project root with your stack, forbidden paths, and preferred commands. Run /reload after changes.
  2. Authenticate once: /confluence-auth, /jira-auth, /jenkins-auth.
  3. Use /ask for read-only exploration and /plan before risky refactors.
  4. If you need an extension developed for your use case, open an issue in this repo and we can discuss it.

Note

With that being said, AI is not definitive. Always review edits and any code or documentation. The extensions are designed to be helpful assistants, for increasing productivity and efficiency. They can make mistakes, so treat their output as suggestions rather than facts.