Skip to content

Add Brave Search web search tool - #16

Open
miguelenes wants to merge 2 commits into
shipfastlabs:mainfrom
miguelenes:add-brave-search
Open

Add Brave Search web search tool#16
miguelenes wants to merge 2 commits into
shipfastlabs:mainfrom
miguelenes:add-brave-search

Conversation

@miguelenes

Copy link
Copy Markdown
Contributor

Summary

  • New src/Brave package (shipfastlabs/toolkit-brave) with BraveSearch and Brave::all().
  • Calls Brave Web Search via GET https://api.search.brave.com/res/v1/web/search with X-Subscription-Token.
  • Reads credentials from services.brave.key and defaults from ai.toolkit.brave.search.*.
  • v1 covers web search only; news/image/local are deferred for coverage simplicity.

Depends on

Please also merge #15 (laravel/ai constraint widen to ^0.7|^0.10) so consumers on modern laravel/ai can install this.

Labels

Please apply new-tool.

Test plan

  • composer test green (pint + rector + phpstan + 100% type/code coverage)
  • 332 tests passing including BraveSearch branch coverage (empty query, missing key, success, failure, invalid JSON, clamps, freshness/safesearch validation, configured defaults, throw)

Made with Cursor

miguelenes and others added 2 commits August 7, 2026 09:44
Consumers on laravel/ai 0.10 cannot install any toolkit package today
because every composer.json pins ^0.7. The Tool contract, Strict
attribute, Request accessors, and JsonSchema surface used by these
tools are unchanged in 0.10, and the full suite stays green after the
bump.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduces shipfastlabs/toolkit-brave with BraveSearch (GET
/res/v1/web/search via X-Subscription-Token) and a Brave::all()
registry. Credentials live in services.brave.key; defaults under
ai.toolkit.brave.search.*. News/image/local endpoints are deferred.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

@miguelenes is attempting to deploy a commit to the Pushpak Chhajed's projects Team on Vercel.

A member of the Team first needs to authorize it.

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