Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(search): add README and update testing strategy documentation

Steven Enamakelec650f2205dd
diff --git a/crates/openhuman-core/src/search/README.md b/crates/openhuman-core/src/search/README.md
index a6cfa7681d..a74e312cf8 100644
--- a/crates/openhuman-core/src/search/README.md
+++ b/crates/openhuman-core/src/search/README.md
@@ -1,29 +1,44 @@
-# Search Domain
+# Search domain
-Top-level home for web search selection and agent-facing search tool registration.
+Top-level home for web search selection and agent-facing search tool
+registration.
## Shape
- `registry.rs` builds the active search tool surface from `Config.search`.
-- `engines/` contains one file per search engine (`managed`, `parallel`, `brave`, `querit`, `exa`, `tavily`, and `disabled`) so provider-specific registration stays isolated.
-- `tools/` contains all search-owned agent tools: `WebSearchTool`, Parallel, Brave, Querit, Exa, Tavily, SearXNG, Seltz, and TinyFish.
-- Search tools may use the shared `IntegrationClient` for backend-proxied requests, but their implementations live in this module.
+- `engines/` holds one file per search engine (`managed`, `parallel`,
+ `brave`, `querit`, `exa`, `tavily`, and `disabled`) so provider-specific
+ registration stays isolated. See [`engines/README.md`](engines/README.md).
+- `tools/` holds all search-owned agent tools: `WebSearchTool`, Parallel,
+ Brave, Querit, Exa, Tavily, SearXNG, Seltz, and TinyFish.
+- Search tools may use the shared `IntegrationClient` for backend-proxied
+ requests, but their implementations live in this module.
-## Engine Behavior
+## Engine behavior
`search.engine` accepts:
- `disabled`: register no search tools.
- `managed`: register backend-proxied `web_search_tool`.
-- `parallel`: register the Parallel family plus `web_search_tool` when configured.
+- `parallel`: register the Parallel family plus `web_search_tool` when
+ configured.
- `brave`: register Brave web/news/image/video search when configured.
- `querit`: register Querit search plus `web_search_tool` when configured.
-- `exa`: BYOK: register `exa_search`, `exa_find_similar`, `exa_get_contents` plus `web_search_tool` when configured. Calls go directly to `https://api.exa.ai` with the user's own key, never through the managed backend.
-- `tavily`: BYOK: register `tavily_search` (web/news/finance, search depth, time-range/date filters, domain include/exclude) and `tavily_extract` plus `web_search_tool` when configured. Calls go directly to `https://api.tavily.com` with the user's own key, never through the managed backend.
+- `exa`: BYOK. Registers `exa_search`, `exa_find_similar`,
+ `exa_get_contents`, plus `web_search_tool` when configured. Calls go
+ directly to `https://api.exa.ai` with the user's own key, never through
+ the managed backend.
+- `tavily`: BYOK. Registers `tavily_search` (web/news/finance, search depth,
+ time-range/date filters, domain include/exclude) and `tavily_extract`,
+ plus `web_search_tool` when configured. Calls go directly to
+ `https://api.tavily.com` with the user's own key, never through the
+ managed backend.
-A BYO engine with no key configured falls back to the managed surface, so `managed` stays the effective default until a key is saved.
+A BYO engine with no key configured falls back to the managed surface, so
+`managed` stays the effective default until a key is saved.
-When search is disabled, search tools are absent from the agent runtime tool list, so they do not render in agent context.
+When search is disabled, search tools are absent from the agent runtime
+tool list, so they do not render in agent context.
## Wiring
@@ -37,25 +52,28 @@ When search is disabled, search tools are absent from the agent runtime tool lis
active when the engine is not `disabled`, an `IntegrationClient` can be
built, and `config.integrations.tinyfish.is_active()`.
- `SearxngSearchTool` and `SeltzSearchTool` bypass the engine registry
- entirely. They are constructed per call by the `tools.searxng_search`
- and `tools.seltz_search` RPC handlers
- (`crates/openhuman-core/src/tools/schemas/web_search.rs`), which take the query from the
- RPC params and the endpoint, key, timeout, and `enabled` gate from the
- top-level `config.searxng` / `config.seltz` sections, not `Config.search`.
+ entirely. They are constructed per call by the `tools.searxng_search` and
+ `tools.seltz_search` RPC handlers
+ (`crates/openhuman-core/src/tools/schemas/web_search.rs`), which take the
+ query from the RPC params and read the endpoint, key, timeout, and
+ `enabled` gate from the top-level `config.searxng` / `config.seltz`
+ sections, not `Config.search`.
## `engines/`
`engines` is `pub(crate)`. Each file (`managed`, `parallel`, `brave`,
`querit`, `exa`, `tavily`, `disabled`) exports a single
`pub(crate) fn build(root_config: &Config, params: SearchToolParams) -> Vec<Box<dyn Tool>>`
-that constructs that engine's tool set: e.g. `managed::build` returns a single
-`WebSearchTool`, which posts to the backend's
+that constructs that engine's tool set. For example, `managed::build`
+returns a single `WebSearchTool`, which posts to the backend's
`/agent-integrations/parallel/search`. `parallel::build` registers the same
-`WebSearchTool` alongside the Parallel family, and falls back to it alone when
-no backend client is available. `registry.rs` matches
-`search.effective_engine()` to pick exactly one.
+`WebSearchTool` alongside the Parallel family, and falls back to it alone
+when no backend client is available. `registry.rs` matches
+`search.effective_engine()` to pick exactly one. Details on each engine and
+how the pluggable-engine model works are in
+[`engines/README.md`](engines/README.md).
-See [`tools/README.md`](tools/README.md) for the provider -> tool -> transport
+See [`tools/README.md`](tools/README.md) for the provider-to-tool-to-transport
table, and
[`gitbooks/features/native-tools/web-search.md`](../../../../gitbooks/features/native-tools/web-search.md)
for the user-facing description of engine selection.
diff --git a/gitbooks/developing/testing-strategy.md b/gitbooks/developing/testing-strategy.md
index 022a807738..f5cbbf9eaa 100644
--- a/gitbooks/developing/testing-strategy.md
+++ b/gitbooks/developing/testing-strategy.md
@@ -79,7 +79,7 @@ A spec that asserts only the happy path is incomplete.
- **Element helpers**: `clickNativeButton`, `waitForWebView`, `clickToggle` in `helpers/element-helpers.ts`, use these instead of raw `XCUIElementType*` selectors.
- **Shared flows**: `completeOnboardingIfVisible`, `navigateViaHash`, `navigateToSkills`, `walkOnboarding` in `helpers/shared-flows.ts`.
- **Core RPC from spec**: `callOpenhumanRpc` in `helpers/core-rpc.ts`, drives the embedded core directly when a UI step would be brittle.
-- **Platform guards**: `isTauriDriver`, `isMac2`, `supportsExecuteScript` in `helpers/platform.ts` (the first two are legacy shims — everything runs on the Appium Chromium driver now).
+- **Platform guards**: `isTauriDriver`, `isMac2`, `supportsExecuteScript` in `helpers/platform.ts` (the first two are legacy shims; everything runs on the Appium Chromium driver now).
- **Artifact capture on failure**: `captureFailureArtifacts` runs from `wdio.conf.ts`, screenshots + DOM dumps land under `app/test/e2e/artifacts/`.
---