exa-webhooks-events
Exaのスケジュール監視とコンテンツアラート機能を使用して、イベント駆動型のインテグレーションを構築できます。コンテンツモニタリング、競合情報の収集パイプライン、またはExaを用いたスケジュール検索の自動化を構築する際に活用してください。「exa monitor」「exa content alerts」「exa scheduled search」「exa event-driven」「exa notifications」といったフレーズで起動します。
description の原文を見る
Build event-driven integrations with Exa using scheduled monitors and content alerts. Use when building content monitoring, competitive intelligence pipelines, or scheduled search automation with Exa. Trigger with phrases like "exa monitor", "exa content alerts", "exa scheduled search", "exa event-driven", "exa notifications".
SKILL.md 本文
Exa Webhooks & Events
概要
Exa ニューラル検索を中心としたイベント駆動型インテグレーションを構築します。Exa はシンクロナスな検索 API(ネイティブ webhook なし)であるため、このスキルは非同期パターンの構築をカバーしています。searchAndContents を使用したスケジュール設定されたコンテンツ監視、findSimilarAndContents を使用した類似性アラート、日付フィルタを使用した新しいコンテンツ検出、webhook スタイルの通知配信などが含まれます。
前提条件
exa-jsがインストールされ、EXA_API_KEYが設定されていること- キューシステム(BullMQ/Redis)またはcronスケジューラ
- 通知用の webhook エンドポイント
イベントパターン
| パターン | メカニズム | ユースケース |
|---|---|---|
| コンテンツ監視 | startPublishedDate を使用したスケジュール設定 searchAndContents | 新しい記事アラート |
| 類似性アラート | 定期的な findSimilarAndContents + 差分 | 競合監視 |
| コンテンツ変更 | 再検索 + 結果セット比較 | 更新追跡 |
| リサーチダイジェスト | スケジュール設定された answer + メール/Slack | 日次ブリーフィング |
手順
ステップ 1: コンテンツ監視サービス
import Exa from "exa-js";
import { Queue, Worker } from "bullmq";
const exa = new Exa(process.env.EXA_API_KEY!);
interface SearchMonitor {
id: string;
query: string;
webhookUrl: string;
lastResultUrls: Set<string>;
intervalMinutes: number;
searchType: "auto" | "neural" | "keyword";
}
const monitorQueue = new Queue("exa-monitors", {
connection: { host: "localhost", port: 6379 },
});
async function createMonitor(config: Omit<SearchMonitor, "lastResultUrls">) {
await monitorQueue.add("check-search", config, {
repeat: { every: config.intervalMinutes * 60 * 1000 },
jobId: config.id,
});
console.log(`Monitor created: ${config.id} (every ${config.intervalMinutes} min)`);
}
ステップ 2: 監視される検索の実行
const worker = new Worker("exa-monitors", async (job) => {
const monitor = job.data;
// 前回のチェック以降に公開された新しいコンテンツを検索
const results = await exa.searchAndContents(monitor.query, {
type: monitor.searchType || "auto",
numResults: 10,
text: { maxCharacters: 500 },
highlights: { maxCharacters: 300, query: monitor.query },
// 監視ウィンドウで公開されたコンテンツのみを検索
startPublishedDate: getLastCheckDate(monitor.id),
});
// 本当に新しい結果にフィルタリング
const newResults = results.results.filter(
r => !monitor.lastResultUrls?.has(r.url)
);
if (newResults.length > 0) {
await sendWebhook(monitor.webhookUrl, {
event: "exa.new_results",
monitorId: monitor.id,
query: monitor.query,
timestamp: new Date().toISOString(),
results: newResults.map(r => ({
title: r.title,
url: r.url,
snippet: r.text?.substring(0, 200),
highlights: r.highlights,
publishedDate: r.publishedDate,
score: r.score,
})),
});
// 追跡済み URL を更新
await updateLastResultUrls(monitor.id, newResults.map(r => r.url));
}
}, { connection: { host: "localhost", port: 6379 } });
ステップ 3: 類似性アラートシステム
async function monitorSimilarContent(
seedUrl: string,
webhookUrl: string,
checkIntervalHours = 24
) {
const results = await exa.findSimilarAndContents(seedUrl, {
numResults: 5,
text: { maxCharacters: 300 },
excludeSourceDomain: true,
// 前回のチェック期間のコンテンツのみを検索
startPublishedDate: new Date(
Date.now() - checkIntervalHours * 60 * 60 * 1000
).toISOString(),
});
if (results.results.length > 0) {
await sendWebhook(webhookUrl, {
event: "exa.similar_content_found",
seedUrl,
matchCount: results.results.length,
matches: results.results.map(r => ({
title: r.title,
url: r.url,
snippet: r.text?.substring(0, 200),
score: r.score,
})),
});
}
return results.results.length;
}
ステップ 4: リトライ機能付き Webhook 配信
async function sendWebhook(url: string, payload: any, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Exa-Event": payload.event,
},
body: JSON.stringify(payload),
});
if (response.ok) return;
console.warn(`Webhook ${response.status}: ${url}`);
} catch (error) {
if (attempt === maxRetries - 1) throw error;
}
await new Promise(r => setTimeout(r, 1000 * Math.pow(2, attempt)));
}
}
ステップ 5: 日次リサーチダイジェスト
async function generateDailyDigest(
topics: string[],
webhookUrl: string
) {
const digest = [];
for (const topic of topics) {
const results = await exa.searchAndContents(topic, {
type: "neural",
numResults: 3,
summary: { query: `Latest developments in: ${topic}` },
startPublishedDate: new Date(
Date.now() - 24 * 60 * 60 * 1000
).toISOString(),
});
digest.push({
topic,
articles: results.results.map(r => ({
title: r.title,
url: r.url,
summary: r.summary,
})),
});
}
await sendWebhook(webhookUrl, {
event: "exa.daily_digest",
date: new Date().toISOString().split("T")[0],
topics: digest,
});
}
エラーハンドリング
| 問題 | 原因 | ソリューション |
|---|---|---|
| レート制限された監視 | 同時チェックが多すぎる | 監視間隔をずらす |
| 空の結果 | 日付フィルタが狭すぎる | 48時間ウィンドウに拡張 |
| 重複アラート | URL 重複排除がない | 実行間で結果 URL を追跡 |
| Webhook 配信失敗 | エンドポイントがダウン | 指数バックオフでリトライ |
例
競合インテリジェンス監視の作成
await createMonitor({
id: "competitor-watch",
query: "AI code review tools launch announcement",
webhookUrl: "https://api.myapp.com/webhooks/exa-alerts",
intervalMinutes: 60,
searchType: "neural",
});
リソース
次のステップ
デプロイメント設定については、exa-deploy-integration を参照してください。
ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ
詳細情報
- 作者
- ComeOnOliver
- ライセンス
- MIT
- 最終更新
- 2026/5/11
Source: https://github.com/ComeOnOliver/skillshub / ライセンス: MIT
関連スキル
superpowers-streamer-cli
SuperPowers デスクトップストリーマーの npm パッケージをインストール、ログイン、実行、トラブルシューティングできます。ユーザーが npm から `superpowers-ai` をセットアップしたい場合、メールまたは電話でサインインもしくはアカウント作成を行いたい場合、ストリーマーを起動したい場合、表示されたコントロールリンクを開きたい場合、後で停止したい場合、またはソースコードへのアクセスなしに npm やランタイムの一般的な問題から復旧したい場合に使用します。
catc-client-ops
Catalyst Centerのクライアント操作・監視機能 - 有線・無線クライアントのリスト表示・フィルタリング、MACアドレスによる詳細なクライアント検索、クライアント数分析、時間軸での分析、SSIDおよび周波数帯によるフィルタリング、無線トラブルシューティング機能を提供します。MACアドレスやIPアドレスでのクライアント検索、サイト別やSSID別のクライアント数集計、無線周波数帯の分布分析、Wi-Fi信号の問題調査が必要な場合に活用できます。
ci-cd-and-automation
CI/CDパイプラインの設定を自動化します。ビルドおよびデプロイメントパイプラインの構築または変更時に使用できます。品質ゲートの自動化、CI内のテストランナー設定、またはデプロイメント戦略の確立が必要な場合に活用します。
shipping-and-launch
本番環境へのリリース準備を行います。本番環境へのデプロイ準備が必要な場合、リリース前チェックリストが必要な場合、監視機能の設定を行う場合、段階的なロールアウトを計画する場合、またはロールバック戦略が必要な場合に使用します。
linear-release-setup
Linear Releaseに向けたCI/CD設定を生成します。リリース追跡の設定、LinearのCIパイプライン構築、またはLinearリリースとのデプロイメント連携を実施する際に利用できます。GitHub Actions、GitLab CI、CircleCIなど複数のプラットフォームに対応しています。
tracking-application-response-times
API エンドポイント、データベースクエリ、サービスコール全体にわたるアプリケーションのレスポンスタイムを追跡・最適化できます。パフォーマンス監視やボトルネック特定の際に活用してください。「レスポンスタイムを追跡する」「API パフォーマンスを監視する」「遅延を分析する」といった表現で呼び出せます。