Skip to main content

AI Agent Overview

The Sentry Analytics AI Agent ("Вартовий" - Guardian in Ukrainian) is an intelligent assistant powered by Google Gemini 2.5 Flash with Function Calling capabilities.

🤖 What is the AI Agent?

The AI Agent is a conversational interface that can:

  • Search companies in our database
  • Retrieve Trust Scores with detailed breakdowns
  • Compare employers side-by-side
  • Start analysis for new companies (Magic Search)
  • Show reviews filtered by sentiment
  • Answer questions about the platform

🧠 Technology Stack

ComponentTechnologyPurpose
LLMGemini 2.5 FlashNatural language understanding
Function CallingVertex AITool execution
RAGVertex AI RAG EngineDocumentation search
GroundingGoogle SearchReal-time web information

🔧 How It Works

User Message → Gemini 2.5 → Function Detection → Tool Execution → Response

Keywords detected?
↓ ↓
Yes: Tool Call No: Direct Answer

Execute Tool (API call)

Format Response

Example Flow

  1. User says: "Find BMW company"
  2. Agent detects: Keyword "find" + "company" = search_company tool
  3. Agent executes: search_company(company_name="BMW")
  4. API returns: Company data with Trust Score
  5. Agent responds: Formatted message with company info

🛠️ Available Tools

The agent has access to 6 specialized tools:

ToolPurposeExample Trigger
search_companyFind company in database"Find BMW"
get_trust_scoreGet detailed Trust Score"What's BMW's Trust Score?"
list_companiesShow top employers"Show top 10 companies"
compare_companiesCompare two employers"Compare BMW and Audi"
run_analysisStart new company analysis"Analyze Spotify"
get_company_reviewsShow sample reviews"Show BMW reviews"

→ See Tools Reference for complete documentation.

🔍 Auto-Detection

The agent automatically identifies when to use tools based on keywords:

English Keywords

  • Search: company, employer, find, search, look for
  • Trust Score: trust score, rating, score, reliability
  • Compare: compare, versus, vs, battle
  • Analysis: analyze, scrape, collect data
  • Reviews: reviews, feedback, opinions

Ukrainian Keywords

  • Пошук: компанія, роботодавець, знайди, пошук
  • Trust Score: траст скор, рейтинг, оцінка
  • Порівняння: порівняй, проти, vs
  • Аналіз: проаналізуй, збери дані
  • Відгуки: відгуки, коментарі

💬 Chat Widget

The AI Agent is accessible via a floating chat button (💬) in the bottom-right corner of the dashboard.

Features

  • Multi-language support: English, Ukrainian, German
  • Conversation history: Context maintained across messages
  • Markdown rendering: Tables, code blocks, lists
  • Tool status visualization: Pizza Tracker shows active tools

📊 Pizza Tracker

When the agent uses tools, the Pizza Tracker shows real-time progress:

🔍 search_company → Searching for "BMW"...
✅ Found: BMW (Trust Score: 71)

The tracker displays:

  • Tool name being executed
  • Parameters passed
  • Execution status (pending/complete)
  • Result summary

🔐 Security

  • API Key Required: Agent tool endpoints require X-API-Key header
  • Rate Limited: 5 requests/minute for analysis tools
  • Audit Logged: All tool calls are logged for security

🚀 Getting Started

Via Chat Widget

  1. Click the 💬 button in the dashboard
  2. Type your question in natural language
  3. Agent will detect intent and execute appropriate tools

Via API

curl -X POST https://sentryanalytic.com/api/ai/chat \
-H "Content-Type: application/json" \
-d '{
"message": "Find BMW company",
"language": "auto"
}'

📝 Response Format

{
"response": "BMW is a German automotive company with a Trust Score of 71/100...",
"status": "ok",
"grounded": false,
"rag_used": false,
"tools_used": true,
"tool_calls": [
{"name": "search_company", "args": {"company_name": "BMW"}}
]
}

See Tools Reference for detailed documentation of each tool.