Beta Coming soon. This feature is still being built, so names and details may change before it ships.

Codebase search

Codebase search is how Ingot's agent finds the right code in a project of any size before it reads or changes anything. It ranks code by meaning, by declarations, by exact text and by file names, keeps the result inside a token budget, and shows you which files and lines it used. It works the same in a single package, a monorepo, a React Native app without a src folder, a Flutter app that keeps its code in lib/, or a Python backend next to a mobile client.

Ask with @codebase

Type @codebase anywhere in a chat message:

@codebase where do we refresh the session token after a 401?

Before the agent starts, Ingot searches the index for your message and adds the best matching snippets to it. Chips under your message name each file and line range that was added, so you can see exactly what the agent was given. Click a chip to open the file at those lines. One search per message: follow-up rounds of the same run reuse it.

The agent can also search on its own with the codebase_search tool, for example when a task says "fix the price rounding" without naming a file.

What a search combines

SourceFindsExample
Meaning (vectors)code that does what you describe, even with other words"where are prices rounded" → roundPrice
Exact text (BM25)files that use the words of your question most, rare words weighted higher"invoice total amount"
Declarationsfunctions, classes, methods and types named like the query, in TypeScript/JavaScript, Python, Go, Java, Rust, PHP and RubyCartService.total
Exact identifierslines that contain a name from the question (ripgrep)refreshToken
File namesfiles whose path matchesbilling/invoice.ts
Open filesthe files you have open or just edited, when they fit the question

Each source ranks on its own and the lists are merged, so a file found by several sources rises to the top. Every result says which sources found it and which declaration it belongs to:

1. auth/session.ts:12-30 (score 0.91, refreshSession, symbol+semantic+lexical)

Without embeddings

When the embedding provider fails (no network, quota reached, provider down), search keeps working on exact text, declarations, identifiers and file names. The status bar shows Index ready (text only) and the reason in its tooltip; results say "embeddings unavailable". Missing vectors are computed on a later pass, once the provider answers again. On our test project the right file was still in the top 5 for every question with no embeddings at all.

Embeddings

ProviderWhere code goesCost
local (default)stays on your computerfree
ollamayour local Ollama serverfree
gatewayIngot's model gateway when you are signed in (uses your plan's AI), otherwise OpenAI with your own key from Settings › Modelsper token

With gateway, snippets of your code are sent to the provider to compute embeddings. Embeddings are cached by content, so only new or changed code is embedded again, and switching branches back costs nothing.

Project map

At the start of every task the agent also gets a short project map: languages, frameworks, the project's packages, entry points, build and test commands, and the most imported files. Packages come from manifests at any depth (package.json, pyproject.toml, go.mod, Cargo.toml, pubspec.yaml, Gradle, Podfile, .csproj), so a monorepo lists each app and library with its framework. See Project map.

Find a declaration

The agent's find_symbol tool asks the language servers, the index's declaration table and a text search at once, so it answers quickly even in languages without a running language server (Agent code tools).

What is indexed

The index follows your project's own rules, whatever its layout:

  • every .gitignore and .ingot/ignore (and existing editor ignore files) applies to its own folder and below (nested ones in a monorepo too);
  • dependency and cache folders are skipped everywhere (node_modules, .venv, Pods, .gradle, vendor, dist, ...);
  • a folder named like build output (lib, build, out, target, obj, bin) is skipped only when a manifest next to it says it is output (a tsconfig outDir, Cargo, Gradle, Xcode, Flutter, .NET). Otherwise it is source: Flutter and Ruby keep their code in lib/;
  • secrets (.env*, keys), binaries and minified files are never indexed.

Up to 50,000 files by default (setting below). On a 50,000-file project the first index took about 1.5 minutes on a busy 2-core machine and 51 MB on disk; later changes are picked up in well under a second.

Settings

SettingDefaultEffect
ingot.index.enabledtruebuild and use the index
ingot.index.hybridSearchtruecombine all sources; off: vectors only
ingot.chat.codebaseMentiontrue@codebase in a message adds code to it
ingot.chat.codebaseMention.tokenBudget3000most tokens @codebase adds (the best match always fits)
ingot.index.maxFiles50000most files the index reads
ingot.index.embeddingProviderlocallocal, ollama or gateway
ingot.index.ollamaModelnomic-embed-textthe Ollama model when the provider is ollama
ingot.agent.repoMap.enabledtruegive the agent the project map

They are under Settings › Agent tools › Codebase search, and Codebase search can be turned on or off in Settings › Features.

Limits

  • @codebase reads the message it is in; it does not search again in later rounds of the same run.
  • The local embedder matches words, not meaning in other languages; use ollama or gateway for that.
  • Very large files (over 256 KB) and files with very long lines are left out.