💡 Overview
CortexRAG is a sophisticated engine designed for automated Deep Research and Knowledge Base construction. By leveraging LangGraph for resilient multi-agent state management and LlamaIndex for high-performance data indexing, CortexRAG orchestrates the entire lifecycle: from real-time web exploration to structured RAG deployment.
Key Features:
- Multi-Model Orchestration: Seamlessly combine different LLMs for specialized tasks (e.g., fast models for search, reasoning models for synthesis).
- Graph-Based Reasoning: State-of-the-art agent coordination using directed acyclic graphs.
- Autonomous Pipeline: Automatic content cleaning, Markdown conversion, and vector storage.
- Developer-Centric: Built with clean architecture and Dishka Dependency Injection support.
🚀 Quick Start
Installation
Install the package via pip:
pip install cortexrag
Or using uv for lightning-fast dependency management:
uv add cortexrag
Usage Example
Get your research pipeline running with just a few lines of code:
from cortexrag import Engine
from cortexrag.models import Llama, Gemini
# 1. Initialize your AI Models
model_research = Llama() # Optimized for extraction
model_synthesis = Gemini() # Optimized for deep reasoning
topic = "The impact of Machine Learning on modern medicine"
# 2. Configure the Engine
engine = Engine(
topic=topic,
models=(model_research, model_synthesis)
)
# 3. Execute the Autonomous Research & Indexing
engine.build()
Library integration module
Gemini:
from cortexrag.integration.google import GeminiModel
from google import genai
client = genai.Client(
api_key=API_KEY,
)
model = GeminiModel(client, 'gemini-3-flash-preview')
Claude:
from cortexrag.integration.anthropic import ClaudeModel
ChatGPT:
from cortexrag.integration.openai import OpenAIModel
Transformers:
from cortexrag.integration.transformers import TransformersModel
from cortexrag import Engine
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_NAME = 'model_name'
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = TransformersModel(tokenizer, model)
engine = Engine(
topic='Cars',
models=(model, model),
lang='ru'
)
engine.build()
Custom Models:
from cortexrag.integration import BaseChatModel
class CastomModel(BaseChatModel):
...
def generate(self, message: str):
...
🏗 System Architecture
CortexRAG breaks down the complexity into clear, agentic phases:
- Research Phase: Parallel web searching using DuckDuckGo or Crawl4AI.
- Processing Phase: Noise removal and structured Markdown extraction.
- Indexing Phase: Generating vector embeddings and persistent storage.
- Synthesis Phase: Final knowledge distillation and response generation.
🛠 Development
To set up the environment for development:
- Clone the repository:
git clone https://github.com/Dlzxn/CortexRAG.git
- Sync dependencies:
uv sync
Built for the future of Autonomous Intelligence.
Metadata
Release files for cortexrag 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cortexrag-0.1.2.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cortexrag-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.6 kB
Release files / cortexrag-0.1.2.tar.gz
| Download URL | cortexrag-0.1.2.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6534d248cf5ab179e9bcf49fde4d182318114c20682824094da0c6baed20472e
|
|
BLAKE2b-256 checksum How to use checksums |
4ac340eff350937aa106ce904acec7960ab0cbbdaf342490538a9f17f660a079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / cortexrag-0.1.2-py3-none-any.whl
| Download URL | cortexrag-0.1.2-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8199fd2bfd53b149e17317114bb6fb5342d70da5db56ed0d8930afa2ee25c3ff
|
|
BLAKE2b-256 checksum How to use checksums |
49c01736b8f4879975dfba6a6a562e00564e8b278f8d4594cdd202177c44471f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|