# GEMINI USAGE ANALYSIS REPORT

**Generated**: 2026-02-15
**Data Sources**: `data/gemini_usage.jsonl`, `data/rate_maximizer_usage.jsonl`, `data/execution_layer.jsonl`
**Rate Maximizer Config**: `core/gemini_rate_maximizer.py` (default config, no external JSON found)

---

## EXECUTIVE SUMMARY

Genesis is using less than 3% of its available Gemini API capacity. The system has processed 461 total requests over 23 days, consuming ~230K tokens at a total cost of $0.25. Given the Gemini Ultra plan ($100/mo cloud credits) and Tier 1/Tier 2 rate limits, this represents a massive underutilization problem. The Rate Maximizer was built to push to 90-95% capacity but has never been stressed beyond 2.2% on any model.

**Bottom line: We are paying for a Ferrari and driving it at walking speed.**

---

## FILE 1: gemini_usage.jsonl (Primary Execution Log)

| Metric | Value |
|--------|-------|
| Total entries | 461 |
| Date range | 2026-01-12 to 2026-02-03 |
| Total tokens | 230,604 |
| Total cost | $0.2469 |
| Success rate | 100% (461/461) |
| Task completion rate | 76.6% (353/461) |
| Avg tokens per request | 500 |
| Avg execution time | 12.80s |
| Active days | 9 out of 23 (39% duty cycle) |
| Last activity | 2026-02-03 (12 days ago -- STALE) |

### Model Breakdown

| Model | Requests | Tokens | Cost | Avg Tokens/Req |
|-------|----------|--------|------|-----------------|
| gemini-2.0-flash | 329 (71.4%) | 147,803 | $0.0592 | 449 |
| gemini-2.0-flash-exp | 53 (11.5%) | 18,186 | $0.0073 | 343 |
| gemini-2.0-flash-lite | 40 (8.7%) | 30,359 | $0.0091 | 759 |
| gemini-2.5-pro | 39 (8.5%) | 34,256 | $0.1714 | 878 |

### Daily Activity Distribution

| Date | Requests | Notes |
|------|----------|-------|
| 2026-01-12 | 139 | Initial burst (Budget Alerts + Auto-Recovery) |
| 2026-01-13 | 77 | Continued initial work |
| 2026-01-23 | 47 | Resumed after 10-day gap |
| 2026-01-24 | 5 | Minimal activity |
| 2026-01-27 | 31 | Overnight swarm session |
| 2026-01-28 | 89 | Peak overnight swarm |
| 2026-01-29 | 50 | Swarm continuation |
| 2026-02-02 | 13 | UVS story execution |
| 2026-02-03 | 10 | Final recorded activity |

**Key Finding**: 14 out of 23 days had ZERO Gemini API activity. The system is dormant more than it is active.

---

## FILE 2: rate_maximizer_usage.jsonl (Rate Maximizer Telemetry)

| Metric | Value |
|--------|-------|
| Total entries | 255 |
| Date range | 2026-01-20 to 2026-02-03 |
| Total tokens | 192,792 (input: 39,565, output: 153,227) |
| Input:Output ratio | 1:3.87 (output-heavy, good for generation tasks) |
| Avg tokens per request | 756 |
| Active days | 8 |

### Model Breakdown

| Model | Requests | Tokens |
|-------|----------|--------|
| gemini-2.0-flash | 166 (65.1%) | 110,645 |
| gemini-2.0-flash-lite | 50 (19.6%) | 42,530 |
| gemini-2.5-pro | 39 (15.3%) | 39,617 |

### Peak Utilization Observed (CRITICAL)

| Model | Peak Utilization | Configured Limit |
|-------|-----------------|------------------|
| gemini-2.0-flash | **2.20%** | RPM: 2,000 / TPM: 4,000,000 |
| gemini-2.0-flash-lite | **0.17%** | RPM: 4,000 / TPM: 4,000,000 |
| gemini-2.5-pro | **1.33%** | RPM: 150 / TPM: 2,000,000 |

**The highest observed utilization across ALL models across ALL time was 2.20%. Target is 90-95%. We are at ~2% of target.**

---

## FILE 3: execution_layer.jsonl (Orchestration Events)

| Metric | Value |
|--------|-------|
| Total entries | 99 |
| Date range | 2026-01-23 to 2026-02-15 |
| Unique task dispatches | 27 |
| Swarm runs | 16 |
| Stories dispatched | 193 |
| Stories completed | 142 |
| Stories failed | 0 (100% success rate) |

### Event Distribution

| Event | Count |
|-------|-------|
| task_start | 27 |
| titan_init | 16 |
| titan_memory_init | 16 |
| swarm_start | 16 |
| swarm_complete | 14 |
| prd_gate_check | 10 |

**Key Finding**: 2 swarm_start events without corresponding swarm_complete -- potential orphan swarms or interrupted sessions.

---

## RATE LIMITS CONFIGURATION

### Current Code Defaults (from `gemini_rate_maximizer.py`)

Since no external config file exists at `config/gemini_rate_limits.json`, the Rate Maximizer falls back to hardcoded defaults:

```python
"target_utilization": 0.90,    # 90% target
"safety_margin": 0.05,         # 5% safety buffer
"models": {
    "gemini-2.0-flash":  {"rpm": 2000, "tpm": 4000000, "rpd": -1, "priority": 1},
    "gemini-2.5-flash":  {"rpm": 1000, "tpm": 1000000, "rpd": 10000, "priority": 2},
}
```

**Problem 1**: These defaults are stale -- gemini-2.0-flash-exp and gemini-2.0-flash-lite are used in production but NOT configured in the Rate Maximizer. They are tracked in usage windows but not load-balanced optimally.

**Problem 2**: gemini-2.5-pro is used (39 requests) but has NO configuration in the Rate Maximizer defaults. It is flying blind.

**Problem 3**: No config file was ever created. The system runs entirely on hardcoded defaults that do not reflect the actual model fleet.

### Current Gemini API Tier Limits (Tier 1 Paid, as of Feb 2026)

| Model | RPM | TPM | RPD |
|-------|-----|-----|-----|
| gemini-2.5-pro | 150 | 1,000,000 | 1,000 |
| gemini-2.5-flash | 300 | 2,000,000 | 1,500 |
| gemini-2.5-flash-lite | 300 | 2,000,000 | 1,500 |
| gemini-2.0-flash (legacy) | 2,000 | 4,000,000 | unlimited |
| gemini-2.0-flash-lite (legacy) | 4,000 | 4,000,000 | unlimited |

### Budget Configuration (from model_tiers.json)

| Budget | Amount |
|--------|--------|
| Gemini budget | $300.00 |
| Anthropic budget | $30.00 |
| Reserved for Tier 3 | $10.00 |
| **Total allocated** | **$340.00** |

---

## UTILIZATION vs PLAN CAPACITY

### Actual Usage vs Theoretical Capacity (23-day Period)

| Dimension | Actual | Capacity (per day) | Utilization |
|-----------|--------|-------------------|-------------|
| Requests/day (avg) | 20 req/day | 2,880,000+ req/day (2K RPM * 1440 min) | **0.0007%** |
| Tokens/day (avg) | 10,026 tok/day | 5,760,000,000 tok/day (4M TPM * 1440 min) | **0.0002%** |
| Cost/day (avg) | $0.011/day | $300 budget | **0.004%** |
| Active hours/day | ~2 hrs (estimated) | 24 hrs available | **8.3%** |

### Per-Model Utilization

| Model | Requests Used | RPM Capacity | Daily Capacity (RPD) | RPM Util (peak) |
|-------|---------------|-------------|----------------------|-----------------|
| gemini-2.0-flash | 329 (23 days) | 2,000/min | unlimited | 2.20% |
| gemini-2.0-flash-lite | 40 (23 days) | 4,000/min | unlimited | 0.17% |
| gemini-2.5-pro | 39 (23 days) | 150/min | 1,000/day | 1.33% |
| gemini-2.0-flash-exp | 53 (23 days) | ~2,000/min | unlimited | <1% |

---

## MODELS: USAGE vs AVAILABILITY

### Models Being Used

| Model | Usage Level | Assessment |
|-------|------------|------------|
| gemini-2.0-flash | Primary workhorse (71%) | Correctly prioritized but massively underutilized |
| gemini-2.0-flash-exp | Light use (11.5%) | Experimental model, may be deprecated |
| gemini-2.0-flash-lite | Light use (8.7%) | Good for simple tasks, should handle more classification/extraction |
| gemini-2.5-pro | Moderate use (8.5%) | Used for task decomposition, highest cost but barely touched |

### Models Available But NOT Used

| Model | Status | Recommended Action |
|-------|--------|-------------------|
| **gemini-2.5-flash** | Configured in Rate Maximizer but ZERO requests | Deploy as primary Flash replacement (better than 2.0-flash) |
| **gemini-2.5-flash-lite** | Not configured, not used | Add for high-volume simple tasks |
| **gemini-2.5-pro-exp** | Not configured, not used | Evaluate for complex reasoning tasks |
| **gemini-3-flash** | Referenced in code but not in Rate Maximizer | Future model, prepare config |
| **gemini-3-pro** | Referenced in Jules config | Future model, prepare config |

---

## CRITICAL GAPS IDENTIFIED

### Gap 1: No Config File (SEVERITY: HIGH)
The Rate Maximizer expects `config/gemini_rate_limits.json` but it does not exist. The system runs on stale hardcoded defaults that lack 3 out of 5 models actually in use.

### Gap 2: 12+ Days of Total Inactivity (SEVERITY: HIGH)
Last Gemini API call was 2026-02-03. The system has been completely idle for 12 days. The overnight swarm (configured for 30 agents in `swarm_config.json`) is not running.

### Gap 3: No Continuous Execution (SEVERITY: CRITICAL)
The system runs in burst mode -- someone triggers it, it runs for a few hours, then goes silent. There is no cron job, no n8n workflow, no always-on daemon keeping the swarm active 24/7.

### Gap 4: Model Fleet Mismatch (SEVERITY: MEDIUM)
The Rate Maximizer knows about 2 models. The system uses 4 models. The API offers 6+ models. Configuration is incomplete.

### Gap 5: Cost Tracking Disconnected (SEVERITY: MEDIUM)
The gemini_usage.jsonl tracks costs but the Rate Maximizer does not read from it. The budget allocation of $300 has no enforcement mechanism -- it is a number in a JSON file that nothing checks against.

### Gap 6: Execution Layer Broken (SEVERITY: CRITICAL)
As noted in prior audit: `core/genesis_execution_layer.py` imports from modules that were moved to `legacy_v1/core/`. The execution layer is non-functional without manual fix.

---

## RECOMMENDATIONS TO PUSH TO 90-95% UTILIZATION

### IMMEDIATE (Do Today)

1. **Create `config/gemini_rate_limits.json`** with ALL models and accurate Tier 1 limits:
   ```json
   {
     "target_utilization": 0.90,
     "safety_margin": 0.05,
     "burst_detection_threshold": 0.85,
     "models": {
       "gemini-2.5-flash": {"rpm": 300, "tpm": 2000000, "rpd": 1500, "priority": 1,
         "cost_per_million_input": 0.15, "cost_per_million_output": 0.60},
       "gemini-2.5-flash-lite": {"rpm": 300, "tpm": 2000000, "rpd": 1500, "priority": 2,
         "cost_per_million_input": 0.075, "cost_per_million_output": 0.30},
       "gemini-2.0-flash": {"rpm": 2000, "tpm": 4000000, "rpd": -1, "priority": 3,
         "cost_per_million_input": 0.10, "cost_per_million_output": 0.40},
       "gemini-2.0-flash-lite": {"rpm": 4000, "tpm": 4000000, "rpd": -1, "priority": 4,
         "cost_per_million_input": 0.075, "cost_per_million_output": 0.30},
       "gemini-2.5-pro": {"rpm": 150, "tpm": 1000000, "rpd": 1000, "priority": 5,
         "cost_per_million_input": 1.25, "cost_per_million_output": 5.00}
     },
     "routing_rules": {
       "default_model": "gemini-2.5-flash",
       "task_routing": {
         "simple_extraction": "gemini-2.0-flash-lite",
         "classification": "gemini-2.0-flash-lite",
         "summarization": "gemini-2.5-flash-lite",
         "code_generation": "gemini-2.5-flash",
         "research": "gemini-2.5-flash",
         "architecture": "gemini-2.5-pro",
         "code_review": "gemini-2.5-pro"
       }
     },
     "research_config": {
       "enabled": true,
       "min_capacity_for_research": 0.20,
       "max_research_percentage": 0.30
     }
   }
   ```

2. **Fix the Execution Layer import**: Copy or symlink `gemini_rate_maximizer.py` and `gemini_executor.py` back to where the execution layer expects them. This is a 2-minute fix that has been broken since the `legacy_v1` refactor.

3. **Upgrade primary model from gemini-2.0-flash to gemini-2.5-flash**: The 2.0 series is legacy. 2.5-flash is faster, smarter, and still has 300 RPM / 2M TPM on Tier 1.

### SHORT-TERM (This Week)

4. **Deploy an always-on swarm daemon**: Create a cron job or n8n workflow that triggers the Genesis Execution Layer every 15 minutes with queued tasks. The 30-agent swarm config exists but is never invoked automatically.

5. **Implement background research filling**: When no primary tasks are queued, use idle capacity for:
   - Knowledge Graph entity extraction from unprocessed documents
   - YouTube transcript processing (pipeline built but idle)
   - Axiom generation from the 100+ unprocessed research reports
   - Competitive intelligence scanning

6. **Push to Tier 2**: Accumulate $250 in Gemini API spending to auto-upgrade to Tier 2. At Tier 2, limits jump to:
   - gemini-2.5-flash: 2,000 RPM / 4M TPM / 10,000 RPD
   - gemini-2.5-pro: 1,000 RPM / 2M TPM / 10,000 RPD

   At current spend rate ($0.25 total), reaching $250 would take years. Deliberately scaling up usage would unlock 6-10x more capacity.

### MEDIUM-TERM (Next 2 Weeks)

7. **Parallel swarm scaling**: The swarm_config defines 30 agents but swarm_start events show max swarm_size of 5. Scale swarm runs to 10-20 parallel agents per batch.

8. **Implement cost guardrails**: The $300 budget is currently unmonitored. Add daily cost alerts at $5, $10, $15 thresholds. At current rates (<$0.01/day), this is safe margin for 100x scale-up.

9. **Multi-model pipeline**: Route tasks through a tiered pipeline:
   - **Flash-Lite** (bulk): Extraction, classification, simple QA (4,000 RPM)
   - **Flash** (standard): Code generation, summarization, research (2,000 RPM or 300 RPM for 2.5)
   - **Pro** (complex): Architecture, PRD decomposition, code review (150 RPM)

10. **Add Kimi K2.5 and MiniMax M2.5 to the swarm**: These models are 9x cheaper than Claude. Route overflow tasks to them when Gemini limits approach 80%.

---

## UTILIZATION TARGETS

| Metric | Current | Target (90%) | Gap |
|--------|---------|-------------|-----|
| Daily requests | ~20 | ~2,600 (using 2.0-flash at 90% RPM for 1.44 hrs/day) | **130x increase needed** |
| Daily tokens | ~10K | ~500K+ | **50x increase needed** |
| Daily cost | $0.01 | $5-10 | **500-1000x increase needed** |
| Active hours | ~2 | 18+ (overnight + daytime) | **9x increase needed** |
| Models utilized | 4 of 6+ | 6+ | 2+ models to add |
| Swarm concurrency | max 5 | 15-20 | **3-4x increase needed** |

---

## COST PROJECTIONS AT TARGET UTILIZATION

| Scenario | Daily Cost | Monthly Cost | vs Budget ($300) |
|----------|-----------|-------------|-----------------|
| Current (2% util) | $0.01 | $0.30 | 0.1% |
| 25% utilization | $2.50 | $75.00 | 25% |
| 50% utilization | $5.00 | $150.00 | 50% |
| 75% utilization | $7.50 | $225.00 | 75% |
| 90% utilization (TARGET) | $9.00 | $270.00 | 90% |
| 95% utilization (MAX) | $9.50 | $285.00 | 95% |

At 90% utilization, estimated monthly spend is ~$270 against a $300 budget -- well within bounds. The system can safely scale up 100x without exceeding budget.

---

## CONCLUSION

The Genesis Gemini infrastructure is architecturally sound but operationally dormant. The Rate Maximizer, swarm config, model tiers, and execution layer all exist as code but are:

1. **Not running continuously** -- no daemon, no cron, no automation
2. **Not configured correctly** -- missing config file, stale model list
3. **Not connected end-to-end** -- broken imports in execution layer
4. **Not being fed work** -- task queue is empty between manual sessions

The path from 2% to 90% utilization requires:
- Fix the broken execution layer (2 minutes)
- Create the config file (5 minutes)
- Deploy an always-on trigger (30 minutes via n8n)
- Fill the task queue with continuous work (knowledge extraction, research, processing)

**Total effort to reach 90% utilization: ~1 hour of setup + continuous task feeding.**

The models, the budget, the architecture, and the rate limits are all there. What is missing is the operational cadence to keep the engine running.

---

*Report generated from analysis of 815 log entries across 3 files.*
*Rate Maximizer source: `/mnt/e/genesis-system/core/gemini_rate_maximizer.py` (589 lines)*
*Model tiers config: `/mnt/e/genesis-system/config/model_tiers.json`*
*Swarm config: `/mnt/e/genesis-system/config/swarm_config.json`*
