Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/virsanghavi/axis/llms.txt

Use this file to discover all available pages before exploring further.

Axis search tools are the primary way agents avoid reinventing patterns and duplicating work. The agent protocol requires reaching for search by default before creating files or refactoring — not because the user asked, but because understanding what already exists produces better code. Local mode answers instantly from ripgrep with no index required. Hosted Pro mode blends in vector, full-text, and trigram retrieval fused and LLM-reranked, enriched with related files and symbol definitions.
Free tier users get search_codebase with local ripgrep — no index needed, instant results. Pro tier blends hosted vector results in when they arrive within budget. An upgrade prompt appears when a free org reaches for hosted search tools.

search_codebase

Hybrid search over the indexed codebase. In local mode, the tool answers immediately from ripgrep plus keyword ranking — no index required. In hosted Pro mode, it blends vector + full-text + trigram retrieval, fuses the result sets, and applies LLM reranking. Pro results are additionally enriched with related files and symbol definitions.
query
string
required
A natural language question or code search query. Both “where is X” lookups and conceptual “how does Y work” queries are accepted, though deep_search is the better tool for multi-file conceptual questions.
projectName
string
The project to search. Defaults to the auto-detected project from the active workspace.
Returns:
FieldDescription
hitsRanked results, each with file, line, and snippet.
relatedFiles that historically change together with the top hits (hosted only).
definitionsSymbols that the top hits call into — useful for tracing a call chain (hosted only).
When to use: Before creating any new file. Before refactoring. Any time you need to answer “where is X” or “how is Y done.” Prefer search_codebase for direct lookups; use deep_search for multi-file reasoning questions.
Hosted Pro only. deep_search is not available on the local stdio server. Local users get search_codebase with instant ripgrep-based results.
An agentic, multi-hop answer engine. Rather than returning a ranked list of snippets, deep_search reasons across files over multiple steps and returns a single cited answer. Every claim in the answer is grounded with a file:line reference.
query
string
required
A natural language question suited for multi-file reasoning. Examples: “How does token refresh work end to end?”, “Where is rate limiting enforced and why is it placed there?”, “What happens when a job claim fails?”
projectName
string
The project to search. Defaults to the auto-detected project.
Returns: A prose answer with inline file:line citations for every factual claim. The answer is produced after the engine has read across the relevant files — expect it to be slower than search_codebase but far more complete for architectural questions. When to use: “How does X work?”, “Why is Y done this way?”, “What is the full flow for Z?” Use search_codebase when you need a quick “where is X” lookup — it is faster. Use deep_search when you need to understand something that spans multiple files.

index_codebase

Builds or refreshes the searchable index for the project. The indexer is incremental and content-hashed — unchanged files are compared by hash server-side and skipped, so re-running index_codebase is cheap even on large repos.
files
array
An array of {path: string, content: string} objects to index. If omitted, the local server reads files from disk. Hosted callers pass file content explicitly because the hosted server has no access to the client’s filesystem.
prune
boolean
When true, removes index entries for files that no longer exist. Use together with allPaths to identify deletions accurately.
allPaths
array
The complete list of current file paths in the repository. Used alongside prune: true — any indexed path not present in allPaths is removed from the index.
projectName
string
The project to index. Defaults to the auto-detected project.
When to run:
  • Once to build the initial index for a new project
  • After large refactors or branch switches that change many files
  • Agents call index_file (see below) after individual file writes to keep the index current mid-session
For the initial index of a large repository, the axis index CLI is faster than calling index_codebase from an agent. It walks the repo respecting .gitignore and uploads only content-changed files as deltas. Run npx axis-init@latest and then axis index from the repo root.

index_file

Local only. index_file reads file content from the client’s disk. On the hosted surface, push updated content through index_codebase’s files parameter instead.
Indexes a single file. Agents call this after writing a file to keep the search index current without re-indexing the entire project.
filePath
string
required
The path of the file to index.
content
string
The file content to index. If omitted, the local server reads the file from disk at filePath.
projectName
string
The project to index the file under. Defaults to the auto-detected project.

search_docs

Local only. search_docs is backed by the local RAG fallback over indexed documentation files. A hosted docs search is not yet available.
Searches indexed documentation. Backed by the local RAG fallback over any documentation files that have been indexed.
query
string
required
A natural language documentation search query.
projectName
string
The project whose documentation index to search.

Search workflow

1

Build the initial index

Before agents can use hosted search, the codebase needs to be indexed once. The fastest path for a new project is the CLI:
npx axis-init@latest
axis index
Alternatively, ask any connected agent to call index_codebase — it will walk the repo and upload only content-changed files.
2

Search before writing

Before creating a new file or refactoring an existing one, run a search:
search_codebase("JWT token validation")
search_codebase("where is the rate limiter applied")
Check the related files in the result — files that historically change together are often files that need to be updated together.
3

Use deep_search for architectural questions

When you need to understand a flow end to end, prefer deep_search:
deep_search("how does the auth token refresh flow work end to end?")
deep_search("where is the job claim atomicity enforced and why?")
Every claim in the returned answer carries a file:line citation you can verify.
4

Keep the index current mid-session

After every file write, call index_file to push the change into the search index:
index_file(filePath="src/auth/token.ts")
This ensures that other agents searching mid-session see your changes immediately.

Local vs. hosted capabilities

Local (free)

  • search_codebase: ripgrep + keyword ranking
  • No index needed — instant results
  • index_codebase and index_file for local indexing
  • search_docs for local documentation
  • No deep_search

Hosted Pro

  • search_codebase: vector + full-text + trigram, fused and LLM-reranked
  • related files and definitions enrichment
  • deep_search: multi-hop agentic answer engine with citations
  • Incremental indexed uploads (content-hashed, cheap re-runs)

Build docs developers (and LLMs) love