Fleet + Code Intelligence Integration Guide

March 30, 2026 · View on GitHub

Overview

Fleet initialization now includes automatic code intelligence checks to ensure agents have access to semantic search capabilities before being spawned.

Quick Start

# Run with wizard for best experience
aqe fleet init --wizard

# The wizard will:
# 1. Check for code intelligence index
# 2. Prompt to scan if missing
# 3. Guide you through fleet configuration

Skip Code Intelligence Check

# For CI/automated scenarios
aqe fleet init --skip-code-scan

# Or non-interactive mode
aqe fleet init --topology hierarchical --max-agents 15 --skip-code-scan

When to Use Code Intelligence

Use code intelligence when:

  • Testing complex codebases (>1000 files)
  • Need semantic code search
  • Want improved agent accuracy (up to 80% better)
  • Long-term project (index is reusable)

Skip code intelligence when:

  • Quick testing/demos
  • Small codebases (<100 files)
  • CI/CD pipelines with time constraints
  • Already have index from previous init

Building the Index

If fleet init detects no index, it will recommend:

aqe code index .

This command:

  • Scans all source files (TypeScript, JavaScript, Python, Go, Rust, Java, Ruby, C/C++, and more)
  • Builds knowledge graph in .agentic-qe/memory.db
  • Takes ~30s for typical project (1000 files)
  • Only needs to run once per project (use --incremental for updates)

Index Status

Check if you have an index:

# Part of fleet init output
aqe fleet init
# Shows: "✓ Code intelligence index found (X entries)"

# Or check memory backend directly
ls -la .agentic-qe/memory.db

Agent Benefits

Agents spawned with code intelligence have access to:

// Find code by meaning, not just keywords
"Find authentication logic"
Returns: auth.service.ts, jwt.utils.ts, user.middleware.ts

Context-Aware Analysis

// Understand relationships between modules
"What calls the payment processor?"
Returns: Full call chain with context

Intelligent Test Generation

// Generate tests based on actual code patterns
"Generate tests for order service"
Returns: Tests covering all public methods + edge cases

Integration with AQE Init

The code intelligence check is shared between:

  • aqe init - Runs scan as part of full initialization
  • aqe fleet init - Checks for existing index, prompts if missing

Best Practice:

# Full setup (recommended for new projects)
aqe init --wizard

# Later, spawn fleet (will reuse index)
aqe fleet init --wizard

Troubleshooting

Index Not Found

# Check database exists
ls .agentic-qe/memory.db

# Rebuild index
aqe code index .

# Try fleet init again
aqe fleet init

Index Too Large

# Exclude directories from indexing
# Edit .agentic-qe/config.yaml:
domains:
  code-intelligence:
    indexing:
      exclude:
        - "test/**"
        - "build/**"
        - "dist/**"

Slow Indexing

# For large projects (>10k files)
# Use incremental indexing
aqe code index . --incremental

# Or index only recent changes
aqe code index . --git-since HEAD~10

# Or skip for now
aqe fleet init --skip-code-scan

CI/CD Integration

# GitHub Actions example
- name: Initialize AQE Fleet
  run: |
    # Skip scan in CI (use pre-built index or skip)
    aqe fleet init --skip-code-scan --topology hierarchical

Examples

Example 1: New Project

# First time setup
aqe init --wizard
# Includes code intelligence scan

# Later, spawn fleet
aqe fleet init
# Reuses existing index, no scan needed

Example 2: Existing Project (No Index)

# Start fleet init
aqe fleet init --wizard

# Prompted:
#   ⚠ No code intelligence index found
#   Run scan now? [Y/n]:

# Choose 'y', then:
aqe code index .

# Re-run fleet init
aqe fleet init
# Now shows: ✓ Code intelligence index found

Example 3: Skip for Speed

# Quick test without index
aqe fleet init --skip-code-scan --max-agents 5

Performance

Project SizeIndex TimeAgents Benefit
<100 files~5sMinimal
100-1k files~15sModerate (+40%)
1k-10k files~45sSignificant (+70%)
>10k files~2minMaximum (+80%)

FAQ

Q: Do I need to rebuild the index after code changes? A: No, agents work with the snapshot. Rebuild periodically (weekly) for best accuracy.

Q: Can I use fleet without code intelligence? A: Yes! Use --skip-code-scan or choose 'n' when prompted. Agents will use basic analysis.

Q: What's stored in the index? A: AST nodes, relationships, function signatures, imports. No secrets or credentials.

Q: How much disk space does it use? A: Typically 5-10 MB for 1000 files. Stored in SQLite .agentic-qe/memory.db.