pi-mono/packages/coding-agent
Armin Ronacher fe07d21dde feat(coding-agent): add tool discovery for exec and a tool_search tool
- The exec description spends at most codemode.inlineBudget (default 3000) estimated tokens on tool declarations, filled round-robin across namespaces, cheapest first. Every namespace is listed with its tool count, and the listing says COMPLETE or PARTIAL.
- Scripts find omitted and deferred tools with searchTools(query, { limit, namespace }) and describeTool(name).
- tool_search, an optional built-in modeled on Codex, searches codemode and deferred tools and declares the matches for the next model call through the active tool set, so loads are recorded on the branch.
- Both use a BM25 ranker over Codex's search text (name, description, schema properties, namespace) behind a ToolRanker interface.
2026-09-27 18:48:47 +02:00
..
docs feat(coding-agent): add tool discovery for exec and a tool_search tool 2026-09-27 18:48:47 +02:00
examples feat: build with TypeScript 7 and run sources with plain node 2026-09-25 13:14:33 +02:00
install-lock Merge branch 'main' into codemode-and-mcp 2026-09-27 12:26:43 +02:00
scripts fix: use portable shebang in shell scripts 2026-01-22 21:44:39 +01:00
src feat(coding-agent): add tool discovery for exec and a tool_search tool 2026-09-27 18:48:47 +02:00
test feat(coding-agent): add tool discovery for exec and a tool_search tool 2026-09-27 18:48:47 +02:00
.gitignore Fix tool call ID normalization for cross-provider switches to Anthropic/GitHub Copilot 2026-01-13 04:07:10 +01:00
CHANGELOG.md feat(coding-agent): remove themes section from startup banner 2026-09-26 14:37:30 +02:00
npm-shrinkwrap.json Merge branch 'main' into codemode-and-mcp 2026-09-27 12:26:43 +02:00
package.json feat(codemode): run scripts in a QuickJS wasm VM inside the worker 2026-09-25 15:02:51 +02:00
README.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
tsconfig.build.json fix(coding-agent): keep remote harness dependencies development-only 2026-09-05 12:45:04 +02:00
tsconfig.examples.json chore: migrate pi packages to earendil works scope 2026-05-07 15:59:42 +02:00
vitest.config.ts fix: use bounded runtime paths for Unix sockets 2026-08-14 17:02:03 +03:00

Pi logo

Discord npm

New issues and PRs from new contributors are closed automatically. Maintainers review closed submissions daily. See CONTRIBUTING.md.

Pi

Pi is a minimal, extensible AI agent for the terminal. Adapt Pi to your workflow, not the other way around.

Ask Pi to create the prompt templates, skills, extensions, and themes you need, or install a Pi package. Use Pi directly, automate it in print, JSON, or RPC mode, or build applications with the TypeScript SDK.

Getting started

Install the command-line interface with npm:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

This requires Node.js 22.19 or newer. Pi does not require dependency lifecycle scripts for a normal npm installation.

On macOS or Linux, you can instead use the installer:

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

Start Pi in the directory where you want it to work:

cd /path/to/project
pi

For a built-in AI provider, run /login inside Pi to connect a subscription or API key. Then give Pi a task.

See the documentation for full setup and usage instructions.

Development

Clone the repository, install its dependencies, and run Pi from source:

git clone https://github.com/earendil-works/pi
cd pi
npm install --ignore-scripts
./pi-test.sh

pi-test.sh can be called from any directory and preserves the caller's working directory.

Before submitting changes, run:

npm run check
./test.sh

Read CONTRIBUTING.md before opening an issue or pull request. It defines the contribution gate, issue quality bar, and required checks. Read AGENTS.md for repository-specific implementation, testing, dependency, and release rules.

License

MIT