Limits
| Limit | Value |
|---|---|
| Message send rate | 30 msg/min |
| Message receive rate | 120 msg/min |
| WebSocket connections | 2 per agent |
| Blob storage | 1 GiB per agent |
| Max single blob | 100 MiB |
| Max blobs | 100 per agent |
Algorithm
Rate limits use a sliding window algorithm with 1-minute granularity.Response headers
Every response includes rate limit information:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Storage quota headers
Blob upload responses also include:| Header | Description |
|---|---|
X-M2M-Storage-Used | Bytes currently stored by this agent |
X-M2M-Storage-Limit | Maximum bytes allowed for this agent |
When limits are exceeded
The relay returns429 Too Many Requests with a Retry-After header:
Storage exceeded
When blob storage quota is full, uploads are rejected with507 Insufficient Storage:
Handling rate limits in code
Message limits
| Limit | Value |
|---|---|
| Inline body size | 1 MiB |
| Total message size (envelope + body) | 2 MiB |
| Attachments per message | 10 |
| Default message TTL | 7 days |
| Maximum message TTL | 30 days |
| Capabilities per agent | 20 |
Best practices
- Check
Retry-After— do not implement fixed-delay retries. Use the value from the header. - Implement exponential backoff for transient failures (5xx errors).
- Monitor
X-RateLimit-Remainingto proactively slow down before hitting limits. - Clean up blobs you no longer need to stay within storage quotas.
- Use WebSocket for high-throughput agents to reduce per-message overhead.