← Back to Skills Marketplace
0xrichyrich

Answers

by 0xrichyrich · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
328
Downloads
0
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install answers
Description
USE FOR AI-grounded answers via OpenAI-compatible /chat/completions. Two modes: single-search (fast) or deep research (enable_research=true, thorough multi-s...
README (SKILL.md)

Answers — AI Grounding

Requires API Key: Get one at https://api.search.brave.com

Plan: Included in the Answers plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe

When to Use

Use Case Skill Why
Quick factual answer (raw context) llm-context Single search, returns raw context for YOUR LLM
Fast AI answer with citations answers (single-search) streaming, citations
Thorough multi-search deep research answers (research mode) Iterative deep research, synthesized cited answer

This endpoint (/res/v1/chat/completions) supports two modes:

  • Single-search (default): Fast AI-grounded answer from a single search. Supports enable_citations.
  • Research (enable_research=true): Multi-iteration deep research with progress events and synthesized cited answer.

Quick Start (cURL)

Blocking (Single-Search)

curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -d '{
    "messages": [{"role": "user", "content": "How does the James Webb Space Telescope work?"}],
    "model": "brave",
    "stream": false
  }'

Streaming with Citations (Single-Search)

curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -d '{
    "messages": [{"role": "user", "content": "What are recent breakthroughs in fusion energy?"}],
    "model": "brave",
    "stream": true,
    "enable_citations": true
  }'

Research Mode

curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -d '{
    "messages": [{"role": "user", "content": "Compare quantum computing approaches"}],
    "model": "brave",
    "stream": true,
    "enable_research": true,
    "research_maximum_number_of_iterations": 3,
    "research_maximum_number_of_seconds": 120
  }'

Endpoint

POST https://api.search.brave.com/res/v1/chat/completions

Authentication: X-Subscription-Token: \x3CAPI_KEY> header (or Authorization: Bearer \x3CAPI_KEY>)

SDK Compatible: Works with OpenAI SDK via base_url="https://api.search.brave.com/res/v1"

Two Modes

Feature Single-Search (default) Research (enable_research=true)
Speed Fast Slow
Searches 1 Multiple (iterative)
Streaming Optional (stream=true/false) Required (stream=true)
Citations enable_citations=true (streaming only) Built-in (in \x3Canswer> tag)
Progress events No Yes (\x3Cprogress> tags)
Blocking response Yes (stream=false) No

Parameters

Standard Parameters

Parameter Type Required Default Description
messages array Yes - Single user message (exactly 1 message)
model string Yes - Use "brave"
stream bool No true Enable SSE streaming
country string No "US" Search country (2-letter country code or ALL)
language string No "en" Response language
safesearch string No "moderate" Search safety level (off, moderate, strict)
max_completion_tokens int No null Upper bound on completion tokens
enable_citations bool No false Include inline citation tags (single-search streaming only)
web_search_options object No null OpenAI-compatible; search_context_size: low, medium, high

Research Parameters

Parameter Type Required Default Description
enable_research bool No false Enable research mode
research_allow_thinking bool No true Enable extended thinking
research_maximum_number_of_tokens_per_query int No 8192 Max tokens per query (1024-16384)
research_maximum_number_of_queries int No 20 Max total search queries (1-50)
research_maximum_number_of_iterations int No 4 Max research iterations (1-5)
research_maximum_number_of_seconds int No 180 Time budget in seconds (1-300)
research_maximum_number_of_results_per_query int No 60 Results per search query (1-60)

Constraints (IMPORTANT)

Constraint Error
enable_research=true requires stream=true "Blocking response doesn't support 'enable_research' option"
enable_research=true incompatible with enable_citations=true "Research mode doesn't support 'enable_citations' option"
enable_citations=true requires stream=true "Blocking response doesn't support 'enable_citations' option"

OpenAI SDK Usage

Blocking (Single-Search)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.search.brave.com/res/v1",
    api_key="your-brave-api-key",
)

response = client.chat.completions.create(
    model="brave",
    messages=[{"role": "user", "content": "How does the James Webb Space Telescope work?"}],
    stream=False,
)
print(response.choices[0].message.content)

Streaming with Citations (Single-Search)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.search.brave.com/res/v1",
    api_key="your-brave-api-key",
)

stream = client.chat.completions.create(
    model="brave",
    messages=[{"role": "user", "content": "What are the current trends in renewable energy?"}],
    stream=True,
    extra_body={"enable_citations": True}
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Research Mode

from openai import AsyncOpenAI

client = AsyncOpenAI(
    base_url="https://api.search.brave.com/res/v1",
    api_key="your-brave-api-key",
)

stream = await client.chat.completions.create(
    model="brave",
    messages=[{"role": "user", "content": "Compare quantum computing approaches"}],
    stream=True,
    extra_body={
        "enable_research": True,
        "research_maximum_number_of_iterations": 3,
        "research_maximum_number_of_seconds": 120
    }
)

async for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Response Format

Blocking Response (stream=false, single-search only)

Standard OpenAI-compatible JSON:

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "choices": [{"message": {"role": "assistant", "content": "The James Webb Space Telescope works by..."}, "index": 0, "finish_reason": "stop"}],
  "usage": {"prompt_tokens": 10, "completion_tokens": 50, "total_tokens": 60}
}

Streaming Response

SSE response with OpenAI-compatible chunks:

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":"Based on"},"index":0}]}

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":" recent research"},"index":0}]}

data: [DONE]

Streaming Tags by Mode

Single-Search (with enable_citations=true)

Tag Purpose
\x3Ccitation> Inline citation references
\x3Cusage> JSON cost/billing data

Research Mode

Tag Purpose Keep?
\x3Cqueries> Generated search queries Debug
\x3Canalyzing> URL counts (verbose) Debug
\x3Cthinking> URL selection reasoning Debug
\x3Cprogress> Stats: time, iterations, queries, URLs analyzed, tokens Monitor
\x3Cblindspots> Knowledge gaps identified Yes
\x3Canswer> Final synthesized answer (only the final answer is emitted; intermediate drafts are dropped) Yes
\x3Cusage> JSON cost/billing data (included at end of streaming response) Yes

Usage Tag Format

The \x3Cusage> tag contains JSON-stringified cost and token data:

\x3Cusage>{"X-Request-Requests":1,"X-Request-Queries":8,"X-Request-Tokens-In":15000,"X-Request-Tokens-Out":2000,"X-Request-Requests-Cost":0.005,"X-Request-Queries-Cost":0.032,"X-Request-Tokens-In-Cost":0.075,"X-Request-Tokens-Out-Cost":0.01,"X-Request-Total-Cost":0.122}\x3C/usage>

Use Cases

  • Chat interface integration: Drop-in OpenAI SDK replacement with web-grounded answers. Set base_url="https://api.search.brave.com/res/v1".
  • Deep research / comprehensive topic research: Use research mode (enable_research=true) for complex questions needing multi-source synthesis (e.g., "Compare approaches to nuclear fusion").
  • OpenAI SDK drop-in: Same SDK, same streaming format — just change base_url and api_key. Works with both sync and async clients.
  • Cited answers: Enable enable_citations=true in single-search mode for inline citation tags, or use research mode which automatically includes citations in its answer.

Notes

  • Timeout: Set client timeout to at least 30s for single-search, 300s (5 min) for research
  • Single message: The messages array must contain exactly 1 user message
  • Cost monitoring: Parse the \x3Cusage> tag from streaming responses to track costs
Usage Guidance
This skill appears to call Brave Search's Answers API and will need a Brave API key to work, but the skill's metadata does not declare any required credentials — that mismatch is the main red flag. Before installing: (1) Confirm you trust the skill owner and that the skill metadata is corrected to declare the required BRAVE_SEARCH_API_KEY (or similar) so you know what secret the skill will use. (2) Use a limited-scope or dedicated Brave API key (not a shared or long-lived global secret) and verify billing/quotas on the Brave dashboard. (3) Understand that user prompts and any context you provide will be sent to api.search.brave.com (research mode streams more and runs multiple queries), so avoid sending sensitive data. (4) If you need higher assurance, ask the publisher to update the skill manifest to list required env vars (primaryEnv) and include a homepage/source so you can verify provenance. If you can't verify those, treat the skill as untrusted.
Capability Analysis
Type: OpenClaw Skill Name: answers Version: 1.0.0 The skill bundle is designed to integrate with the Brave Search API for AI-grounded answers. All instructions and code examples in `SKILL.md` are focused on demonstrating how to interact with the legitimate `https://api.search.brave.com` endpoint, requiring a user-provided API key. There is no evidence of data exfiltration beyond the stated purpose, malicious command execution, persistence mechanisms, obfuscation, or prompt injection attempts against the agent with harmful objectives. The content is purely functional and descriptive for using an external web service.
Capability Assessment
Purpose & Capability
The name/description claim AI-grounded answers via an OpenAI-compatible /chat/completions endpoint, and the SKILL.md shows exactly that using https://api.search.brave.com/res/v1/chat/completions. Requiring network access to Brave Search is consistent with the stated purpose.
Instruction Scope
The SKILL.md stays within the stated scope: it provides example requests, parameters, and behaviors (single-search vs research mode). It instructs the agent to send user messages to a third-party API (Brave Search) and to include an API key header. It does not attempt to read local files or unrelated system state. Important: the docs explicitly require an API key and subscription token for Brave Search.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, so nothing is written to disk or installed — lowest install risk.
Credentials
The SKILL.md examples and auth notes require a Brave API key (e.g., X-Subscription-Token or Authorization: Bearer) and reference an environment variable BRAVE_SEARCH_API_KEY, but the skill metadata lists no required environment variables or primary credential. This mismatch is disproportionate and a metadata integrity issue: the skill will need a secret at runtime but doesn't declare it.
Persistence & Privilege
The skill is not always-enabled and does not request system persistence or modify other skills. Autonomous invocation is allowed (platform default) but not combined with other high-privilege requests.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install answers
  3. After installation, invoke the skill by name or use /answers
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Provides AI-grounded answers via the Brave Search /chat/completions API with single-search and research modes. - Supports fast single-search answers or iterative deep-research with citations. - Compatible with OpenAI SDK and works via cURL or Python. - Streaming and blocking response options for single-search; research mode requires streaming. - Citations available in single-search streaming; research mode outputs cited, synthesized answers. - Detailed parameters and error constraints for optimal usage provided in documentation.
Metadata
Slug answers
Version 1.0.0
License
All-time Installs 4
Active Installs 3
Total Versions 1
Frequently Asked Questions

What is Answers?

USE FOR AI-grounded answers via OpenAI-compatible /chat/completions. Two modes: single-search (fast) or deep research (enable_research=true, thorough multi-s... It is an AI Agent Skill for Claude Code / OpenClaw, with 328 downloads so far.

How do I install Answers?

Run "/install answers" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Answers free?

Yes, Answers is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Answers support?

Answers is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Answers?

It is built and maintained by 0xrichyrich (@0xrichyrich); the current version is v1.0.0.

💬 Comments