Upstash · Concept
analytics
Upstash Agent Analytics records visits from five known AI agents in a Next.js app. It stores the provider and page path in Redis, then lets you view or query the counts.
Last updated
Syntax
new AgentAnalytics({ redis, retention });
await analytics.track(request);
await analytics.query.getIndex();
await analytics.query.aggregateBy({ field, since });
await analytics.query.timeseries({ since, groupBy });In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
RedisRedis SearchNext.jsaggregateBytimeseriesgetIndex