jeremylongshore

lindy-rate-limits

@jeremylongshore/lindy-rate-limits
jeremylongshore
1,004
123 forks
Updated 1/18/2026
View on GitHub

Manage and optimize Lindy AI rate limits. Use when hitting rate limits, optimizing API usage, or implementing rate limit handling. Trigger with phrases like "lindy rate limit", "lindy quota", "lindy throttling", "lindy API limits".

Installation

$skills install @jeremylongshore/lindy-rate-limits
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Pathplugins/saas-packs/lindy-pack/skills/lindy-rate-limits/SKILL.md
Branchmain
Scoped Name@jeremylongshore/lindy-rate-limits

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

skills list

Skill Instructions


name: lindy-rate-limits description: | Manage and optimize Lindy AI rate limits. Use when hitting rate limits, optimizing API usage, or implementing rate limit handling. Trigger with phrases like "lindy rate limit", "lindy quota", "lindy throttling", "lindy API limits". allowed-tools: Read, Write, Edit version: 1.0.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io

Lindy Rate Limits

Overview

Comprehensive guide to understanding and managing Lindy API rate limits.

Prerequisites

  • Lindy SDK installed
  • Understanding of your plan's limits
  • Access to usage dashboard

Rate Limit Tiers

Free Tier

ResourceLimitWindow
API Requests100/minRolling
Agent Runs50/dayDaily
Concurrent Runs2Instant

Pro Tier

ResourceLimitWindow
API Requests1000/minRolling
Agent Runs1000/dayDaily
Concurrent Runs10Instant

Enterprise

ResourceLimitWindow
API RequestsCustomRolling
Agent RunsUnlimited-
Concurrent Runs100+Instant

Instructions

Step 1: Check Current Usage

import { Lindy } from '@lindy-ai/sdk';

const lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });

async function checkUsage() {
  const usage = await lindy.usage.current();

  console.log('Current Usage:');
  console.log(`  API Requests: ${usage.apiRequests.used}/${usage.apiRequests.limit}`);
  console.log(`  Agent Runs: ${usage.agentRuns.used}/${usage.agentRuns.limit}`);
  console.log(`  Concurrent: ${usage.concurrent.active}/${usage.concurrent.limit}`);

  return usage;
}

Step 2: Implement Rate Limiter

class RateLimiter {
  private tokens: number;
  private lastRefill: number;
  private readonly maxTokens: number;
  private readonly refillRate: number; // tokens per second

  constructor(maxTokens: number, refillRate: number) {
    this.maxTokens = maxTokens;
    this.tokens = maxTokens;
    this.refillRate = refillRate;
    this.lastRefill = Date.now();
  }

  async acquire(): Promise<void> {
    this.refill();

    if (this.tokens < 1) {
      const waitTime = (1 - this.tokens) / this.refillRate * 1000;
      await new Promise(r => setTimeout(r, waitTime));
      this.refill();
    }

    this.tokens -= 1;
  }

  private refill(): void {
    const now = Date.now();
    const elapsed = (now - this.lastRefill) / 1000;
    this.tokens = Math.min(this.maxTokens, this.tokens + elapsed * this.refillRate);
    this.lastRefill = now;
  }
}

// Usage: 100 requests per minute
const limiter = new RateLimiter(100, 100 / 60);

async function rateLimitedRequest<T>(fn: () => Promise<T>): Promise<T> {
  await limiter.acquire();
  return fn();
}

Step 3: Handle Rate Limit Errors

async function withRetryOnRateLimit<T>(
  fn: () => Promise<T>,
  maxRetries = 5
): Promise<T> {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    try {
      return await fn();
    } catch (error: any) {
      if (error.code === 'LINDY_RATE_LIMITED') {
        const retryAfter = error.retryAfter || Math.pow(2, attempt);
        console.log(`Rate limited. Retrying in ${retryAfter}s...`);
        await new Promise(r => setTimeout(r, retryAfter * 1000));
        continue;
      }
      throw error;
    }
  }
  throw new Error('Max retries exceeded');
}

Output

  • Usage monitoring implementation
  • Client-side rate limiter
  • Retry logic for rate limit errors
  • Optimized API usage patterns

Error Handling

ScenarioStrategyCode
Near limitSlow downReduce request rate
Hit limitWaitRespect Retry-After
BurstQueueImplement request queue

Examples

Queue-Based Rate Limiting

class RequestQueue {
  private queue: Array<() => Promise<void>> = [];
  private processing = false;
  private requestsThisMinute = 0;
  private lastMinuteStart = Date.now();

  async enqueue<T>(fn: () => Promise<T>): Promise<T> {
    return new Promise((resolve, reject) => {
      this.queue.push(async () => {
        try {
          resolve(await fn());
        } catch (e) {
          reject(e);
        }
      });
      this.processQueue();
    });
  }

  private async processQueue(): Promise<void> {
    if (this.processing) return;
    this.processing = true;

    while (this.queue.length > 0) {
      if (Date.now() - this.lastMinuteStart > 60000) {
        this.requestsThisMinute = 0;
        this.lastMinuteStart = Date.now();
      }

      if (this.requestsThisMinute >= 100) {
        await new Promise(r => setTimeout(r, 1000));
        continue;
      }

      const request = this.queue.shift()!;
      this.requestsThisMinute++;
      await request();
    }

    this.processing = false;
  }
}

Resources

Next Steps

Proceed to lindy-security-basics for security configuration.

More by jeremylongshore

View all
rabbitmq-queue-setup
1,004

Rabbitmq Queue Setup - Auto-activating skill for Backend Development. Triggers on: rabbitmq queue setup, rabbitmq queue setup Part of the Backend Development skill category.

model-evaluation-suite
1,004

evaluating-machine-learning-models: This skill allows Claude to evaluate machine learning models using a comprehensive suite of metrics. It should be used when the user requests model performance analysis, validation, or testing. Claude can use this skill to assess model accuracy, precision, recall, F1-score, and other relevant metrics. Trigger this skill when the user mentions "evaluate model", "model performance", "testing metrics", "validation results", or requests a comprehensive "model evaluation".

neural-network-builder
1,004

building-neural-networks: This skill allows Claude to construct and configure neural network architectures using the neural-network-builder plugin. It should be used when the user requests the creation of a new neural network, modification of an existing one, or assistance with defining the layers, parameters, and training process. The skill is triggered by requests involving terms like "build a neural network," "define network architecture," "configure layers," or specific mentions of neural network types (e.g., "CNN," "RNN," "transformer").

oauth-callback-handler
1,004

Oauth Callback Handler - Auto-activating skill for API Integration. Triggers on: oauth callback handler, oauth callback handler Part of the API Integration skill category.