Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

exa-rate-limits利率限制

Agent Skill

exa-rate-limits 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

517

周安装

22

GitHub Stars

2,095

下载量

181
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:exa-rate-limits(利率限制)
来源仓库:https://github.com/jeremylongshore/claude-code-plugins-plus-skills
仓库路径:skills/exa-rate-limits
安装命令:
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill exa-rate-limits
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill exa-rate-limits

简介

exa-rate-limits 提供 Exa API 的速率限制处理机制,帮助开发者应对 HTTP 429 错误并优化查询频率。

  • 适用于需要控制搜索请求频率、避免服务中断或进行高并发查询调优的场景。
  • 通过配置 QPS 阈值和重试策略,实现平滑调用 Exa 搜索接口。
  • 安装前需确认是否已设置 EXA_API_KEY,并检查项目对异步处理和错误捕获的支持情况。
  • 建议结合缓存机制和监控工具使用,以维持系统稳定性。

SKILL.md

Exa Rate Limits

Overview

Handle Exa API rate limits gracefully. Default limit is 10 QPS (queries per second) across all endpoints. Rate limit errors return HTTP 429 with a simple {"error": "rate limit exceeded"} response. For higher limits, contact hello@exa.ai for Enterprise plans.

Rate Limit Structure

EndpointDefault QPSNotes
/search10Most endpoints share this limit
/find-similar10Same pool as search
/contents10Same pool
/answer10Same pool
Research APIConcurrent task limitLong-running operations

Prerequisites

  • exa-js SDK installed
  • Understanding of async/await patterns

Instructions

Step 1: Exponential Backoff with Jitter

import Exa from "exa-js";

const exa = new Exa(process.env.EXA_API_KEY);

async function withBackoff<T>(
  operation: () => Promise<T>,
  config = { maxRetries: 5, baseDelayMs: 1000, maxDelayMs: 32000 }
): Promise<T> {
  for (let attempt = 0; attempt <= config.maxRetries; attempt++) {
    try {
      return await operation();
    } catch (err: any) {
      const status = err.status || err.response?.status;
      // Only retry on 429 (rate limit) and 5xx (server errors)
      if (status !== 429 && (status < 500 || status >= 600)) throw err;
      if (attempt === config.maxRetries) throw err;

      // Exponential delay with random jitter to prevent thundering herd
      const exponentialDelay = config.baseDelayMs * Math.pow(2, attempt);
      const jitter = Math.random() * 500;
      const delay = Math.min(exponentialDelay + jitter, config.maxDelayMs);

      console.log(`[Exa] ${status} — retry ${attempt + 1}/${config.maxRetries} in ${delay.toFixed(0)}ms`);
      await new Promise(r => setTimeout(r, delay));
    }
  }
  throw new Error("Unreachable");
}

// Usage
const results = await withBackoff(() =>
  exa.searchAndContents("AI research", { numResults: 5, text: true })
);

Step 2: Request Queue with Concurrency Control

import PQueue from "p-queue";

// Limit to 8 concurrent requests (under the 10 QPS limit)
const exaQueue = new PQueue({
  concurrency: 8,
  interval: 1000,    // per second
  intervalCap: 10,   // max 10 per interval (matches Exa's QPS limit)
});

async function queuedSearch(query: string, opts: any = {}) {
  return exaQueue.add(() => exa.searchAndContents(query, opts));
}

// Batch many queries safely
async function batchSearch(queries: string[]) {
  const results = await Promise.all(
    queries.map(q => queuedSearch(q, { numResults: 5, text: true }))
  );
  return results;
}

Step 3: Adaptive Rate Limiter

class AdaptiveRateLimiter {
  private currentDelay = 100; // ms between requests
  private minDelay = 50;
  private maxDelay = 5000;
  private consecutiveSuccesses = 0;
  private lastRequestTime = 0;

  async execute<T>(fn: () => Promise<T>): Promise<T> {
    const now = Date.now();
    const elapsed = now - this.lastRequestTime;
    if (elapsed < this.currentDelay) {
      await new Promise(r => setTimeout(r, this.currentDelay - elapsed));
    }

    try {
      this.lastRequestTime = Date.now();
      const result = await fn();
      this.consecutiveSuccesses++;

      // Speed up after 10 consecutive successes
      if (this.consecutiveSuccesses >= 10) {
        this.currentDelay = Math.max(this.minDelay, this.currentDelay * 0.8);
        this.consecutiveSuccesses = 0;
      }
      return result;
    } catch (err: any) {
      if (err.status === 429) {
        // Slow down on rate limit
        this.currentDelay = Math.min(this.maxDelay, this.currentDelay * 2);
        this.consecutiveSuccesses = 0;
        console.log(`[Exa] Rate limited. New delay: ${this.currentDelay}ms`);
      }
      throw err;
    }
  }
}

const limiter = new AdaptiveRateLimiter();

// Combine with backoff
const results = await withBackoff(() =>
  limiter.execute(() => exa.search("query", { numResults: 5 }))
);

Step 4: Batch Processing with Rate Awareness

async function processBatch(
  queries: string[],
  batchSize = 5,
  delayBetweenBatches = 1000
) {
  const allResults = [];

  for (let i = 0; i < queries.length; i += batchSize) {
    const batch = queries.slice(i, i + batchSize);

    // Process batch concurrently
    const batchResults = await Promise.all(
      batch.map(q => withBackoff(() =>
        exa.searchAndContents(q, { numResults: 3, text: true })
      ))
    );
    allResults.push(...batchResults);

    // Pause between batches to stay under rate limit
    if (i + batchSize < queries.length) {
      await new Promise(r => setTimeout(r, delayBetweenBatches));
    }

    console.log(`Processed ${Math.min(i + batchSize, queries.length)}/${queries.length}`);
  }

  return allResults;
}

Error Handling

IssueCauseSolution
429 errorsExceeding 10 QPSImplement backoff + queue
Burst rejectedToo many simultaneous requestsUse p-queue with intervalCap
Batch job failuresNo delay between batchesAdd delayBetweenBatches
Inconsistent throttlingNo jitter in retryAdd random jitter to prevent thundering herd

Examples

Simple Retry Wrapper

async function retrySearch(query: string, maxRetries = 3) {
  for (let i = 0; i <= maxRetries; i++) {
    try {
      return await exa.search(query, { numResults: 5 });
    } catch (err: any) {
      if (err.status !== 429 || i === maxRetries) throw err;
      await new Promise(r => setTimeout(r, 1000 * Math.pow(2, i)));
    }
  }
}

Resources

Next Steps

For security configuration, see exa-security-basics.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.59%
按下载量换算70

Claude

30.14%
按下载量换算55

Cursor

18.26%
按下载量换算33

Gemini CLI

9.38%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills