Upstash · Concept
Analytics
Upstash Agent Analytics tracks visits from five AI agents in a Next.js app. It stores provider and page-path counts in Redis, with automatic expiration and query support.
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
@upstash/agent-analytics@upstash/redisRedis SearchaggregateBytimeseriesgetIndexNext.jsAI Tracking