Technology Choices -- Axon

September 5, 2026 ยท View on GitHub

Language and runtime

ComponentTechnologyVersionPurpose
Core binaryRust1.97.1 (edition 2024)CLI, MCP server, workers, HTTP server
Web panel assetsTypeScriptNode 24+Embedded setup/config panel assets
ScriptsBash + Python--Maintenance, testing, analysis

Key dependencies

Rust crates

CrateVersionPurpose
spider2.xWeb crawling engine (HTTP + Chrome rendering)
spider_agent2.47+Tavily search integration
spider_transformations2.xContent transformation (markdown, readability)
rmcp1.5+MCP server framework (stdio + streamable-http)
axum0.8HTTP server for web panel, MCP, and first-party action routes
tokio1.xAsync runtime (multi-threaded)
sqlx0.8SQLite async driver
reqwest0.13HTTP client (rustls, streaming)
clap4.xCLI argument parsing
serde / serde_json1.xSerialization
text-splitter0.30Semantic text chunking (code + markdown)
tree-sitter-*variousAST-based code chunking (Rust, Python, JS, TS, Go, Bash)
octocrab0.49GitHub API client
bollard0.20Docker API client

Infrastructure

ServiceImage/VersionPurpose
SQLite(embedded)Job persistence, metadata storage
Qdrantv1.18.2Vector database (dense + sparse search)
TEIghcr.io/huggingface/text-embeddings-inference:89-1.9Text embedding generation
ChromeCustom DockerfileHeadless browser for JavaScript rendering

Web panel assets

PackagePurpose
BiomeLinter and formatter
npm + package-lock.jsonPackage manager/build runner

Embedding pipeline

TEI (Text Embeddings Inference)

  • Default model: Qwen/Qwen3-Embedding-0.6B
  • Pooling: last-token
  • Batch size: up to 128 (auto-splits on 413 Payload Too Large)
  • Retry: 5 attempts with exponential backoff (1s, 2s, 4s, 8s + jitter)
  • GPU acceleration via NVIDIA (optional; CPU fallback available)

Text chunking

  • chunk_text(): 2000 characters with 200-character overlap
  • Code files: tree-sitter AST-based chunking (preserves function boundaries)
  • Each chunk becomes one Qdrant point with chunk_text payload field

New Qdrant collections use named vectors with two search paths:

VectorTypeSourcePurpose
denseFloat (dimension matches model)TEI embeddingSemantic similarity
bm42SparseComputed locally from chunk textKeyword matching

Search uses Reciprocal Rank Fusion (RRF) via Qdrant /query API:

  1. Dense prefetch: HNSW search (hnsw_ef=128)
  2. Sparse prefetch: BM42 index search
  3. RRF fusion: merge and re-rank results

Legacy unnamed-mode collections fall back to dense-only search. Use axon migrate to upgrade.

Tuning

ParameterDefaultDescription
AXON_HYBRID_SEARCHtrueEnable hybrid search
AXON_HYBRID_CANDIDATES100Prefetch candidates per arm
AXON_ASK_HYBRID_CANDIDATES150Ask pipeline window (higher for reranking)
AXON_HNSW_EF_SEARCH128HNSW ef for named-mode (32-512)

Crawl engine

Spider-based crawling with three render modes:

ModeDescription
httpPure HTTP fetch (fastest, no JS)
chromeHeadless Chrome rendering (JS-heavy sites)
auto-switch (default)HTTP first; if >60% thin pages, retry with Chrome

Key Spider features enabled (see Cargo.toml for the full list): basic, chrome, regex, sitemap, adblock, chrome_stealth, chrome_screenshot, chrome_store_page, chrome_headless_new, chrome_simd, simd, cache_mem, ua_generator, headers, control, hedge.

Features explicitly NOT enabled (see docs/reference/spider-feature-flags.md):

  • firewall: spider_firewall's build.rs fetches blocklists from api.github.com unauthenticated and panics under CI rate limits; SSRF is guarded by validate_url() in src/core/http/ssrf.rs instead
  • balance: silently throttles with zero logging
  • glob: causes budget-aware is_allowed() to reject first URL with with_limit(1)

Gemini Headless LLM

LLM synthesis operations (ask, evaluate, suggest, research, extract fallback, debug) use the Gemini CLI headless path through src/core/llm/:

  • AXON_HEADLESS_GEMINI_CMD selects the Gemini CLI command.
  • AXON_HEADLESS_GEMINI_HOME selects the source HOME for Gemini auth copying.
  • AXON_SYNTHESIS_HEADLESS_GEMINI_MODEL controls the Gemini synthesis model override; AXON_HEADLESS_GEMINI_MODEL remains a legacy alias.
  • AXON_LLM_COMPLETION_CONCURRENCY caps concurrent completions.
  • AXON_LLM_COMPLETION_TIMEOUT_SECS caps each completion request.

Build tooling

ToolPurpose
justTask runner (30+ recipes)
lefthookGit hooks
kacheCompilation cache (mise-managed global rustc-wrapper)
moldFast linker (auto-detected)
cargo-nextestParallel test runner
cargo-denyDependency auditing
cargo-llvm-covCode coverage

See also