Skip to content

fawxai/search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brave Search Skill

A Fawx WASM skill that performs web searches via the Brave Search API.

Input

{
  "query": "search terms",
  "count": 5,
  "api_key": "BSA..."
}
Field Type Required Default Description
query string yes Search query
count u8 no 5 Number of results (1–10)
api_key string no Brave API key (overrides stored credential)

API Key Resolution

The skill resolves the Brave API key in this order:

  1. api_key field in the input JSON
  2. BRAVE_API_KEY from host key-value storage (set as a credential by the agent runtime)

Output

Success

{
  "results": [
    {
      "title": "Example Page",
      "url": "https://example.com",
      "description": "A description of the page."
    }
  ]
}

Error

{
  "error": "Missing BRAVE_API_KEY: provide api_key in input or set it as a host credential"
}

Building

# Run tests (native)
cargo test

# Build WASM module
rustup target add wasm32-wasip1
cargo build --target wasm32-wasip1 --release

The compiled skill will be at target/wasm32-wasip1/release/brave_search_skill.wasm.

Manifest

name = "brave_search"
version = "1.0.0"
api_version = "host_api_v1"
capabilities = ["network"]
entry_point = "run"

License

MIT

About

Fawx WASM skill: Web search via Brave Search API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages