Category: Knowledge Aggregation · Execution Model: Deterministic, Batch-Oriented, Append-Only
The Category Trends Agent aggregates normalized experiential events into weekly, city-level category trend metrics. It transforms individual session-level signals into macro indicators of category momentum, pricing behavior, attendance density, and growth rate. These aggregated signals serve as a core input for downstream learning, geospatial heat mapping, demand pooling, and strategic expansion decisions.
ISODate
{
"success": "boolean",
"message": "string",
"inserted": "number"
}
Reads from events_normalized collection
Writes CategoryTrend documents to category_trends collection
If no normalized events are found for the aggregation window, the agent exits successfully without writing any records. If database access fails or aggregation errors occur, the agent returns a 500 response and no partial trend documents are persisted.
{
"persistence": [
"events_normalized",
"category_trends"
],
"aggregationRules": [
"Weekly window (startOfWeek → endOfWeek)",
"Grouping key = category + city",
"Append-only trend records"
]
}
curl -X POST https://api.whook.ai/v1/agent/trends/run \
-H "Content-Type: application/json"