Skip to content

feat(code-index): support indexing multiple repositories in a single namespace #870

Open

Description

@itomek

Context

Reviewer on #721 asked "Can or should we support multiple code bases in the index?" Today, the code_index tool mixin (composed into CodeAgent) is scoped to a single repo_path per instance and stores a single on-disk FAISS index.

Goal

Allow one collection to cover N repos with a repo_id field per chunk so search can scope by repo or span all.

Design sketch

  • On-disk layout: ~/.gaia/code_index/<collection_name>/{faiss.idx,meta.jsonl} with repos keyed by git remote.
  • CLI: gaia-code index --repo /path/a --collection team-codebases, then gaia-code index --repo /path/b --collection team-codebases appends to the same collection.
  • Search: gaia-code index search "..." --repo-id <remote> filters; omitting the flag searches all repos in the collection.

Acceptance

  • Multi-repo index builds and searches pass unit tests.
  • CodeIndexSDK.get_status() reports per-repo counts.
  • Docs updated to describe collections.

References

  • src/gaia/code_index/sdk.py — SDK
  • src/gaia/agents/code_index/tools/mixin.py — tool surface
  • src/gaia/agents/code/cli.py — CLI

Deferred from #721.

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:agent-coreFramework, tools, registry, memory, skills, orchestrationenhancementNew feature or requesttrack:platformFoundation that both consumer-app and oem-pc tracks consume

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions