Skip to content
kaarPublic

About

PI Configuration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

241 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PI Configuration

Personal configuration for the PI coding agent. This repo is symlinked into ~/.pi/agent via the install script.

Setup

Creates a symlink from ~/.pi/agent to the agent/ directory in this repo.

./install.sh

Structure

  • agent/: PI agent configuration (symlinked to ~/.pi/agent)
    • settings.json: agent settings (provider, model, thinking level, packages)
    • extensions/: TypeScript extensions that hook into the agent
    • prompts/: custom prompt templates
    • bin/: bundled binaries (e.g. fd)
    • sessions/: active session data
    • todos/: todo tracking
  • docs/: documentation
  • .agents/docs/: AI plans, research, and implementation designs
  • AGENTS.md: guidelines for parallel agents (tool usage, git safety rules, writing style)
  • install.sh: symlink setup script

Providers

  • anthropic - agent/models.json overrides the base URL to a local proxy at http://localhost:4000
  • openrouter - built-in provider, no models.json entry needed. Authenticated via the OPENROUTER_API_KEY environment variable (resolved automatically by pi's standard credential lookup). Enabled models are listed under enabledModels in agent/settings.json (e.g. openrouter/moonshotai/kimi-k3, openrouter/deepseek/deepseek-v4-flash, openrouter/qwen/qwen3.8-max)

Extensions

TypeScript extensions that add functionality to the agent. See docs/extensions.md.

Web browsing in PI. Provides tools for searching the web, fetching URL content, and retrieving stored results.

  • web_search - Search the web with one or more queries, returns AI-synthesized answers with citations
  • fetch_content - Fetch and extract readable content from URLs, YouTube videos, GitHub repos, and local videos
  • get_search_content - Retrieve full stored content from previous web_search or fetch_content calls

Interactive sub-agent management (experimental, under evaluation).

Custom Extensions

  • git-guard - Safety checks for destructive git operations
  • git-checkpoint - Automatic git-based checkpoints
  • todos - Todo management within sessions
  • openrouter - Account credits, current-key usage, app/model spending, and key budgets. See the commands below.
  • herdr - /herdr-fork [task] forks the saved session into a new Herdr tab. /herdr-handoff [goal] generates a continuation prompt through OpenRouter and submits it to a fresh Pi session in a new tab. Both commands preserve source focus, model, and thinking level. Generation runs in the background. See agent/extensions/herdr/README.md.

OpenRouter usage commands

Command Report
/openrouter Account credits and current-key usage
/openrouter apps [days] Spending, requests, and tokens per app across the account
/openrouter models [days] Spending, requests, and tokens per model across the account
/openrouter keys Usage and budgets for keys in the default workspace, including disabled keys
/openrouter help Command syntax

Analytics default to seven rolling days and accept 1-30 days. Reports show at most 20 groups, sorted by spending. App groups use existing OpenRouter attribution. Requests without attribution appear as Unknown.

Account credits and management reports require OPENROUTER_MANAGEMENT_KEY. Current-key usage requires OPENROUTER_API_KEY. Management calls only read data. A failed summary request does not hide the other summary report.

Prompts

Prompt templates are Markdown snippets that expand into full prompts. Type /name in the editor to invoke a template, where name is the filename without .md. See docs/prompt-templates.md.

  • review-staged - Review staged git changes for bugs, security issues, and error handling gaps

Skills

Reusable, invokable capabilities. See docs/skills.md.

All Pi skills now live in ~/.agents/skills/, shared with Claude. They are no longer stored in this repository's agent/skills/ directory.

Custom Skills

  • commit-message - Generates a commit message from staged changes (used by the pi-ai-commit wrapper script)
  • review-staged-changes - Reviews staged changes for bugs, security issues, and error handling gaps (P0-P3 priority)
  • keep-a-changelog - Sets up and maintains a human-readable CHANGELOG.md following Keep a Changelog 1.1.0

Skill Locations

  • Global (shared): ~/.agents/skills/
  • Project: .pi/skills/, .agents/skills/ (searched up to git root)

Skill Repositories

  • Anthropic Skills - Document processing (docx, pdf, pptx, xlsx), web development
  • Pi Skills - Web search, browser automation, Google APIs, transcription

Docs

Troubleshooting

"I accidentally added newText_dummy keys. Re-applying cleanly:"

This is not a Pi error. It is the model self-correcting a rejected edit tool call.

The edit tool validates each item in edits[] with a strict schema (additionalProperties: false). When a model emits a stray key inside an edit object (for example newText_dummy alongside the real oldText/newText), the entire tool call is hard-rejected instead of ignoring the extra key. The model receives the validation error, recognizes the bogus key, narrates the message above, and retries the edit cleanly. The retry usually succeeds, so it is mostly wasted round-trips rather than a fatal failure.

Notes:

  • Caused by noisy model output, not by anything you did. Stronger models trigger it less.
  • Tracked upstream in earendil-works/pi issues #1259 and #2731.
  • PR #5434 drops additionalProperties: false from the inner edit schema so extra keys are ignored. Not yet released as of 0.79.4.

Resources

About

PI Configuration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages