Skip to content

Commit 40aa653

Browse files
committed
Prepare 0.2.0 release
1 parent b13eabd commit 40aa653

2 files changed

Lines changed: 23 additions & 20 deletions

File tree

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# pi-web-minimal
22

3-
Tiny retrieval + distillation tools for Pi. Web, code, docs, and URL fetch without turning the agent context into a landfill.
3+
Web, code, docs, and URL fetch tools for Pi with a context firewall.
44

5-
No curator UI. No browser session. No video/PDF pipeline. Sources are retrieved, raw evidence is stored, and tool output passes through a context firewall: tiny results are compacted deterministically, larger results are distilled into a small source-cited brief when a Pi model is available. If distillation cannot run, tools fall back to bounded retrieval previews.
5+
The goal: give the agent useful evidence, not a landfill. Tools retrieve sources, store raw evidence out of context, then return a compact source-cited brief. Tiny results are compacted without a model call; larger results are distilled with Pi's model. Raw content stays available by `responseId`.
6+
7+
No browser session. No curator UI. No video/PDF pipeline. No broad provider stack.
68

79
## Install
810

@@ -12,11 +14,11 @@ pi install npm:pi-web-minimal
1214

1315
## Configure
1416

15-
Use env vars:
16-
1717
```bash
1818
export EXA_API_KEY=exa-...
1919
export CONTEXT7_API_KEY=ctx7sk-...
20+
# optional: use a different Pi-registered model for distillation
21+
export PI_WEB_MINIMAL_DISTILL_MODEL=provider/model-id
2022
```
2123

2224
Or `~/.pi/web-search.json`:
@@ -29,29 +31,30 @@ Or `~/.pi/web-search.json`:
2931
}
3032
```
3133

32-
Exa powers `web_search`, `code_search`, and Exa fallback for `fetch_content`.
33-
Context7 powers `documentation_search`.
34-
Distillation uses Pi's currently selected model by default. Set `PI_WEB_MINIMAL_DISTILL_MODEL=provider/model-id` or `distillModel` in config to use a different Pi-registered model.
34+
Exa powers web/code/content fallback. Context7 powers docs. Distillation uses the active Pi model unless overridden.
3535

3636
## Tools
3737

38-
| Tool | Use it for | Context behavior |
38+
| Tool | Use it for | Default output |
3939
| --- | --- | --- |
40-
| `web_search` | current web/source discovery | compact or distilled source-cited brief; raw search evidence stored |
41-
| `fetch_content` | specific URLs and GitHub repos | compact or distilled source-cited brief; raw fetched content stored by URL |
42-
| `code_search` | API docs, examples, debugging evidence | compact or distilled source-cited brief; raw code/doc evidence stored |
43-
| `documentation_search` | current library docs via Context7 | compact or distilled source-cited brief; raw docs context stored |
44-
| `get_search_content` | pulling raw stored content by `responseId` | bounded raw retrieval by default; opt into more |
45-
46-
GitHub URLs are shallow-cloned to `/tmp/pi-github-repos`, so Pi can inspect real files with normal filesystem tools.
40+
| `web_search` | current web/source discovery | compact/distilled source-cited brief |
41+
| `fetch_content` | URLs and GitHub repos | compact/distilled source-cited brief |
42+
| `code_search` | API docs, examples, debugging evidence | compact/distilled source-cited brief |
43+
| `documentation_search` | current library docs via Context7 | compact/distilled source-cited brief |
44+
| `get_search_content` | raw stored evidence by `responseId` | bounded raw content |
4745

48-
## Why this shape
46+
GitHub repos are shallow-cloned to `/tmp/pi-github-repos` for direct filesystem inspection.
4947

50-
Agent tools have two jobs: find evidence, and not poison the next turn. This package treats raw retrieval as an internal evidence store and returns only what the next agent can use. Tiny evidence is compacted without a model call so it does not become larger than the source. Larger evidence is preselected around relevant terms, distilled under a dynamic output budget, and validated for source refs. Raw content remains available through `get_search_content` for auditability and exact quotes.
48+
## Design contract
5149

52-
Fetched web content is untrusted. The firewall strips obvious instruction-like lines from compact output; model distillation is instructed to ignore instructions inside retrieved sources and cite supported claims with `[S#]` source refs.
50+
- Tool output must earn its place in the agent context.
51+
- Raw evidence is stored, not dumped.
52+
- Claims in compact/distilled output cite `[S#]` sources.
53+
- Retrieved content is untrusted; source instructions are not followed.
54+
- `get_search_content` is the raw audit/escape hatch.
55+
- Quality is measured by agent evals: task success, context reduction, citation validity, no fallbacks, injection resistance, and avoiding redundant follow-up calls.
5356

54-
See `docs/agent-tool-audit.md` for the design notes.
57+
See `docs/agent-tool-audit.md` for details.
5558

5659
## Development
5760

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pi-web-minimal",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Minimal web, code, and documentation retrieval distillation tools for Pi",
55
"type": "module",
66
"exports": "./index.ts",

0 commit comments

Comments
 (0)