Skip to content

feat: add Exa AI-powered search tool#135

Open
tgonzalezc5 wants to merge 1 commit intoAgenticHighway:mainfrom
tgonzalezc5:feat/exa-search-plugin
Open

feat: add Exa AI-powered search tool#135
tgonzalezc5 wants to merge 1 commit intoAgenticHighway:mainfrom
tgonzalezc5:feat/exa-search-plugin

Conversation

@tgonzalezc5
Copy link
Copy Markdown

Summary

Adds kelvin.exa, a wasm_tool_v1 tool plugin that calls the Exa /search API for AI-powered web search. It mirrors the structure and ABI of the existing kelvin-websearch-plugin (Brave) so it slots into the same plugin lifecycle (make build / test / pack / install).

  • New plugin at plugins/kelvin-exa-plugin/ (no_std cdylib, ~11 KiB WASM)
  • Sandboxed: network_allow_hosts: ["api.exa.ai"], env_allow: ["EXA_API_KEY"]
  • Exposes query, num_results, type (auto/neural/fast), category, include_domains / exclude_domains, start_published_date / end_published_date, livecrawl, and a summary flag
  • Always requests highlights + a short text snippet; formats output with a highlights -> summary -> text fallback chain so results are immediately useful to the model
  • Updates release/README.md to document the new plugin and EXA_API_KEY env var

Usage

// tool call arguments
{
  "query": "latest research on retrieval-augmented generation",
  "num_results": 5,
  "category": "research paper",
  "type": "neural",
  "summary": true
}
# Install / configure
cd plugins/kelvin-exa-plugin
make build
make test            # validates the manifest
make pack && make install

# Then in ~/.kelvinclaw/.env
EXA_API_KEY=<your-exa-key>

Files changed

  • plugins/kelvin-exa-plugin/Cargo.toml, Cargo.lock — crate config (cdylib, no_std, wasm32 target)
  • plugins/kelvin-exa-plugin/plugin.json — manifest with capabilities, scopes, and tool_input_schema
  • plugins/kelvin-exa-plugin/src/lib.rs — guest implementation: input parsing, request build, response formatting
  • plugins/kelvin-exa-plugin/build.sh, Makefile, .gitignore, README.md, payload/README.md — build/dev tooling matching the websearch plugin layout
  • release/README.md — adds kelvin.exa row to the Tool Plugins table and EXA_API_KEY to the env var table

Test plan

  • bash build.sh compiles the WASM cdylib successfully (~11 KiB, well under the 512 KiB module limit)
  • scripts/kelvin-plugin-dev.sh test --manifest plugins/kelvin-exa-plugin/plugin.json validates the manifest and capability/runtime declarations (manifest ok: kelvin.exa@0.1.0 (wasm_tool_v1))
  • cargo check --workspace (root) passes; the plugin uses an empty [workspace] to stay independent of the host workspace, matching the existing kelvin-websearch-plugin and kelvin-wiki-plugin layout
  • Search-type, category, and livecrawl parameters are validated against strict allowlists in the guest before being forwarded to the API
  • End-to-end live call against api.exa.ai/search with a real EXA_API_KEY (left to maintainers / a follow-up smoke run; no plugin-level unit tests since the plugin is no_std cdylib WASM, matching the other tool plugins in this repo)

Notes

  • The plugin tags requests with an x-exa-integration: kelvinclaw header so usage attributable to KelvinClaw is observable on the Exa side, mirroring how other Exa integrations are tagged.
  • I deliberately did not touch index.json or release/vendor/ — those carry pre-built tarballs for the public plugin index and seem to be regenerated as part of release tagging rather than per-PR. Happy to add an entry if maintainers prefer it bundled in this PR.

Adds kelvin.exa, a wasm_tool_v1 plugin that calls the Exa /search API
for AI-powered web search. The plugin mirrors the structure and ABI of
the existing kelvin-websearch-plugin (Brave) so it slots into the same
plugin lifecycle (build / test / pack / install).

Features exposed:
- query, num_results, type (auto/neural/fast), category
- include_domains / exclude_domains
- start_published_date / end_published_date
- livecrawl, summary
- Always requests highlights + a short text snippet, with a
  highlights -> summary -> text fallback chain when formatting

Auth uses the EXA_API_KEY environment variable, declared in
capability_scopes.env_allow. Network egress is restricted to api.exa.ai.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant