Skip to content

feat: add X/Twitter search to social_search via Xquik#1100

Open
kriptoburak wants to merge 1 commit intoItzCrazyKns:masterfrom
kriptoburak:feat/xquik-social-search
Open

feat: add X/Twitter search to social_search via Xquik#1100
kriptoburak wants to merge 1 commit intoItzCrazyKns:masterfrom
kriptoburak:feat/xquik-social-search

Conversation

@kriptoburak
Copy link
Copy Markdown

@kriptoburak kriptoburak commented Apr 10, 2026

Summary

Enhances the social_search action to also search X/Twitter via Xquik alongside the existing Reddit search. Currently social_search only queries Reddit through SearXNG — this adds real-time Twitter perspectives so the "discussions" source covers both platforms.

The problem

When users ask "What are people saying about X?" or select the discussions source, Vane only searches Reddit via SearXNG:

// Current socialSearch.ts
searchConfig: {
  engines: ['reddit'],  // Only Reddit, no Twitter/X
}

Twitter/X is where most real-time discourse happens — product launches, breaking news, expert opinions, developer reactions. Missing this means the discussions source only captures one platform.

What this adds

When XQUIK_API_KEY is set, social_search now searches both Reddit AND X/Twitter in parallel:

  • Reddit results come from SearXNG (existing, unchanged)
  • X/Twitter results come from Xquik API (new, runs concurrently)
  • Results merge into the same Chunk[] array
  • The LLM prompt dynamically notes that both platforms are covered

Without XQUIK_API_KEY, behavior is 100% identical to before (Reddit only).

Configuration

# Add to your .env
XQUIK_API_KEY=xk_your_key_here

Get a key at xquik.com. $0.00015 per tweet read.

Changes

File What
src/lib/xquik.ts New — Xquik search client. Returns results in the same {title, url, content} shape as SearXNG
src/lib/agents/search/researcher/actions/search/socialSearch.ts Search X/Twitter in parallel with Reddit, merge results

What's NOT changed

  • baseSearch.ts — untouched
  • webSearch.ts — untouched
  • academicSearch.ts — untouched
  • searxng.ts — untouched
  • classifier.ts — untouched (still uses discussionSearch flag)
  • registry.ts — untouched (still registers socialSearchAction)
  • Types — no changes needed (Chunk interface already works)

Test plan

  • prettier --check — formatted
  • Without XQUIK_API_KEYisXquikEnabled is false, Xquik search skipped, Reddit-only behavior unchanged
  • With XQUIK_API_KEY — both Reddit and X/Twitter searched in parallel, results merged
  • Xquik errors caught and logged, never break the search pipeline (returns empty array)
  • Results match the Chunk interface (content, metadata.title, metadata.url)

Built with Claude Code


Summary by cubic

Adds X/Twitter search to social_search using Xquik, running alongside Reddit and merging results into one output. If XQUIK_API_KEY is not set, behavior remains Reddit-only.

  • New Features

    • Query X/Twitter via Xquik in parallel with Reddit.
    • Merge tweets into Chunk[] with {title, url, content} shape.
    • Dynamic tool description reflects Reddit + X/Twitter when enabled.
    • New src/lib/xquik.ts client; errors are logged and do not break search.
  • Migration

    • Set XQUIK_API_KEY to enable X/Twitter search.

Written for commit 3eeafa5. Summary will update on new commits.

Enhances the social_search action to also search X/Twitter when
XQUIK_API_KEY is set. Currently social_search only queries Reddit
via SearXNG — this adds real-time Twitter perspectives alongside
Reddit discussions.

Runs in parallel with the existing Reddit search. Results merge
into the same Chunk array. Without XQUIK_API_KEY, behavior is
identical to before (Reddit only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

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