Skip to main content

Welcome to Vectorless

· 2 min read
zTgx
Rust Developer

Vectorless is a document understanding engine for AI. It compiles documents into structured trees of meaning, then dispatches multiple agents to reason through headings, sections, and paragraphs — evaluating how each part relates to the whole. The problem it solves is not "where to look", but "what does this mean in context". Every answer is a reasoning act, not a retrieval result.

Why Vectorless?

Understanding a document requires more than finding keywords — it requires navigating structure, cross-referencing sections, and evaluating whether the evidence is sufficient. Vectorless agents do exactly this: they reason through documents the way a human expert would.

Key capabilities:

  • Hierarchical Semantic Trees — Documents are parsed into a tree of sections, preserving structure and relationships.
  • LLM Agent Navigation — Queries are resolved by agents that navigate the tree using commands (ls, cd, cat, find, grep), making every decision through LLM reasoning.
  • Zero Infrastructure — Just an LLM API key, nothing else to deploy.

Quick Start

Python

import asyncio
from vectorless import Engine, IndexContext, QueryContext

async def main():
engine = Engine(
api_key="sk-...",
model="gpt-4o",
)

# Index a document
result = await engine.index(IndexContext.from_path("./report.pdf"))
doc_id = result.doc_id

# Query
answer = await engine.query(
QueryContext("What is the total revenue?").with_doc_ids([doc_id])
)
print(answer.single().content)

asyncio.run(main())

Rust

use vectorless::{EngineBuilder, IndexContext, QueryContext};

#[tokio::main]
async fn main() -> vectorless::Result<()> {
let engine = EngineBuilder::new()
.with_key("sk-...")
.with_model("gpt-4o")
.build()
.await?;

let result = engine.index(IndexContext::from_path("./report.pdf")).await?;
let doc_id = result.doc_id().unwrap();

let result = engine.query(
QueryContext::new("What is the total revenue?").with_doc_ids(vec![doc_id.to_string()])
).await?;
println!("{}", result.content);

Ok(())
}

How It Works

  1. Index — Documents are parsed into hierarchical semantic trees with pre-computed navigation indexes and keyword mappings.
  2. Query — The Orchestrator coordinates multi-document retrieval by dispatching Worker agents. Each Worker navigates the tree using commands, collects evidence, and self-evaluates sufficiency.
  3. Result — Evidence is deduplicated, ranked by BM25 relevance, and returned as original document text.

What's Next

  • Cross-document graph-aware retrieval with score boosting
  • DOCX format support
  • Streaming query results with real-time progress events

The project is open source under Apache-2.0. Contributions welcome!