ApexRAG v1.0.3
Multi-Agent Structural RAG Engine

Stop Guessing with Vectors.
Navigate with Agents.

ApexRAG structures documents into a strict Universal AST and deploys an orchestrator of coordinate agents (Planner, Navigator, Critic) to query hierarchy logically, delivering pinpoint accuracy with conformal confidence guarantees.

Get Started
$ pip install apex-rag
quick_start.py
from apex_rag import ApexIndex

# 1. Initialize with OpenAI/Ollama
index = await ApexIndex.create(provider="openai")

# 2. Ingest document structurally
doc_id = await index.ingest("annual_report.pdf")

# 3. Query (Planner -> Navigator -> Critic)
answer = await index.query("What is Q3 growth?", doc_id)

print(answer.answer_text)
print(answer.coverage_guarantee)
# > "Q3 growth was 15.4% [Node: Section 2.1]"
# > "Confidence Guarantee: 90%"

Engineered for Pinpoint Document Reasoning

ApexRAG abstracts away the complexities of structural ingestion, multi-agent coordination, and uncertainty mapping, delivering the exact context required.

Universal AST Parsers

Converts PDFs, Markdown, and raw Python code into typed hierarchical syntax nodes, retaining document outlines and tables deterministic relationships.

Multi-Agent Orchestrator

Planner breaks queries down, Navigator walk AST layers, and Critic checks constraints to verify correct answers before generation.

Causal Knowledge Graphs

Automatically builds structural and causal edges (Overrides, Contradicts, Supports) to walk relational connections dynamically during runtime.

Temporal Version Control

Supports time-travel queries allowing state reconstructions "as-of" any point in history, complete with change detections and audit log trace.

Enterprise Multi-Tenancy

Enforces tenant segregation and granular RBAC context directly down to AST nodes, masking or validating data at ingestion & query phases.

Native OpenTelemetry

Named agent spans and traces automatically propagate to Grafana, Datadog, or Jaeger for total observability of system agent loops.

Watch the Agents Reasoning

Traditional search matches keywords/vectors blindly. Here is what happens when you query ApexRAG.

REASONING TRACE LOGS
● ACTIVE

Hierarchical AST Document Indexing

Traditional chunking chops text indiscriminately. ApexRAG extracts the actual document structure, nesting nodes (Outline, Sections, Tables) logically. Let's see how our parser indexes outlines.

Preserves tables and lists intact instead of splitting rows across chunks.
Creates parent-child outlines so agents can skip irrelevant sections.
Constructs relational edges mapping function blocks or references.
AST FILE TREE INDEX
Annual_Report.pdf
Section 1 (Summary)
Section 2 (Financials)
Table 2.1 (Sheet)
Paragraph 2.2 (Footnote)

Node ID: ast_cf29... Indexed: Yes

Built for Developers

Simple pythonic hooks to initialize, ingest, query, stream, and configure security boundaries.

Python 3.10+ SDK

          

How it Compares

Why vector databases fall short for structured data, and how AST indexing fixes it.

Traditional Vector RAG

Naïve Embedding Chunking

Split documents blindly into 512-token overlap blocks. Relies entirely on semantic math distance matching.

  • Chops tables across margins, corrupting rows.
  • Loses structural heading relations completely.
  • Hallucination hazard on queries needing aggregate calculations.
ApexRAG Engine

Universal Outlined AST Tree

Parses outline indexes explicitly into node models. Relies on structured tree traversal and leaf confirmations.

  • Preserves tables, outlines, and structures intact.
  • Guided agent walking reads outlines logically before reading contents.
  • Separate leaf verifications enforce strict answers.

Dynamic Installation Configuration

Customize package builds to include cloud engines (Anthropic, Groq, Gemini), local Ollama wrappers, telemetry databases, and web admin dashboards.

💡 Compatible with Python 3.10, 3.11, and 3.12.

🔧 Uses pip, poetry, or pipenv. Virtual environments recommended.

Release Build
LLM Provider SDKs
OpenTelemetry + Web API dashboard
Install Command:

Full Command-Line Interface

ApexRAG ships with a complete diagnostic and serve CLI out-of-the-box.

$ python -m apex_rag serve

Starts the FastAPI REST server complete with auth tokens, CORS mappings, and rate limits.

$ python -m apex_rag ingest <file>

Ingests PDF, DOCX, or markdown outlines locally into SQLite/Postgres AST storage schemas.

$ python -m apex_rag query <doc_id> <q>

Runs the multi-agent outline logic search against an ingested document outline ID.

$ python -m apex_rag repl

Launches the interactive shell console to trace and check agent traversals visually.

$ python -m apex_rag doctor

Runs systems diagnostics validating database linkages, provider access, and environment bindings.

$ python -m apex_rag info

Shows package configuration attributes, active caches, database sizes, and API builds.