Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.
Inngest Flow ControlSkill
Summary
Seven ways to throttle agent and background workloads — concurrency keys, throttling, rate limiting, debounce, singleton, priority and batching — with a decision guide that picks the right one.
Features
- Decision guide mapping plain-language intent to the right mechanism
- Explains that concurrency caps executing steps, not runs parked in sleep or wait
- Keyed concurrency for multi-tenant fairness and noisy-neighbour protection
- Account-scoped shared limits for provider quotas like OpenAI concurrency
- Throttling, rate limiting and debounce with working configuration for each
- Singleton in both skip and cancel mode
- Priority and event batching, plus a combined fair-AI-processing example
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
We're getting 429s from OpenAI across three different Inngest functions — add the right flow control.
Description
Concurrency, throttling, rate limiting, debounce and singleton all sound like the same thing, and picking the wrong one produces bugs that only show up under load. This Inngest skill opens with a decision guide that maps the sentence a developer actually says to the mechanism they need — "spread runs over time" is throttling, "block after N runs in a period" is rate limiting, "wait for activity to stop, then run once" is debounce — and that table alone resolves most of the confusion.
The key insight it teaches an agent. Inngest's concurrency limit caps executing steps, not function runs: a function parked in step.sleep() or step.waitForEvent() costs nothing against the limit. Agents that assume otherwise size their limits wrong and serialise workloads that did not need serialising.
Each mechanism gets a when-to-use and a working config. Concurrency, including keyed concurrency for multi-tenant fairness (key: "event.data.user_id", limit 1, to stop one customer starving the rest) and account-scoped shared limits — a single pool of, say, 60 concurrent OpenAI calls shared across every function in the account, which is the correct shape for a provider quota and hard to express any other way. Throttling for smoothing bursts. Rate limiting for hard caps. Debounce for collapsing rapid user actions. Singleton in both skip mode (protect the run in flight) and cancel mode (always use the latest event). Priority for making some runs jump the queue. Batching for grouping events. The skill closes with a combined example — fair AI processing under a provider quota — showing how these compose rather than treating each in isolation.
Where it earns its keep: OpenAI 429s, Stripe and HubSpot rate limits, duplicate work from event bursts, and per-tenant fairness. TypeScript examples; the concepts carry to the Python and Go SDKs.
Related Skills
Inngest's durable-execution playbook as an agent skill — steps and memoisation, event and cron triggers, idempotency, cancellation, retries and non-retriable errors.
Temporal's official skill for building durable workflows — SDK patterns across seven languages, plus the determinism rules that decide whether a workflow survives a replay.
Expo's official skill for building native-feeling screens: Apple HIG styling, semantic colors, SF Symbols, native controls, Reanimated, blur and liquid glass.