feat: add brave search container and toolset

This commit is contained in:
William Valentin
2026-02-22 20:12:54 -08:00
parent 487f26e36d
commit ba6abfb078
13 changed files with 502 additions and 53 deletions
+47
View File
@@ -437,6 +437,53 @@ Audio persistence and diagnostics:
- Runbook: `docs/runbooks/VOICE_TRANSCRIPTION_DEBUG.md`.
- SQLite quick reference: `docs/runbooks/SQLITE_QUICK_REFERENCE.md`.
### Web Search
Flynn provides web search tools through the `web_search` config:
- `web.search` - general web results (Brave or SearXNG provider)
- `web.search.news` - news results (Brave provider only)
Brave Search configuration:
```yaml
web_search:
provider: brave
api_key: "${BRAVE_API_KEY}"
max_results: 5
```
SearXNG configuration:
```yaml
web_search:
provider: searxng
endpoint: "http://searxng:8080"
max_results: 5
```
| Field | Required | Description |
|-------|----------|-------------|
| `provider` | no | `brave` or `searxng` (default: `brave`) |
| `api_key` | yes (Brave) | Brave Search API key |
| `endpoint` | yes (SearXNG) | Base URL for self-hosted SearXNG |
| `max_results` | no | Default result count for `web.search*` tools (default: `5`, max: `20`) |
Brave-specific query fields (supported by `web.search`, and by `web.search.news` except `safeSearch`):
- `country` (for example `us`, `gb`)
- `searchLang` (for example `en`, `de`)
- `freshness` (`pd`, `pw`, `pm`, `py`)
- `safeSearch` (`off`, `moderate`, `strict`) - `web.search` only
Optional local Brave Search container (for MCP-based workflows):
```bash
docker compose --profile search up -d brave-search
```
Note: Flynn's built-in `web.search*` tools call Brave's HTTP API directly and use `web_search.api_key`; they do not route through the `brave-search` MCP container.
### Text-to-Speech (TTS) Reply Audio
Flynn can attach synthesized voice replies (OpenAI-compatible `/v1/audio/speech`) alongside text responses.