Skip to content

jamnyjakub700-cloud/aeo-agent

Repository files navigation

AEO Agent — AI Search Visibility Monitor

Autonomous agent that measures and improves your brand's visibility in AI-powered search engines (ChatGPT, Perplexity, Claude, Gemini, Google AI Overviews).

What is AEO?

Answer Engine Optimization is the practice of optimizing web content to be discovered, understood, and cited by AI search systems. Unlike traditional SEO that targets PageRank and SERP positions, AEO focuses on:

  • Entity recognition — AI models correctly identifying your brand
  • Citation probability — AI models citing your website as a source
  • Answer inclusion — appearing in AI-generated answers to relevant queries
  • Knowledge accuracy — AI models having correct information about you

Architecture

18 tools across 5 categories:

VISIBILITY (4)          ENTITY (3)              CONTENT (4)
├── Multi-model test    ├── Entity recognition  ├── Content AI analysis
├── Citation tracking   ├── Knowledge graph     ├── Schema audit
├── AI Overview check   └── Entity relationships├── llms.txt optimization
└── Competitor benchmark                        └── FAQ generation

STRATEGY (3)            ACTION (4)
├── AEO improvements    ├── GitHub PR creation
├── Citation opps       ├── HTML report generation
└── Query patterns      ├── Discord notifications
                        └── Structured data generation

Configuration

Copy .env.example to .env.local and fill in your values:

cp .env.example .env.local

Required Environment Variables

Variable Description Example
ANTHROPIC_API_KEY Anthropic API key (agent model) sk-ant-...
OPENAI_API_KEY OpenAI API key (multi-model testing) sk-...
GOOGLE_GENERATIVE_AI_API_KEY Google AI key (multi-model testing) AI...
SITE_URL Your website URL https://mystore.com
COMPANY_NAME Your brand name Acme Electronics

Recommended Environment Variables

Variable Description Example
INDUSTRY_CONTEXT Your industry (used in AI prompts) e-commerce electronics
TARGET_KEYWORDS Comma-separated keywords to monitor best laptops, gaming PC
COMPETITORS Comma-separated competitor domains bestbuy.com, newegg.com
GITHUB_REPO GitHub repo for PR creation (owner/repo) acme/website
GITHUB_TOKEN GitHub PAT with repo scope ghp_...
DISCORD_WEBHOOK_URL Discord webhook for notifications https://discord.com/api/webhooks/...
GSC_* Google Search Console OAuth credentials See .env.example
BLOB_READ_WRITE_TOKEN Vercel Blob for persistent storage vercel_blob_...

Configuration Examples

E-commerce store:

COMPANY_NAME=TechShop
SITE_URL=https://techshop.com
INDUSTRY_CONTEXT=e-commerce consumer electronics
TARGET_KEYWORDS=best laptops 2026, gaming monitors, wireless headphones
COMPETITORS=bestbuy.com, newegg.com, amazon.com

SaaS company:

COMPANY_NAME=DataFlow
SITE_URL=https://dataflow.io
INDUSTRY_CONTEXT=B2B SaaS data analytics platform
TARGET_KEYWORDS=data analytics platform, business intelligence tool
COMPETITORS=tableau.com, looker.com, metabase.com

Stack

  • Runtime: Next.js (App Router) on Vercel
  • Agent: Vercel AI SDK v6 (ToolLoopAgent)
  • Model: Claude Sonnet 4 via @ai-sdk/anthropic
  • Multi-model testing: @ai-sdk/openai (GPT), @ai-sdk/google (Gemini)
  • Notifications: Discord webhooks
  • Code changes: GitHub PRs via REST API
  • Data: Google Search Console (OAuth), Google Analytics 4

Tools

Visibility

Tool Description
testMultiModelVisibility Query Claude/GPT/Gemini with industry questions, analyze mentions and citations
trackCitationSources Historical analysis of cited sources, trends, brand mention rate
analyzeAIOverviewPresence Check Google AI Overviews for brand presence
benchmarkCompetitorsAEO Compare visibility against competitors

Entity & Knowledge

Tool Description
analyzeEntityRecognition Test if AI models know your brand (identity, pricing, industry)
auditKnowledgeGraph Check Wikidata, Google KP, Crunchbase, Wikipedia presence
mapEntityRelationships Map brand connections to industry topics

Content Optimization

Tool Description
analyzeContentForAI Score page content for AI citability (8 criteria, 0-100)
auditSchemaForAI Check JSON-LD for AI-relevant types (FAQPage, Speakable, HowTo)
optimizeLlmsTxt Audit and optimize llms.txt for AI crawlers
generateFAQContent Generate FAQ pairs from real AI model questions with schema

Strategy

Tool Description
suggestAEOImprovements Prioritized improvements based on all collected data
identifyCitationOpportunities Find sources AI models trust, map citation paths
analyzeQueryPatterns Discover questions people ask AI about your industry

Action

Tool Description
createGitHubPR Create PRs with schema, FAQ, llms.txt fixes
writeAEOReport Generate HTML reports with scores and trend charts
notifyTeam Discord notifications with structured action items
generateStructuredData Generate JSON-LD (Organization, SoftwareApp, FAQ, HowTo, Speakable)

Cron Schedule

Schedule Job What it does
Weekly Weekly Visibility Multi-model test, citation tracking, competitor benchmark, Discord report
Monthly Monthly Deep Analysis Full audit (entity, schema, content, knowledge graph), auto-fix PR, HTML report

Quick Start

npm install
cp .env.example .env.local
# Fill in your API keys and site configuration
npm run dev

Open http://localhost:3000 and use the quick actions or type a custom prompt.

How It Works

  1. Weekly pulse — Tests AI model visibility, tracks citations, benchmarks competitors. Reports via Discord.
  2. Monthly deep dive — Full audit of entity recognition, knowledge bases, content structure, schema markup. Auto-fixes what it can and creates a single PR. Generates HTML report. Escalates human-required actions with clear instructions.
  3. Interactive chat — Use the web UI for ad-hoc queries and analysis.

License

MIT

About

AI Search Visibility Monitor — measures and improves brand visibility in ChatGPT, Perplexity, Claude, Gemini. 22 tools, multi-model testing. Built with Vercel AI SDK v6.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages