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.

Before an agent creates a new file or refactors existing code, it should know what already exists. Axis search gives every agent in a project the same up-to-date view of the codebase — ranked hits with file and line numbers, related files that historically change together, and symbol definitions for the top matches. The free tier uses ripgrep with a keyword ranker and needs no index. The Pro tier blends in hosted vector, full-text, and trigram results fused and reranked by an LLM, with a multi-hop deep_search that reads across files and returns a cited answer.
Free tier users get search_codebase with local ripgrep — instant results, no index needed, and no setup. Pro tier blends hosted vector results in when they arrive within budget. An upgrade prompt appears when a free org reaches for hosted search features.

Search tiers

Local (free)

search_codebase answers from ripgrep plus a keyword ranker. No index required. Instant. Available to every user.

Hosted Pro

Vector + full-text + trigram retrieval, fused and LLM-reranked, with related files and definitions enrichment. deep_search for multi-hop agentic answers.

search_codebase

The primary discovery tool — use it before creating files, before refactoring, and any time you need to find where something lives in the codebase.
query
string
required
The search query. Can be a symbol name, a natural-language description of what you’re looking for, or a pattern.
projectName
string
The project to search. Optional — defaults to the auto-detected project.
Returns ranked hits with file:line references, plus (on the Pro tier):
  • related — files that historically change together with the top hit. If you’re about to refactor src/auth.ts, these are the files most likely to also need changes.
  • definitions — symbol definitions for what the top hit calls, so you don’t have to chase imports manually.
// Example response
{
  "hits": [
    { "file": "src/auth.ts", "line": 42, "snippet": "export function issueToken(userId: string, role: string) {" },
    { "file": "src/middleware/auth-guard.ts", "line": 12, "snippet": "const token = await issueToken(user.id, user.role);" }
  ],
  "related": ["src/types/token.ts", "tests/auth.test.ts"],
  "definitions": {
    "issueToken": { "file": "src/auth.ts", "line": 42 }
  }
}

deep_search — agentic answer engine

deep_search is for “how does X work?” and “where is Y handled, and why?” questions. It reads across multiple files over several hops and returns a cited answer pointing to the exact source lines that support each claim.
query
string
required
A natural-language question about the codebase.
projectName
string
The project to search. Optional.
deep_search is hosted Pro only — it carries real embedding and LLM cost. Local users get search_codebase’s instant local fallback for all discovery work.

Indexing

Search only returns what’s been indexed. The index is incremental and content-hashed: re-runs skip unchanged files, so it’s cheap to call after making changes.

index_codebase

Build or refresh the search index for a project.
files
array
required
Array of { path, content } objects. Agents pass the files they edited; for a full initial index, use the axis index CLI instead.
prune
boolean
When true, deleted files are removed from the index. Requires allPaths to identify which paths should be kept.
allPaths
string[]
Complete list of current file paths in the project. Used with prune: true to drop files that no longer exist.
projectName
string
The project to index. Optional — defaults to the current workspace.

index_file

Index a single file incrementally. Available on the local server only — it reads the file content directly from disk.
filePath
string
required
Path to the file to index. The local server reads its content from disk; no content argument needed.
Agents should call index_file after writing a file to keep the index current within the same session. This ensures subsequent search_codebase calls by any agent on the team reflect the latest changes.

search_docs

Search indexed documentation — distinct from codebase search. Local server only; backed by the local RAG fallback over indexed docs.
query
string
required
The search query.

Initial indexing workflow

1

Use the CLI for large initial indexes

The axis index CLI is faster for indexing an entire repository. It walks the repo, respects .gitignore, and uploads only deltas (content-hashed, unchanged files are skipped):
axis index
Run this once when setting up a project. Re-running it after large changes is also faster than calling index_codebase from an agent for many files.
2

Agents index their own changes

After every file write within a session, the agent calls index_file to update the index immediately. This keeps search results fresh without a full re-index.
3

Periodic full refresh

After large refactors or after merging a significant PR, any agent can call index_codebase with prune: true + allPaths to drop deleted files and bring the index up to date.

REST API (hosted only)

The hosted intelligence layer is also accessible directly via the REST API for integrations that don’t use MCP. Embed content — add documents or code snippets to the index:
curl -X POST https://useaxis.dev/api/v1/embed \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AXIS_API_KEY" \
  -d '{
    "items": [
      {
        "content": "This repo uses Bun",
        "metadata": { "filename": "context.md", "source": "agent-instructions" }
      }
    ]
  }'
Search content — query the hosted index directly:
curl -X POST https://useaxis.dev/api/v1/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AXIS_API_KEY" \
  -d '{
    "query": "What runtime does this project use?",
    "limit": 5,
    "threshold": 0.5
  }'
The threshold parameter (0–1) controls the minimum similarity score for a result to be returned. Lower values return more results with lower confidence; higher values return fewer but more relevant hits.

Tool availability by tier

ToolLocal (free)Hosted Pro
search_codebase✅ ripgrep + keyword✅ vector + full-text + trigram, reranked
index_codebase✅ incremental, content-hashed
index_file✅ reads from disk
search_docs✅ local RAG
deep_search✅ multi-hop, cited
Call search_codebase before creating any new file or starting any refactor. The most common source of duplicate code in multi-agent projects is agents that each independently implement the same utility — because none of them searched first.

Build docs developers (and LLMs) love