Limits and quotas
Cognipeer limits usage with one policy engine. A limit says who it applies to (a scope), which service it counts (a service), what it counts (requests, tokens, USD) and over what window (second to month). This page shows what you can combine, where to set it, how a refusal looks to the person who hits it, and a worked example you can copy and tune.
When to use
- You are rolling out an assistant to many people and want a ceiling per person, per team and for the workspace.
- A person reports "limit reached" and you need to know which limit refused them.
- You wonder whether a limit you have in mind (per role, per credit, per anonymous visitor) exists.
What a limit is made of
| Part | Choices |
|---|---|
| Scope (who it applies to) | Tenant (everyone in the workspace, or one project), Group, User, API token, Resource (one model, agent or index key), Provider, IP address. There is no role scope. |
| Service | LLM / Chat, Embeddings, Vector Store, Files, Agent Observability, Speech-to-Text, Text-to-Speech, OCR / Document AI, Image Generation, Moderation, Decision, Agent runs, Web Search, Knowledge (RAG), MCP tools, Reranker, Memory, Browser, Crawler, Guardrails, Jobs. |
| Window | Per second, minute, hour, day, month. |
| Unit | Requests, tokens, vectors, files, storage, and for some services pages, documents or minutes. Tokens exist for LLM, Embeddings and Agent runs. |
| Budget | A daily or monthly spend limit in USD, for the model services, Vector Store, Files and Agent Observability. Not for Agent runs, and not for Moderation. |
| Other caps | Per-request limits (such as maximum input tokens) and resource counts (such as maximum projects or agents). |
How windows count: a day is a 24-hour window and a month is a 30-day window, each counted from the first call, not from midnight or the first of the month.
A value of -1 means unlimited.
Where to configure
| What | Where |
|---|---|
| Limits for people, groups, projects, agent runs and the rest | Settings → IAM center → Limits. Changing needs admin on the iam service (owners and admins have it); with read access the tab is read-only. New limit opens the editor; the list shows who it applies to, the service, the project, the amounts, the priority and an Active switch. |
| A limit for one group | The same tab, with the scope set to Group. A group limit can apply to every project. |
| Limits of a portal (per person, per minute) | The portal's Limits tab. See Administering portals. |
| A budget for one conversation | The agent's Session budget. See Session budgets. |
| Operator settings outside the policy engine | Environment variables: see Configuration (agent run concurrency) and Rate limiting (requests per address). |
| Through the API | /api/quota/policies (owners and admins). Budgets are also on the Spend and Budgets API. |
A limit without a project can be inactive
A limit on a model, data or tool service must belong to a project. Saved without one, it is stored but never loaded, and the list shows an Inactive badge. Group limits, IP limits and every limit on Agent runs are different: they may apply to every project.
An edit takes effect at once on the server that saved it. Other servers read policies through a short cache (30 seconds by default, QUOTA_POLICY_CACHE_TTL_SECONDS), and a person's group memberships are read through a cache of about 15 seconds.
Which combination is possible
| You want | Possible? | How |
|---|---|---|
| A limit for the whole workspace | Yes | A policy with the Tenant scope. For model, data and tool services, set the project too. |
| A limit per person per day | Yes | Scope User, window per day, in requests, tokens or a USD budget. |
| A limit per group per day | Yes | Scope Group. By default every member gets the limit (counted per person). Choose the shared mode for one counter that the whole group draws from. |
| A limit per role | No | There is no role scope. Map the role to a group, for example from the identity provider (see Single sign-on, directory sign-in and group-based access), and limit the group. |
| A per-minute limit for people in a portal | Yes | The portal's Limits tab. Defaults: 30 messages and 20 file uploads per person per minute, 5 open answers at once, 200 conversations per person. A portal can only lower the platform maximum. |
| A daily limit for people in a portal | Yes, through agent runs | A portal chat counts as an agent run with the portal user as the caller. Set a user or group limit on the Agent runs service, per day. There is no daily setting on the portal itself. |
| A limit per conversation | Yes | The agent's Session budget in USD. See Session budgets. |
| A limit per agent | Yes | A limit with the Resource scope naming the agent, on the Agent runs service. It counts runs that start with that agent. A daily USD budget for one agent was not found. |
| A limit in credits | No | Credits are a billing balance on the hosted service, not a limit unit. Use requests, tokens or a USD budget. |
| A limit for anonymous visitors | Not applicable | Portals have no anonymous access: every request comes from a signed-in person or a verified embedded identity. |
How limits combine
- Priority. All matching limits are merged in ascending priority and the last one wins a conflict. The editor offers priority 0 to everyone, so ties are normal. On a tie, the more specific target wins: token over user, user over resource, resource over group, group over tenant. A person's own limit beats the group limit they belong to, whichever was written first.
- Tenant limits are ceilings over group limits. When a group limit changes a number, that number is held to the tenant limit for the same field. A group cannot hand out more than the workspace ceiling. Numbers a group did not touch are left alone. A shared group pool is the exception: it counts the whole group while tenant limits count each person, so a number in one cannot cap the other. An explicit user or token limit that outranks a group is not clamped either.
- IP limits are separate. They count the address, keep their own counters, and never loosen or tighten the other limits.
- Counters are kept per thing called. For model, data and tool services a counter is kept per model, index, bucket or provider key and per caller: a limit of 100 requests a day per person means 100 per model. The Agent runs service counts a caller's runs across all agents together, unless the limit names one agent.
- Agent runs do not fall back to global limits. A
globallimit does not reach Agent runs, or any service added after it. A limit on those services has to name them. - Agent spend counts toward model budgets. What an agent spends is debited from the same daily and monthly USD budgets as direct model calls, for the acting user. The check runs before the turn starts, and every priced model request is debited afterwards.
- A run costs one request up front. Its tokens are added when it ends, also when it fails. A person can overshoot a token limit by the runs already in flight when it was crossed; from the next run on they are refused.
How a reached limit looks
In a portal
| Limit reached | What the person sees |
|---|---|
| Messages or uploads per minute | "Too many requests. Wait a moment and try again." The response carries a Retry-After header. |
| Too many open answers (a second tab, a reload) | A message that they have several conversations open and should close one. |
| Conversations per person | 429 TOO_MANY_CONVERSATIONS: they delete older conversations to start new ones. |
| An agent-run limit or a spend limit | A usage-limit-reached message. |
| The conversation's session budget | The conversation stops. People can carry on only when the agent allows clients to change or continue past the budget. |
On the API
Refusals by a limit are 429 with an error of type rate_limit_error. The message says which counter refused:
| You read | It means |
|---|---|
Rate limit exceeded for requests perDay (101/100) | The caller's own counter: kind, window, used and limit. |
Group rate limit exceeded for … | A shared group pool. |
Agent rate limit exceeded for … | A limit narrowed to one agent. |
IP rate limit exceeded for … or IP range rate limit exceeded for … | An IP limit. |
code agent_quota_exceeded | An Agent runs limit, in requests or tokens. |
code spend_limit_exceeded, message Budget exceeded: $X of the $Y daily spend limit | The daily or monthly USD budget is used up. Model calls and agent runs share it. |
Rate limit enforcement unavailable | A limit is configured but its counter could not be read. The guard fails closed. |
402 with type budget_reached | The session's own budget, not a limit policy. |
A tenant that has never written an agent limit decides as before: if the policy store itself cannot be read, an agent run is let through and the error is logged.
On the hosted service the plan of the workspace adds its own limits (seats, requests per minute, monthly meters). They are not edited in the Limits tab, and a self-hosted installation does not measure them.
Example: a support assistant
An internal assistant for about 300 support staff, published in a portal. The values are examples to tune: start here, watch real use for a week, then adjust.
| Layer | Where | Example value | What it protects |
|---|---|---|---|
| Per-person rate in the portal | Portal Limits | Messages per minute 10 | A loop or a double-click storm. |
| Daily runs per person | Limits: Group support-staff, service Agent runs, per day, requests 200, tokens 500,000 | 200 runs and 500,000 tokens per person | One person using most of the day's capacity. |
| A higher tier | Limits: Group support-leads, Agent runs, per day, requests 600, priority 10 | 600 runs per person | Leads who handle the escalations. The higher priority makes it win for people who are in both groups. |
| Workspace ceiling | Limits: Tenant, Agent runs, per day, requests 400 | 400 runs per person at most | No group can hand out more than the ceiling. |
| Daily spend per person | Limits: Group support-staff, service LLM / Chat, daily USD 5 | 5 USD per person per day, per model | Cost, whatever the run size. With several models in use the budget applies to each model. |
| Conversation budget | The agent's Session budget | 0.50 USD, pause and wait | One conversation that never ends. |
What you get: a lead is held to 400 runs a day, because the tenant ceiling is lower than the 600 the group asks for. Raise the ceiling first if leads should have more. Support staff are refused after 200 runs or 500,000 tokens, and see the usage-limit message in the portal.
Check it before launch:
- Open Settings → IAM center → Limits and check that every row shows a project (or the label for all projects) and that none shows Inactive.
- Sign in as a test person in
support-staffand send messages until a limit refuses you. Expect the usage-limit message in the portal. - Call the agent from the API as the same person and read the
429message: it names the counter. - Open Settings → IAM center → Principals for a lead and confirm they are in
support-leads.
Common problems
| Symptom | Cause | Fix |
|---|---|---|
| A limit is saved but nothing is refused | It has no project and its service needs one, so it is Inactive | Set the project, or use a group, IP or Agent runs limit. |
| A group limit does not reach a person | They are not in the group, or the membership change is under 15 seconds old | Check the group's members. Directory groups follow the identity provider at each sign-in. |
| A lead is stopped lower than their group limit | The tenant limit is a ceiling over group limits | Raise the tenant limit, or give the person their own user limit. |
| A global limit does not stop agent runs | Agent runs do not fall back to global limits | Add a limit on the Agent runs service. |
| A daily limit resets at an odd hour | Windows run 24 hours from the first call | Expected. |
| Agents are refused by a spend limit although the model was not called directly | Agent spend counts toward the model budgets of the acting user | Raise the budget or reduce the spend. |
| A person is refused although every limit looks fine | The refusal came from a portal limit, a session budget or the plan | Read the message or code in the tables above. |
Next steps
- Session budgets: per-conversation budgets and tenant spend limits.
- Administering portals: the portal's own limits.
- Authorization (IAM): the IAM center, groups and roles.
- Single sign-on, directory sign-in and group-based access: feed groups from your identity provider so limits follow them.
- Spend and Budgets API.

