# damien148k/luciole_agents_v1 architecture

> Architecture diagram of the GitHub repository damien148k/luciole_agents_v1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/damien148k/luciole_agents_v1
- Repository: https://github.com/damien148k/luciole_agents_v1
- Video tour (about a minute): https://gitdiagram.com/damien148k/luciole_agents_v1/video

## Overview

Luciole is an offline, profile-driven platform for use-case agent loops; its documented RAG ingestion is the best-supported runtime workflow here. A user supplies a folder tree, parsers turn files into structured documents, metadata and chunks, and an ingestion pipeline writes a local metadata store plus vector and optional lexical indexes. Profiles, local model files and hardware settings configure that path. The README also names MRAe and sales assistant loops, but their runtime implementation is not present in this tree. Edges reflect excerpts, source-index references or README statements; unsampled features are included only where documented.

Main entry points: [`luciole/index/pipeline.py`](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/pipeline.py) (Ingestion pipeline), [`luciole/ingestion/registry.py`](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/registry.py) (Parser registry), [`luciole/ingestion/dossiers.py`](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/dossiers.py) (Dossier scan), [`luciole/ingestion/pdf.py`](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/pdf.py) (PDF parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingestion"]
  node_registry["Parser registry<br/>[registry.py]"]
  node_pdf["PDF parser<br/>[pdf.py]"]
  node_office["Office parser<br/>[office.py]"]
  node_text["Text parsers<br/>[text_parsers.py]"]
  node_ocr["OCR<br/>[ocr.py]"]
  node_dossiers["Dossier scan<br/>[dossiers.py]"]
  node_chunking["Chunk construction<br/>[chunking.py]"]
end

subgraph group_domain["Document model"]
  node_parsed["Parsed document<br/>[document.py]"]
  node_metadata["Metadata validation<br/>[metadata.py]"]
  node_records["Dossier records<br/>[dossier.py]"]
  node_chunks["Parent-child chunks<br/>[chunk.py]"]
end

subgraph group_indexing["Indexing"]
  node_pipeline["Ingestion pipeline<br/>[pipeline.py]"]
  node_watcher["Folder watcher<br/>[watcher.py]"]
  node_sqlite[("Metadata store<br/>[sqlite.py]")]
  node_embedder["Local embedder<br/>[local_embedder.py]"]
  node_qdrant[("Vector index<br/>[qdrant.py]")]
  node_opensearch[("Lexical index<br/>[opensearch.py]")]
end

subgraph group_config["Local configuration"]
  node_models["Model files<br/>[model_files.py]"]
  node_hardware["Hardware profile<br/>[hardware.py]"]
  node_profile["Use-case profile<br/>[profile.py]"]
  node_agent_loops["Use-case agent loops"]
  node_mrae["MRAe responses"]
  node_sales["Sales assistant"]
end

node_operator(("Operator"))
node_source_files["Folder corpus"]

node_operator -->|"provides corpus"| node_source_files
node_source_files -->|"indexes corpus"| node_pipeline
node_pipeline -->|"scans folders"| node_dossiers
node_pipeline -->|"parses files"| node_registry
node_registry -->|"dispatches PDF"| node_pdf
node_registry -->|"dispatches Office"| node_office
node_registry -->|"dispatches text"| node_text
node_pdf -->|"uses OCR"| node_ocr
node_pdf -->|"produces document"| node_parsed
node_office -->|"produces document"| node_parsed
node_text -->|"produces document"| node_parsed
node_dossiers -->|"validates fields"| node_metadata
node_dossiers -->|"parses files"| node_registry
node_dossiers -->|"builds records"| node_records
node_pipeline -->|"chunks documents"| node_chunking
node_chunking -->|"creates chunks"| node_chunks
node_pipeline -->|"writes metadata"| node_sqlite
node_pipeline -->|"embeds chunks"| node_embedder
node_pipeline -->|"writes vectors"| node_qdrant
node_pipeline -->|"writes lexical index"| node_opensearch
node_embedder -->|"loads local files"| node_models
node_embedder -->|"uses settings"| node_hardware
node_pipeline -->|"loads profile"| node_profile
node_watcher -->|"runs pipeline"| node_pipeline
node_operator -->|"uses platform"| node_agent_loops
node_agent_loops -->|"supports use case"| node_mrae
node_agent_loops -->|"supports use case"| node_sales

click node_pipeline "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/pipeline.py"
click node_watcher "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/watcher.py"
click node_registry "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/registry.py"
click node_pdf "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/pdf.py"
click node_office "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/office.py"
click node_text "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/text_parsers.py"
click node_ocr "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/ocr.py"
click node_dossiers "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/dossiers.py"
click node_parsed "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/document.py"
click node_metadata "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/metadata.py"
click node_records "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/dossier.py"
click node_chunking "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/chunking.py"
click node_chunks "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/chunk.py"
click node_sqlite "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/store/sqlite.py"
click node_embedder "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/local_embedder.py"
click node_models "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/model_files.py"
click node_hardware "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/hardware.py"
click node_profile "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/profile.py"
click node_qdrant "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/qdrant.py"
click node_opensearch "https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/opensearch.py"
click node_agent_loops "https://github.com/damien148k/luciole_agents_v1/tree/main/configs/profiles"
click node_mrae "https://github.com/damien148k/luciole_agents_v1/tree/main/configs/profiles/mrae"
click node_sales "https://github.com/damien148k/luciole_agents_v1/tree/main/configs/profiles/ventes"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_registry,node_pdf,node_office,node_text,node_ocr,node_dossiers,node_chunking toneBlue
class node_parsed,node_metadata,node_records,node_chunks toneAmber
class node_pipeline,node_watcher,node_sqlite,node_embedder,node_qdrant,node_opensearch toneMint
class node_models,node_hardware,node_profile,node_agent_loops,node_mrae,node_sales toneRose
class node_operator,node_source_files toneIndigo
```

## Components

### Ingestion

- [Parser registry](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/registry.py): `luciole/ingestion/registry.py`
- [PDF parser](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/pdf.py): `luciole/ingestion/pdf.py`
- [Office parser](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/office.py): `luciole/ingestion/office.py`
- [Text parsers](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/text_parsers.py): `luciole/ingestion/text_parsers.py`
- [OCR](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/ocr.py): `luciole/ingestion/ocr.py`
- [Dossier scan](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/dossiers.py): `luciole/ingestion/dossiers.py`
- [Chunk construction](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/ingestion/chunking.py): `luciole/ingestion/chunking.py`

### Document model

- [Parsed document](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/document.py): `luciole/core/document.py`
- [Metadata validation](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/metadata.py): `luciole/core/metadata.py`
- [Dossier records](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/dossier.py): `luciole/core/dossier.py`
- [Parent-child chunks](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/chunk.py): `luciole/core/chunk.py`

### Indexing

- [Ingestion pipeline](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/pipeline.py): `luciole/index/pipeline.py`
- [Folder watcher](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/watcher.py): `luciole/index/watcher.py`
- [Metadata store](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/store/sqlite.py): `luciole/store/sqlite.py`
- [Local embedder](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/local_embedder.py): `luciole/index/local_embedder.py`
- [Vector index](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/qdrant.py): `luciole/index/qdrant.py`
- [Lexical index](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/index/opensearch.py): `luciole/index/opensearch.py`

### Local configuration

- [Model files](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/model_files.py): `luciole/core/model_files.py`
- [Hardware profile](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/hardware.py): `luciole/core/hardware.py`
- [Use-case profile](https://github.com/damien148k/luciole_agents_v1/blob/main/luciole/core/profile.py): `luciole/core/profile.py`
- [Use-case agent loops](https://github.com/damien148k/luciole_agents_v1/tree/main/configs/profiles): `configs/profiles`
- [MRAe responses](https://github.com/damien148k/luciole_agents_v1/tree/main/configs/profiles/mrae): `configs/profiles/mrae`
- [Sales assistant](https://github.com/damien148k/luciole_agents_v1/tree/main/configs/profiles/ventes): `configs/profiles/ventes`

### Other components

- **Operator**
- **Folder corpus**

## Connections

- Operator → Folder corpus: provides corpus
- Folder corpus → Ingestion pipeline: indexes corpus (evidence: `luciole/index/pipeline.py`)
- Ingestion pipeline → Dossier scan: scans folders (evidence: `luciole/index/pipeline.py`)
- Ingestion pipeline → Parser registry: parses files (evidence: `luciole/index/pipeline.py`)
- Parser registry → PDF parser: dispatches PDF (evidence: `luciole/ingestion/registry.py`)
- Parser registry → Office parser: dispatches Office (evidence: `luciole/ingestion/registry.py`)
- Parser registry → Text parsers: dispatches text (evidence: `luciole/ingestion/registry.py`)
- PDF parser → OCR: uses OCR (evidence: `luciole/ingestion/pdf.py`)
- PDF parser → Parsed document: produces document (evidence: `luciole/ingestion/pdf.py`)
- Office parser → Parsed document: produces document (evidence: `luciole/ingestion/office.py`)
- Text parsers → Parsed document: produces document (evidence: `luciole/ingestion/text_parsers.py`)
- Dossier scan → Metadata validation: validates fields (evidence: `luciole/ingestion/dossiers.py`)
- Dossier scan → Parser registry: parses files (evidence: `luciole/ingestion/dossiers.py`)
- Dossier scan → Dossier records: builds records (evidence: `luciole/ingestion/dossiers.py`)
- Ingestion pipeline → Chunk construction: chunks documents (evidence: `luciole/index/pipeline.py`)
- Chunk construction → Parent-child chunks: creates chunks (evidence: `luciole/ingestion/chunking.py`)
- Ingestion pipeline → Metadata store: writes metadata (evidence: `luciole/index/pipeline.py`)
- Ingestion pipeline → Local embedder: embeds chunks (evidence: `luciole/index/pipeline.py`)
- Ingestion pipeline → Vector index: writes vectors (evidence: `luciole/index/pipeline.py`)
- Ingestion pipeline → Lexical index: writes lexical index (evidence: `luciole/index/pipeline.py`)
- Local embedder → Model files: loads local files (evidence: `luciole/index/local_embedder.py`)
- Local embedder → Hardware profile: uses settings (evidence: `luciole/index/local_embedder.py`)
- Ingestion pipeline → Use-case profile: loads profile (evidence: `luciole/index/pipeline.py`)
- Folder watcher → Ingestion pipeline: runs pipeline (evidence: `luciole/index/watcher.py`)
- Operator → Use-case agent loops: uses platform (evidence: `README.md`)
- Use-case agent loops → MRAe responses: supports use case (evidence: `README.md`)
- Use-case agent loops → Sales assistant: supports use case (evidence: `README.md`)
