Get AegisAI running with Gemini 3.0 in 5 minutes.
git clone https://github.com/Thimethane/aegisai.git
cd aegisai
# Create environment file
cp .env.example .env
# Edit .env and add your Gemini API key
# GEMINI_API_KEY=your_gemini_3_api_key_here
Get your Gemini 3 API key:
.env filecd frontend
# Install dependencies
npm install
# Create frontend environment
echo "VITE_GEMINI_API_KEY=your_gemini_3_api_key_here" > .env.local
# Replace with your actual API key
# Start development server
npm run dev
๐ Open http://localhost:3000
You should see:
โ Gemini 3.0 Flash initialized
โ Model: gemini-3-flash-preview
โ Context window: 1,000,000 tokens
โ Deep Think mode: Available
โ Thought signatures: Enabled
After 4 seconds, console should show:
๐ Analyzing frame #1 with Gemini 3 Flash...
โ Analysis complete (1.2s)
{
incident: false,
type: "normal",
confidence: 92,
model_used: "gemini-3-flash-preview",
thinking_level: "low",
tokens_used: 456
}
Action: Sit normally, type on keyboard
Expected:
Action: Make gun gesture with hand
Expected (within 8 seconds):
Action: Trigger incident, then check console
Expected:
๐ง Escalating to Deep Think mode...
โ Model: gemini-3-pro-preview
โ Thinking level: high
โ Thought process: "Evaluating three scenarios: (1) Authorized...
(2) Potential threat... (3) False positive... Cross-referencing
historical patterns... Conclusion: Genuine threat detected."
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AEGISAI ๐ข SYSTEM ONLINE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ Scans: 42 โ ๐จ Incidents: 3 โ โก Load: 24% โ ๐ฏ ACTIVE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ โ
โ ๐น VIDEO FEED โ ๐ THREAT ANALYSIS CHART โ
โ โ โ
โ [Live Camera] โ ๐ก AI THOUGHT PROCESS โ
โ + HUD Overlay โ "Subject exhibits weapon posture... โ
โ โ Cross-referencing 45 min history" โ
โ โ โ
โ โ ๐ LATEST INFERENCE โ
โ โ Type: Violence | Conf: 94% โ
โ โ โ
โ โ ๐ฌ EVENT LOG โ
โ โ [12:34:56] ALRT @violence โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// frontend/src/constants.ts
export const CONFIG = {
// Use Gemini 3 Pro for all analysis
DEFAULT_MODEL: 'gemini-3-pro-preview',
// Enable extended reasoning
DEFAULT_THINKING_LEVEL: 'high',
// Show AI's thought process
ENABLE_THOUGHT_TRANSPARENCY: true,
// High-quality image analysis
MEDIA_RESOLUTION: 'high'
};
export const CONFIG = {
// Use faster, cheaper Gemini 3 Flash
DEFAULT_MODEL: 'gemini-3-flash-preview',
// Quick analysis
DEFAULT_THINKING_LEVEL: 'low',
// Standard quality
MEDIA_RESOLUTION: 'medium'
};
Prefer containers? One command deployment:
# Build and run
docker-compose up -d
# Check status
docker-compose ps
# View logs
docker-compose logs -f
Access at http://localhost:3000
Solution:
# Verify key is set
cat .env | grep GEMINI_API_KEY
# Ensure no extra quotes or spaces
GEMINI_API_KEY=AIzaSy... # Correct
GEMINI_API_KEY="AIzaSy..." # Wrong (remove quotes)
Solution:
chrome://settings/content/cameraSolution:
# Ensure using Gemini 3 models
# Check frontend/src/services/geminiService.ts
const MODEL_NAME = 'gemini-3-flash-preview'; // Correct
// NOT 'gemini-2.0-flash-exp' (old model)
Solution:
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
npm run dev
| Metric | Expected Value |
|---|---|
| Frame analysis time | 1-2 seconds |
| Accuracy | 90-94% |
| False positives | < 8% |
| Cost per hour (900 frames) | ~$0.18 |
| Memory usage | < 300MB |
| Metric | Expected Value |
|---|---|
| Frame analysis time | 3-5 seconds |
| Accuracy | 94-96% |
| False positives | < 5% |
| Cost per hour | ~$2.88 |
| Memory usage | < 400MB |
Before moving to production, verify:
// Use Flash model with low thinking
model: 'gemini-3-flash-preview',
thinkingLevel: 'low',
mediaResolution: 'medium'
// โ 3x faster, 6x cheaper
// Use Pro model with deep think
model: 'gemini-3-pro-preview',
thinkingLevel: 'high',
mediaResolution: 'high'
// โ 30% more accurate, better reasoning
// Let AegisAI automatically choose
// based on threat level and scene complexity
ENABLE_ADAPTIVE_MODEL_SELECTION: true
// โ Best balance of speed, cost, and accuracy
AegisAI is now running with Gemini 3.0
Next: Try the Full Stack Mode to unlock:
Questions? Check docs/ or open an issue
Happy Monitoring! ๐ก๏ธ