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
| Component | Technology | Purpose |
|---|---|---|
| LLM | Gemini 2.5 Flash | Natural language understanding |
| Function Calling | Vertex AI | Tool execution |
| RAG | Vertex AI RAG Engine | Documentation search |
| Grounding | Google Search | Real-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
- User says: "Find BMW company"
- Agent detects: Keyword "find" + "company" =
search_companytool - Agent executes:
search_company(company_name="BMW") - API returns: Company data with Trust Score
- Agent responds: Formatted message with company info
🛠️ Available Tools
The agent has access to 6 specialized tools:
| Tool | Purpose | Example Trigger |
|---|---|---|
search_company | Find company in database | "Find BMW" |
get_trust_score | Get detailed Trust Score | "What's BMW's Trust Score?" |
list_companies | Show top employers | "Show top 10 companies" |
compare_companies | Compare two employers | "Compare BMW and Audi" |
run_analysis | Start new company analysis | "Analyze Spotify" |
get_company_reviews | Show 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-Keyheader - Rate Limited: 5 requests/minute for analysis tools
- Audit Logged: All tool calls are logged for security
🚀 Getting Started
Via Chat Widget
- Click the 💬 button in the dashboard
- Type your question in natural language
- 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.