Skip to main content
You can read counts, sums and averages over your documents and answers for each value of a key, kept current as you write, with no pipeline. You declare a group once on a namespace and read its rows when you want them. as_of on the rows says how current they are. Teams ask for the same dashboard numbers again and again:
  • “frustrated conversations by plan, this month”
  • “refund requests for each merchant category”
  • “average time to first reply for each region”
The usual solution is a warehouse job over an export. A group instead keeps exactly the aggregates that you declared, for each value of a key attribute, over your documents and over the answers of your judgments. A group is for reports only, and only you read it. It is not a query planner and no judgment reads a group, so to give a judgment the facts or answers of other documents, use a relation.

Create a group: frustrated conversations by plan

Each conversation in this example has the plan of its account and the month when it started, and a frustrated judgment answers for each conversation. Write the key that you want to report by as one attribute (here attributes.plan_month, with a value such as "pro/2026-09"), and create the group:
POST /v1/namespaces/acme%2Fsupport/groups
The bound 0.7 is a starting value, so measure it against your outcomes. The create returns 202 with the group’s status building, and the response has the group’s group_build job:
  • The job counts what the namespace already holds, including the documents written immediately before the create, and judges nothing.
  • When the job is done, the group’s status is ready.
  • After that, the group counts each change at most about one hour after you write it.
Brussle returns the group if you send the same create again. It returns conflict when a different group already has the name, with different settings or inherited from a template. To read the rows, send a get:
GET /v1/namespaces/acme%2Fsupport/groups/frustration_by_plan
The rows come with the largest count first. A value is null when no document in the row has a number at that path. The namespace’s Groups tab in the dashboard shows a chart of the largest key values and lists each row beside the chart.

What a group keeps

count_where reads the answers of one judgment, which must be active and on_change. That judgment can read other documents through relations, and Brussle counts its answers in the same way. It must not combine parts or have features, because Brussle counts each answer as the judgment gave it, and the p of those judgments is computed only when you read it. A judgment that chooses among a blocking relation’s candidates (options.from) is counted only by whether its value is none_of_the_above. For example, this group counts the payments that settled any invoice, by month:
Brussle refuses any other condition on that value, such as a specific invoice id, with invalid_request. A group also limits the later versions of the judgment that it counts. You cannot activate a version that combines parts or has features, nor a version that chooses among candidates unless the group counts only whether the value is none_of_the_above. Brussle refuses such an activation with conflict, and details.readers names the group, such as ["group by_plan"]. Delete the group first, or count those answers with a query. A group adds one level to the chain of answer reads, which is three deep at most, so a group cannot count a judgment that reads answers three deep. Brussle refuses that group with invalid_request, and details.chain names the chain from the group, such as ["group by_portfolio", "portfolio_risk", "account_risk", "conversation_risk", "message_tone"]. Later, Brussle refuses a version of the counted judgment that would take the group past three levels with conflict, and details.readers names the group. A group never adds or averages a raw probability and only counts probabilities by a bound or a named threshold, so the numbers that you read are the numbers that you would query on. A group keeps 8 paths at most, across its aggregates and count_where.

Which answers count

count_where counts each document’s latest answer that has numbers, and does not read freshness:
  • A pending or stale answer counts, with its stored numbers.
  • An answer from an earlier version counts too. After you activate a new version, an answer from the earlier version reads stale with stale_reason older_version, and the group counts it until Brussle judges the document again with the active version. A backfill does this for all documents, and shows its cost first.
  • A failed answer counts with the numbers of its last success.
  • A document with no successful answer yet does not count.
To count only the answers of one version, use a query that filters on answers.<judgment>.judgment_version (see old and new answers do not mix).

How current the rows are

The rows are exact at one position in the namespace’s history, and as_of is that position. The rows catch up at least once an hour, so they are at most about one hour behind your writes, and much less behind on busy namespaces.
  • A key value that no counted document has yet shows nothing until the rows catch up again.
  • Answers count when the rows catch up with them too, under the attributes of their document at that point. If you move a conversation to a different plan, for example, it counts under its new key from the update that moves it.

Change or delete a group

  • Add aggregates with PATCH and {"aggregate": {...}}. The group’s status is building while a new group_build job counts them, then ready.
    • An aggregate never changes its meaning, and you cannot remove it.
    • A group has one count_where at most.
    • To report something different, create a different group.
  • Change keep_keys with PATCH, and the change applies immediately.
  • Delete with DELETE, which judges nothing and changes no answers.

Limits

  • 8 groups for each namespace, including the groups that the namespace inherits from a template.
  • 1,000 live key values for each group. A key value is live while it has a document that agrees with match and was created within keep_keys. The default keep_keys is 90 days, so a key for a month or a day stops being live by itself.
    • Brussle refuses a key attribute with more live values than the limit at create, with invalid_request, so use a coarser key (such as a merchant category instead of a merchant).
    • A group that gets more live key values later has the warning group_over_cap, and its rows hold the 1,000 key values with the largest count until older values stop being live.
See limits for each number.

Report across every tenant

Create a group on a template prefix, such as acme/prod/*, and it exists in each namespace under the prefix, where each namespace counts only its own documents.
  • Read the rows of each tenant on the tenant’s own path, since the prefix path returns the definition with rows: null.
  • A tenant cannot change or delete a group that it inherits (conflict).
  • A template’s tenant summary publishes the bands of these groups as a document for each tenant, and never their values.

What a count tells you

A group counts what your documents and answers say, and does not say whether those answers are right, since count_where counts the answers of a judgment as they are. To know how often that judgment is right, post outcomes and measure it against them.

Cost

A group never calls an engine, so it adds no judgments to your bill. Brussle keeps its counts beside your data, where they use a small amount of storage that counts toward the namespace’s stored bytes.