Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.
TypeScript aeoai-agentai-searchanswer-engine-optimizationbrand-monitoringchatgptclaudecopilotdockergeminigeogoogle-ai-overviewsgrokmcpnextjsopen-sourceperplexityseosupabasetypescript
import { PLATFORM_LABELS } from '@/config/platform-labels';
import type { AIPlatform, ObservedSearchQuery } from '@/types';
export function visibleSearchQueries(items: ObservedSearchQuery[] | undefined) {
return (items ?? []).filter((item) => typeof item.query === 'string' && item.query.trim());
}
export function formatSearchQuerySource(item: ObservedSearchQuery, fallbackPlatform: AIPlatform) {
const sourcePlatform = item.source_platform || fallbackPlatform;
const platformLabel = PLATFORM_LABELS[sourcePlatform] ?? sourcePlatform;
const engine = typeof item.engine === 'string' ? item.engine.trim() : '';
const isPerplexity = sourcePlatform.includes('perplexity');
return isPerplexity && engine ? `${platformLabel} - ${engine}` : platformLabel;
}