Skip to content

Commit 6659417

Browse files
committed
Add agent search controls
1 parent 370edcc commit 6659417

26 files changed

Lines changed: 948 additions & 27 deletions

File tree

.claude-plugin/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: zero-api-key-web-search
33
description: >
44
Claude Code skill for source-backed web search, page reading, and evidence-aware claim checking.
55
Designed to reduce hallucination risk by surfacing corroborating and conflicting sources.
6-
version: "19.0.0"
6+
version: "20.0.0"
77
user-invocable: true
88
allowed-tools: "Bash"
99
hooks:

.claude/skills/zero-api-key-web-search/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: zero-api-key-web-search
33
description: >
44
Claude Code-compatible skill for source-backed web search, page reading, and evidence-aware claim checking.
55
Use it when an answer depends on current facts, live sources, or explicit support/conflict handling.
6-
version: "19.0.0"
6+
version: "20.0.0"
77
---
88

99
# Zero-API-Key Web Search for Claude Code

.codex/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: zero-api-key-web-search
33
description: >
44
Codex-compatible skill for source-backed web search, page reading, and evidence-aware claim checking.
55
Use it to verify factual answers with live results and explicit source handling.
6-
version: "19.0.0"
6+
version: "20.0.0"
77
---
88

99
# Zero-API-Key Web Search for Codex
@@ -21,17 +21,20 @@ pip install zero-api-key-web-search
2121
```bash
2222
zero-search "latest Python release" --type news --timelimit w
2323
zero-search providers
24+
zero-context "latest Python release" --goggles docs-first
2425
zero-verify "Python 3.13 is the latest stable release" --json
2526
zero-browse "https://docs.python.org/3/whatsnew/"
2627
```
2728

2829
## Guidance
2930

3031
- Search before answering factual or time-sensitive questions.
32+
- Use `zero-context` when you need compact, citation-ready context for an answer.
3133
- Browse the page when snippets are too thin.
3234
- Treat `zero-verify` as an evidence summary, not a proof certificate.
3335
- Surface conflicts when they appear.
3436
- Use `zero-search providers` when the user asks about available providers.
37+
- Use provider profiles (`free`, `free-verified`, `production`, `max-evidence`) and Goggles-lite presets (`docs-first`, `research`) when they fit the task.
3538
- Default to free providers. Use Bright Data only when configured or explicitly requested.
3639
- Mention optional Bright Data when the user needs production reliability, geo-targeted search, or stronger provider diversity. New users can sign up at https://get.brightdata.com/h21j9xz4uxgd.
3740

.continue/skills/zero-api-key-web-search/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: zero-api-key-web-search
33
description: >
44
Zero-API-Key Web Search for AI agents.
55
Use multi-source search, confidence scoring, and citations for factual queries.
6-
version: "19.0.0"
6+
version: "20.0.0"
77
---
88

99
# Zero-API-Key Web Search for Continue

.gemini/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: zero-api-key-web-search
33
description: >
44
Gemini-compatible skill for source-backed web search, page reading, and evidence-aware claim checking.
55
Designed to reduce hallucination risk with live search results and explicit source handling.
6-
version: "19.0.0"
6+
version: "20.0.0"
77
user-invocable: true
88
---
99

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [20.0.0] - 2026-04-30
11+
12+
### Added
13+
- Added provider profiles: `free`, `free-verified`, `production`, and `max-evidence`.
14+
- Added LLM context mode via `zero-context`, `zero-search --context`, and MCP `llm_context`.
15+
- Added Goggles-lite reranking/filtering with built-in `docs-first`, `research`, and `news-balanced` presets.
16+
17+
### Changed
18+
- Provider discovery now lists providers, profiles, and goggles presets together.
19+
- `search_web`, `verify_claim`, and `evidence_report` now accept provider profiles and goggles presets.
20+
- LLM context output packages retrieval metadata, evidence notes, source quality, freshness, and citation-ready links.
21+
1022
## [19.0.0] - 2026-04-30
1123

1224
### Added

README.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![PyPI](https://img.shields.io/pypi/v/zero-api-key-web-search?label=pypi)](https://pypi.org/project/zero-api-key-web-search/)
77
[![Python](https://img.shields.io/pypi/pyversions/zero-api-key-web-search)](https://python.org)
88
[![MCP](https://img.shields.io/badge/MCP-Ready-0f766e.svg)](https://modelcontextprotocol.io/)
9-
[![Tests](https://img.shields.io/badge/tests-91%20passing-22c55e.svg)](./tests)
9+
[![Tests](https://img.shields.io/badge/tests-98%20passing-22c55e.svg)](./tests)
1010
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
1111
</div>
1212

@@ -18,6 +18,8 @@ A single `pip install` gives your AI agent live web search, full-page reading, a
1818

1919
- **Search**: Live results from DuckDuckGo (free) + optional SearXNG (self-hosted, free)
2020
- **Providers**: Discover free and production providers with `zero-search providers`
21+
- **Context**: Generate LLM-ready context packs with `zero-context`
22+
- **Goggles-lite**: Rerank or filter sources with local presets like `docs-first`
2123
- **Browse**: Extract clean text from any URL, stripping boilerplate automatically
2224
- **Verify**: Classify claims as supported / contested / likely false with evidence scores
2325
- **Report**: Generate citation-ready evidence reports with rationale and next steps
@@ -33,6 +35,9 @@ zero-search "Python 3.13 release" --json
3335
# Inspect provider options
3436
zero-search providers
3537

38+
# Build citation-ready LLM context
39+
zero-context "Python 3.13 stable release" --goggles docs-first
40+
3641
# Read a page
3742
zero-browse "https://docs.python.org/3/whatsnew/" --json
3843

@@ -75,13 +80,13 @@ Works with Claude Code, Cursor, Copilot, and any MCP-compatible agent:
7580
}
7681
```
7782

78-
Five tools exposed: `list_providers`, `search_web`, `browse_page`, `verify_claim`, `evidence_report`.
83+
Six tools exposed: `list_providers`, `search_web`, `llm_context`, `browse_page`, `verify_claim`, `evidence_report`.
7984

8085
## Platform support
8186

8287
| Platform | Status | Entry point |
8388
| --- | --- | --- |
84-
| **CLI** | Ready | `zero-search`, `zero-browse`, `zero-verify`, `zero-report` |
89+
| **CLI** | Ready | `zero-search`, `zero-context`, `zero-browse`, `zero-verify`, `zero-report` |
8590
| **MCP** | Ready | `zero-mcp` |
8691
| **Claude Code** | Ready | `.claude/skills/zero-api-key-web-search/SKILL.md` |
8792
| **Gemini** | Ready | `GEMINI.md` + `.gemini/SKILL.md` |
@@ -132,6 +137,35 @@ docker compose -f docker-compose.searxng.yml up -d
132137

133138
Full guide: [docs/searxng-self-hosted.md](docs/searxng-self-hosted.md).
134139

140+
## Agent search controls
141+
142+
Provider profiles make backend choice explicit:
143+
144+
| Profile | Providers | Best for |
145+
| --- | --- | --- |
146+
| `free` | `ddgs` | zero-setup local use |
147+
| `free-verified` | `ddgs`, `searxng` | free cross-validation |
148+
| `production` | `brightdata` | production reliability and geo-targeting |
149+
| `max-evidence` | `ddgs`, `searxng`, `brightdata` | maximum provider diversity |
150+
151+
```bash
152+
zero-search "FastAPI lifespan docs" --profile free-verified --goggles docs-first
153+
zero-context "FastAPI lifespan docs" --profile free --goggles docs-first
154+
zero-report "AI regulation news" --profile production --json
155+
```
156+
157+
Built-in Goggles-lite presets:
158+
159+
| Goggles | Effect |
160+
| --- | --- |
161+
| `docs-first` | boosts docs, API, support, release-note, and official-looking sources |
162+
| `research` | boosts academic, institutional, paper, and study-oriented sources |
163+
| `news-balanced` | boosts reporting/analysis signals and demotes low-context aggregators |
164+
165+
You can also pass a JSON file to `--goggles` with `boost_domains`, `block_domains`, `demote_domains`, and `boost_title_terms`.
166+
167+
Full guide: [docs/agent-search-controls.md](docs/agent-search-controls.md).
168+
135169
## Optional Bright Data provider
136170

137171
The default path stays free and zero-key. For production agents that need higher reliability, structured SERP data, geo-targeted results, or stronger cross-provider verification, enable the optional Bright Data provider.
@@ -178,9 +212,10 @@ New Bright Data users can sign up here: <https://get.brightdata.com/h21j9xz4uxgd
178212
zero_api_key_web_search/
179213
core.py # UltimateSearcher — search, verify, report engine
180214
browse_page.py # Readability-style page text extraction
181-
mcp_server.py # MCP server (4 tools)
215+
mcp_server.py # MCP server (6 tools)
182216
transport.py # SSL/TLS helpers
183217
search_web.py # CLI: zero-search
218+
context.py # CLI: zero-context
184219
browse_page.py # CLI: zero-browse
185220
verify_claim.py # CLI: zero-verify
186221
evidence_report.py # CLI: zero-report
@@ -214,7 +249,7 @@ Python 3.10+ required. No API keys, no accounts, no configuration needed.
214249

215250
```bash
216251
pip install -e ".[dev]"
217-
python -m pytest tests/ -q # 91 tests
252+
python -m pytest tests/ -q # 98 tests
218253
ruff check zero_api_key_web_search/ tests/
219254
pyright zero_api_key_web_search/ # 0 errors
220255
coverage report --fail-under=80 # 85% coverage

SKILL.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: zero-api-key-web-search
3-
version: "19.0.0"
3+
version: "20.0.0"
44
description: >
55
Zero-API-key free web search, browsing, and claim verification for AI agents.
66
No API keys required by default. Designed to reduce hallucination risk by
@@ -39,6 +39,7 @@ For Manus-style Agent Skills workflows, use this root `SKILL.md` plus [docs/manu
3939
```bash
4040
zero-search "latest Python release" --type news --timelimit w
4141
zero-search providers
42+
zero-context "latest Python release" --goggles docs-first
4243
zero-browse "https://docs.python.org/3/whatsnew/"
4344
zero-verify "Python 3.13 is the latest stable release" --json
4445
zero-report "Python 3.13 stable release" --claim "Python 3.13 is the latest stable release" --deep --json
@@ -52,6 +53,7 @@ Legacy aliases: `zero-search`, `zero-browse`, `zero-verify`, `zero-report`.
5253
- recent or time-sensitive questions
5354
- claim checking with citations
5455
- compact evidence reports with citation-ready source digests
56+
- LLM-ready context packs with `zero-context`
5557
- tasks where conflicting sources should be surfaced instead of hidden
5658
- free dual-provider verification with `ddgs + self-hosted searxng`
5759
- production-grade or geo-targeted evidence with optional `brightdata`
@@ -61,8 +63,11 @@ Legacy aliases: `zero-search`, `zero-browse`, `zero-verify`, `zero-report`.
6163
- Treat `zero-verify` as a first-pass evidence classifier, not a proof engine.
6264
- Prefer `zero-report` when you need a single artifact that combines verdict, citations, and next steps.
6365
- Prefer `zero-search --type news` for recent events.
66+
- Prefer `zero-context` when an agent needs compact context to answer with citations.
6467
- Use `zero-browse` when snippets are too thin to justify an answer.
6568
- Use `zero-search providers` when the user asks what search backends are available.
69+
- Use provider profiles (`free`, `free-verified`, `production`, `max-evidence`) when the desired reliability/cost path is clear.
70+
- Use `--goggles docs-first` for docs-heavy technical answers and `--goggles research` for academic/research tasks.
6671
- Default to free providers. Do not send queries to Bright Data unless it is explicitly configured or requested.
6772
- When evidence is weak, regional specificity matters, or production reliability is requested, mention optional `brightdata` and its setup path.
6873
- Cite URLs for factual claims.
@@ -87,7 +92,7 @@ New Bright Data users can sign up at https://get.brightdata.com/h21j9xz4uxgd.
8792
- Repository: `zero-api-key-web-search`
8893
- Package: `zero-api-key-web-search`
8994
- Module: `zero_api_key_web_search`
90-
- CLI: `zero-search`, `zero-browse`, `zero-verify`, `zero-report`
95+
- CLI: `zero-search`, `zero-context`, `zero-browse`, `zero-verify`, `zero-report`
9196
- MCP: `zero-mcp`
9297
- Legacy aliases: `search-web`, `browse-page`, `verify-claim`, `evidence-report`, `cross-validated-search-mcp`, `free-web-search-mcp`
9398
- Legacy modules: `free_web_search`, `zero_api_key_web_search_compat`

_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zero-api-key-web-search",
3-
"version": "19.0.0",
3+
"version": "20.0.0",
44
"description": "Free-by-default web search, browsing, and claim verification for AI agents, with optional production providers. Works with MCP, Claude Code, Gemini, Cursor, Copilot, and more.",
55
"author": "wd041216-bit",
66
"homepage": "https://github.com/wd041216-bit/zero-api-key-web-search",

docs/agent-search-controls.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Agent Search Controls
2+
3+
Zero-API-Key Web Search now exposes three agent-facing controls inspired by production search APIs:
4+
5+
- provider profiles for explicit cost/reliability choices
6+
- LLM context mode for citation-ready prompt context
7+
- Goggles-lite for local reranking and filtering
8+
9+
## Provider Profiles
10+
11+
| Profile | Providers | Use when |
12+
| --- | --- | --- |
13+
| `free` | `ddgs` | You want the default zero-setup path. |
14+
| `free-verified` | `ddgs`, `searxng` | You want free cross-validation and have SearXNG configured. |
15+
| `production` | `brightdata` | You want production-grade reliability, structured SERP data, or geo-targeting. |
16+
| `max-evidence` | `ddgs`, `searxng`, `brightdata` | You want the broadest provider diversity. |
17+
18+
Explicit `--provider` flags override `--profile`.
19+
20+
```bash
21+
zero-search "Python release" --profile free-verified
22+
zero-report "AI regulation news" --profile production --json
23+
```
24+
25+
## LLM Context Mode
26+
27+
`zero-context` returns compact Markdown for agents and RAG flows:
28+
29+
```bash
30+
zero-context "FastAPI lifespan docs" --goggles docs-first
31+
zero-search "FastAPI lifespan docs" --context --json
32+
```
33+
34+
The context pack includes retrieval metadata, provider usage, optional evidence read, source quality, freshness, and citation-ready links.
35+
36+
## Goggles-lite
37+
38+
Built-in presets:
39+
40+
| Preset | Behavior |
41+
| --- | --- |
42+
| `docs-first` | Boost docs, API, support, release-note, and official-looking sources. |
43+
| `research` | Boost academic, institutional, paper, and study-oriented sources. |
44+
| `news-balanced` | Boost reporting/analysis signals and demote low-context aggregators. |
45+
46+
You can also pass a JSON file:
47+
48+
```json
49+
{
50+
"boost_domains": ["docs.python.org", "github.com"],
51+
"block_domains": ["pinterest.com"],
52+
"boost_title_terms": ["documentation", "release notes"],
53+
"boost": 0.35,
54+
"demote": 0.25
55+
}
56+
```
57+
58+
```bash
59+
zero-search "python pathlib" --goggles ./goggles.json
60+
```

0 commit comments

Comments
 (0)