← Catalog

devkit-pi

Personal all-in-one pi coding toolkit: subagents, web research, LSP code intelligence, and developer commands

Package

Install

Install with PiG

pig install npm:devkit-pi

Install with Pi

pi install npm:devkit-pi
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.

devkit-pi

English | 中文

Personal all-in-one pi coding toolkit for agentic coding workflows.

Combines subagents, web research, LSP code intelligence, automatic diagnostics hooks, and developer commands into a single modular pi extension.

Modules

ModuleDescriptionDefault
subagentsDelegate tasks to 5 specialized readonly agents; supports user/project custom agents via markdown frontmatterenabled
webweb_search, fetch_content, get_search_content — multi-provider search, URL content extraction, result cachingenabled
lspLSP tool (definitions, references, hover, symbols, diagnostics) + auto diagnostics hook on agent_endenabled
commandsUnified /toolkit command center: doctor, modules, logs, agents, lsp, activityenabled

Quick Start

Install as a pi package

pi install devkit-pi
{
  "pi": {
    "extensions": ["./src/index.ts"]
  }
}
git clone https://github.com/0xnayuta/devkit-pi.git
cd devkit-pi
pnpm install
pnpm test

Built-in Agents

AgentSpecialtyPermission
explorerCode navigation, file search, LSP symbol navigationreadonly
researcherDocumentation, API research, web searchreadonly
reviewerCode review, architecture analysis, LSP diagnosticsreadonly
implementerImplementation planning with LSP definition/reference supportreadonly
testerTest strategy, edge case planning, LSP diagnosticsreadonly

All agents are readonly by default. The main agent is the sole orchestrator — subagents cannot spawn other subagents.

Writable custom subagents are experimental. The default and recommended mode is readonly; subagents.allowWrite=true does not provide a complete sandbox, audit trail, or rollback guarantee. See Subagents reference and Security model.

Custom agents

Place markdown files in .pi/agents/ (project) or ~/.pi/agent/agents/ (user):

---
name: custom-reviewer
description: Project-specific reviewer
readonly: true
tools: read, grep, find, ls
---

You are a custom review subagent.

Tools

Subagent tool

subagent({ agent: "explorer", task: "Find authentication code" })

Delegates a focused task to a specialized agent. Results are sanitized and returned to the parent agent.

Web tools

ToolDescription
web_searchMulti-provider web search with auto-fallback. Providers: ddgs (default), brave, tavily, serper, openserp, searxng
fetch_contentFetch and extract readable text from URLs. Supports Jina reader fallback for JS-heavy pages
get_search_contentRetrieve stored search/fetch results by responseId

LSP tool

Exposes language server capabilities: definition, references, hover, signature, symbols, diagnostics, workspace-diagnostics, servers.

Mutating actions (rename, codeAction, restart) are disabled by default and always blocked in subagent processes.

LSP diagnostics hook

Automatically runs LSP diagnostics after each agent turn (configurable: agent_end | edit_write | disabled).

Commands

The /toolkit command provides diagnostic and inspection subcommands:

SubcommandDescription
/toolkit doctorRun unified diagnostics checks
/toolkit modulesShow module enablement status
/toolkit logsShow recent web activity logs
/toolkit agentsList all discovered agents
/toolkit lspShow LSP tool/hook configuration
/toolkit activityOpen interactive activity panel
/toolkit helpShow usage help

Configuration

Config file: ~/.pi/agent/extensions/devkit-pi/config.json.

Each module can be independently enabled or disabled. See Configuration reference for the canonical defaults and normalize rules.

Error Codes

Subagent errors

INVALID_INPUT | SUBAGENTS_DISABLED | UNKNOWN_AGENT | SUBAGENT_DISABLED | SUBAGENT_DEPTH_EXCEEDED | SUBAGENT_TIMEOUT | SUBAGENT_FAILED | SUBAGENT_OUTPUT_TRUNCATED

Web tool errors

Web tools return structured errors with error.code and error.message. Common codes include INVALID_INPUT, WEB_SEARCH_INVALID_QUERY, WEB_SEARCH_FAILED, WEB_SEARCH_TIMEOUT, PROVIDER_AUTH_FAILED, PROVIDER_RATE_LIMITED, PROVIDER_UNAVAILABLE, NETWORK_ERROR, CONTENT_FETCH_INVALID_URL, CONTENT_FETCH_FAILED, CONTENT_FETCH_TIMEOUT, and NOT_FOUND.

See the canonical list in Web tools error codes.

Project Structure

src/
├─ index.ts                 # Thin entry point — registers all modules
├─ modules/
│  ├─ subagents/            # Task delegation, agent discovery, execution
│  │  └─ commands/          # doctor, list, logs formatting
│  ├─ web/                  # Search, fetch, content extraction, caching
│  │  └─ providers/         # ddgs, brave, tavily, serper, openserp, searxng
│  ├─ lsp/                  # LSP tool, diagnostics hook, server management
│  └─ commands/             # Unified /toolkit command registration
├─ config/                  # Configuration loading and defaults
└─ shared/                  # Types, error codes, utilities
agents/                     # 5 built-in agent definitions (markdown)
tests/                      # Mirrors src/modules structure
docs/                       # Documentation, guides, ADRs

Design Boundaries

  1. The main agent is the sole orchestrator
  2. Subagents cannot spawn other subagents (maxDepth = 1)
  3. Default readonly — write capability requires explicit configuration and remains experimental for custom subagents
  4. LSP mutating actions (rename, codeAction, restart) are disabled by default and always blocked in subagent processes
  5. Each module can be independently enabled or disabled

Development

pnpm typecheck    # Type check
pnpm lint         # Lint with Biome
pnpm lint:fix     # Auto-fix lint issues
pnpm format       # Format with Biome
pnpm test         # Run unit tests
pnpm docs:check   # Validate documentation

Documentation site

Online documentation site: https://devkit-pi.wangyan.life/

The VitePress documentation site can be previewed locally:

pnpm docs:dev
pnpm docs:build
pnpm docs:preview

Documentation

License

MIT © Izayoi Nayuta