Skip to content

Add rate limits example#52

Open
beanscg wants to merge 1 commit into
gethelio:mainfrom
beanscg:bean-labs-rate-limits-example
Open

Add rate limits example#52
beanscg wants to merge 1 commit into
gethelio:mainfrom
beanscg:bean-labs-rate-limits-example

Conversation

@beanscg

@beanscg beanscg commented Jun 8, 2026

Copy link
Copy Markdown

Closes #18.

Summary

  • add a standalone examples/rate-limits example with helio.yaml, README, package metadata, and start script
  • demonstrate a per-tool sliding-window limit for get_weather
  • include the accepted key: agent config shape for send_email, with a README/config note that current MCP requests do not carry agent identity and Helio falls back to the tool bucket at runtime
  • add the rate-limits example to the root README examples list

Verification

  • npx --yes pnpm@10.11.0 exec prettier --check README.md examples/rate-limits/README.md examples/rate-limits/helio.yaml examples/rate-limits/package.json examples/rate-limits/start.mjs
  • npx --yes pnpm@10.11.0 --filter @gethelio/proxy build
  • node packages/proxy/dist/cli.js validate -c examples/rate-limits/helio.yaml
  • node examples/rate-limits/start.mjs
  • local smoke: called get_weather four times through http://localhost:3000/mcp; the fourth call returned reason: "rate_limited" from rule limit-weather-lookups

Note: the config validator emits the expected warning for key: agent because the current runtime falls back to key: tool until MCP requests carry agent identity.

@beanscg beanscg requested a review from olivrg as a code owner June 8, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a rate-limits example config

1 participant