Model Rate Limiter for Openclaw

A request throttling utility designed to prevent AI models from exceeding provider API rate limits.

mazhimin-123
v1.0.0
Apr 14, 2026
0
774
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install model-rate-limiter

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install model-rate-limiter using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Model Rate Limiter?

The Model Rate Limiter is a specialized tool within the ecosystem of Openclaw Skills designed to manage and throttle AI model requests. It acts as a gatekeeper, ensuring that your automated workflows do not trigger rate-limiting errors from LLM providers like OpenAI or Anthropic. By utilizing a sliding window mechanism, it provides fine-grained control over how often your agent communicates with the cloud.

This skill is particularly valuable for developers who need to balance agent responsiveness with strict API quotas. It stores its operational state in a local JSON file, allowing for easy monitoring and real-time adjustments to throughput parameters without needing to restart the core agent process.

Model Rate Limiter Use Cases

  • Avoiding 429 Too Many Requests errors during complex coding tasks.
  • Managing API budgets by enforcing a maximum request frequency.
  • Testing how agents handle delayed responses or throttled environments.
  • Coordinating request volume for Openclaw Skills in multi-agent setups.

How Model Rate Limiter Works

  1. The skill intercepts the request flow and reads the rate-limit-state.json configuration file.
  2. It checks the enabled boolean; if false, the request bypasses the limiter immediately.
  3. If enabled, it purges all timestamps from the state file that are older than the specified windowMs.
  4. It compares the count of remaining valid timestamps against the maxPerMinute threshold.
  5. If the threshold is exceeded, the request is rejected with a suggested wait time; otherwise, a new timestamp is recorded and the request is authorized.

Model Rate Limiter Setup

To set up the rate limiter, navigate to your workspace and ensure the rate-limit-state.json file is present. You can initialize it with the following configuration:

{
  "enabled": true,
  "maxPerMinute": 5,
  "windowMs": 60000,
  "timestamps": []
}

You can toggle the limiter or adjust frequency via simple file edits or by instructing your agent to modify the JSON values within Openclaw Skills.

Model Rate Limiter Data Schema & Taxonomy

Attribute Type Description
enabled boolean Whether the rate limiting logic is active.
maxPerMinute number The maximum number of requests allowed per 60 seconds.
windowMs number The duration of the tracking window in milliseconds (default 60000).
timestamps array A collection of Unix timestamps representing recent requests.

Model Rate Limiter Advanced Features

  • Dynamic configuration: Change limits on-the-fly by modifying the JSON state.
  • Sliding window logic: Ensures more natural request spacing than fixed-block throttling.
  • Manual resets: Instantly clear request history by resetting the timestamps array to empty.
  • Automated integration: Triggers automatically when users mention keywords related to speed limits in Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*