xonecas.io
778
Pi

pi-extensions / files

pi-extensions / README.md

2.4 KB
1# xonecas' Pi extensions
2
3Personal Pi extensions, kept in one source-controlled collection.
4
5## Extensions
6
7### `adversary`
8
9Adds the `adversary_review` tool. The main agent can delegate an independent review to an isolated Pi process.
10
11The child receives the built-in `read`, `grep`, `find`, `ls`, and `bash` tools. Its model, thinking level, and review instructions are loaded from [`extensions/adversary/adversary.md`](extensions/adversary/adversary.md) each time the tool runs:
12
13```markdown
14---
15model: yourprovider/youradversarymodelchoice
16thinking: high
17---
18
19Reviewer instructions go here.
20```
21
22Edit that file to change the reviewer without reloading the extension. While a review runs, the tool display follows the child's latest tool action and then shows when it starts writing findings.
23
24Ask Pi naturally:
25
26```text
27Use the adversary to review the current work against my request.
28```
29
30### `exa`
31
32Adds two tools, both served by Exa's hosted MCP server:
33
34- `exa_search` searches the web. It sends `auto` searches with relevant highlights by default and supports Exa's other search types (`fast`, `instant`, `deep-lite`, `deep`, `deep-reasoning`) when deeper or faster retrieval is useful.
35- `exa_contents` reads the full content of one or more known URLs as clean markdown. Use it when the search highlights are not enough.
36
37`EXA_API_KEY` is optional. Every call tries the free anonymous tier first. When a key is set and the free tier rate-limits the call, the extension waits briefly, retries once anonymously, and then falls back to the key. Tool details report `keyed` and `rateLimitRetries`, so paid calls are visible. Without a key, rate-limited calls fail with Exa's own message, which explains how to add one.
38
39Ask Pi naturally:
40
41```text
42Search the web for the latest Exa API changes.
43```
44
45```text
46Read https://exa.ai/docs/reference/get-contents and summarize the parameters.
47```
48
49## Enable or disable
50
51Extensions remain here. Pi discovers enabled extensions through symlinks in `~/.pi/agent/extensions`.
52
53Enable:
54
55```bash
56mkdir -p ~/.pi/agent/extensions
57ln -s extensions/adversary ~/.pi/agent/extensions/adversary
58ln -s extensions/exa ~/.pi/agent/extensions/exa
59```
60
61Disable:
62
63```bash
64rm ~/.pi/agent/extensions/adversary
65rm ~/.pi/agent/extensions/exa
66```
67
68Run `/reload` after either change, or restart Pi.
69
70For a one-off session without enabling it globally:
71
72```bash
73pi -e extensions/adversary/index.ts
74pi -e extensions/exa/index.ts
75```