API Reference
omni_ingest
Modules:
| Name | Description |
|---|---|
agent |
Specialized agents for parsing, cleaning, chunking, and enriching knowledge items. |
cli |
Command-line entrypoint for running Omni Ingest pipeline YAML files. |
core |
Core logic and foundational data models for the ingestion framework. |
parser |
Resource readers for turning local or remote inputs into resolved content. |
port |
Interfaces and concrete implementations for external storage and data connectivity. |
agent
Specialized agents for parsing, cleaning, chunking, and enriching knowledge items.
Modules:
| Name | Description |
|---|---|
chunking |
Agents for segmenting large documents and transcripts into manageable chunks. |
deduplication |
Deduplication strategies for vector indexing. |
document |
Document agents. |
enrichment |
Agents for structured metadata extraction and enrichment. |
governance |
Agents for pipeline validation, audit logging, and lineage metadata. |
indexing |
Agents for generating embeddings. |
modality |
Agents for modality transformation. |
chunking
Agents for segmenting large documents and transcripts into manageable chunks.
Classes:
| Name | Description |
|---|---|
PageChunkingAgent |
Partitions PDF documents based on their original page layout. |
PageStitchingAgent |
Combines selected PDF page items into larger PDF items. |
SentenceChunkingAgent |
Segments text into discrete chunks while maintaining sentence boundaries. |
TimedChunkingAgent |
Segments audio transcription data into temporal blocks. |
PageChunkingAgent
pydantic-model
Bases: BaseModel, Step
Partitions PDF documents based on their original page layout.
This agent creates distinct KnowledgeItems for each page identified in a PDF source, maintaining the hierarchical structure of the input document.
Fields:
-
mode(Literal['text', 'pdf'])
Source code in src/omni_ingest/agent/chunking.py
PageStitchingAgent
pydantic-model
Bases: BaseModel, Step
Combines selected PDF page items into larger PDF items.
jq expressions define the stitch specs and selected page item ids, making this reusable for chapters, sections, ranges, or any metadata-driven slices.
Fields:
Source code in src/omni_ingest/agent/chunking.py
metadata
pydantic-field
jq expression producing metadata for each stitched item
SentenceChunkingAgent
pydantic-model
Bases: BaseModel, Step
Segments text into discrete chunks while maintaining sentence boundaries.
Large documents are partitioned into smaller segments of a specified character count. The agent prioritizes breaks at sentence endings to preserve contextual integrity for subsequent search operations.
Fields:
-
chunk_size(PositiveInt) -
overlap(NonNegativeInt) -
foreach(JqExpression) -
input(JqExpression) -
separators(list[str])
Source code in src/omni_ingest/agent/chunking.py
TimedChunkingAgent
pydantic-model
Bases: BaseModel, Step
Segments audio transcription data into temporal blocks.
This agent divides indexed audio text into intervals based on timestamps, facilitating precise time-based search and retrieval within audiovisual datasets.
Fields:
-
segment_duration(timedelta) -
overlap(timedelta) -
pause_threshold(timedelta | None) -
tokens(JqExpression) -
text(JqExpression) -
start(JqExpression) -
duration(JqExpression) -
units_per_second(PositiveInt)
Validators:
-
_validate_segment_duration→segment_duration -
_validate_overlap→overlap -
_validate_pause_threshold→pause_threshold
Source code in src/omni_ingest/agent/chunking.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
pause_threshold
pydantic-field
Silence threshold to split blocks
segment_duration
pydantic-field
Target duration of each time block
tokens
pydantic-field
jq expression selecting timed tokens
deduplication
Deduplication strategies for vector indexing.
Classes:
| Name | Description |
|---|---|
DeduplicationResult |
Outcome of applying deduplication to a batch of items. |
DeduplicationStrategy |
Base class for item deduplication strategies. |
DeterministicIdDeduplicationStrategy |
Assigns stable IDs to items and skips IDs that already exist. |
NoDeduplicationStrategy |
Leaves the batch unchanged. |
NormalizedTextHashDeduplicationStrategy |
Deduplicates text items using a hash of normalized text. |
ScopedDeduplicationStrategy |
Deduplication strategy that can operate within a tenant or a source. |
ShingleJaccardDeduplicationStrategy |
Deduplicates text items using Jaccard similarity over token shingles. |
DeduplicationResult
pydantic-model
Bases: BaseModel
Outcome of applying deduplication to a batch of items.
Fields:
-
kept_items(list[KnowledgeItem]) -
input_count(int) -
dropped_count(int) -
strategy(str) -
scope(DeduplicationScope | None)
Source code in src/omni_ingest/agent/deduplication.py
DeduplicationStrategy
pydantic-model
Bases: BaseModel, ABC
Base class for item deduplication strategies.
Config:
extra:forbid
Fields:
-
kind(str)
Source code in src/omni_ingest/agent/deduplication.py
deduplicate
abstractmethod
async
DeterministicIdDeduplicationStrategy
pydantic-model
Bases: ScopedDeduplicationStrategy
Assigns stable IDs to items and skips IDs that already exist.
Fields:
-
scope(DeduplicationScope) -
existing(JqExpression) -
kind(Literal['deterministic_id']) -
identity(JqExpression)
Source code in src/omni_ingest/agent/deduplication.py
NoDeduplicationStrategy
pydantic-model
Bases: DeduplicationStrategy
Leaves the batch unchanged.
Fields:
-
kind(Literal['none'])
Source code in src/omni_ingest/agent/deduplication.py
NormalizedTextHashDeduplicationStrategy
pydantic-model
Bases: ScopedDeduplicationStrategy
Deduplicates text items using a hash of normalized text.
Fields:
Source code in src/omni_ingest/agent/deduplication.py
ScopedDeduplicationStrategy
pydantic-model
Bases: DeduplicationStrategy, ABC
Deduplication strategy that can operate within a tenant or a source.
Fields:
Source code in src/omni_ingest/agent/deduplication.py
ShingleJaccardDeduplicationStrategy
pydantic-model
Bases: ScopedDeduplicationStrategy
Deduplicates text items using Jaccard similarity over token shingles.
Fields:
-
scope(DeduplicationScope) -
existing(JqExpression) -
kind(Literal['shingle_jaccard']) -
threshold(float) -
shingle_size(PositiveInt)
Source code in src/omni_ingest/agent/deduplication.py
document
Document agents.
Classes:
| Name | Description |
|---|---|
ImageExtractionAgent |
Extract images and vector drawings from PDF items. |
OcrAgent |
Extracts items into Markdown using a configured OCR engine. |
RasterizeAgent |
Rasterizes PDF items into image-only PDFs. |
ImageExtractionAgent
pydantic-model
Bases: BaseModel, Step
Extract images and vector drawings from PDF items.
Fields:
-
foreach(JqExpression) -
input(JqExpression) -
dpi(PositiveInt) -
padding(NonNegativeFloat) -
include_vector(bool) -
include_tables(bool) -
deduplicate(bool) -
replace(bool) -
mode(Literal['preserve', 'redact', 'caption']) -
workers(PositiveInt)
Source code in src/omni_ingest/agent/document.py
mode
pydantic-field
How extracted images are represented in the parent PDF: preserve leaves the PDF unchanged, redact replaces each image with an <image id=...> marker, and caption keeps each image while adding its marker below it.
OcrAgent
pydantic-model
Bases: BaseModel, Step
Extracts items into Markdown using a configured OCR engine.
Fields:
-
foreach(JqExpression) -
input(JqExpression) -
engine(str) -
src_lang(str | None) -
dst_lang(str | None) -
workers(PositiveInt)
Source code in src/omni_ingest/agent/document.py
dst_lang
pydantic-field
Destination language hint for OCR engines that support it
src_lang
pydantic-field
Source language hint for OCR engines that support it
RasterizeAgent
pydantic-model
Bases: BaseModel, Step
Rasterizes PDF items into image-only PDFs.
Useful when a PDF has a corrupted or unreliable text layer and downstream vision models must read the visible page content instead.
Fields:
Source code in src/omni_ingest/agent/document.py
enrichment
Agents for structured metadata extraction and enrichment.
Classes:
| Name | Description |
|---|---|
ExtractAgent |
Extracts structured output with an LLM and writes it to metadata. |
ExtractAssertion |
|
PromptAgent |
Write model output to pipeline metadata. |
TransformAgent |
Applies jq transforms to root metadata. |
TranslateAgent |
Translates text or structured metadata in place. |
ExtractAgent
pydantic-model
Bases: BaseModel, Step, AgentMixin
Extracts structured output with an LLM and writes it to metadata.
Fields:
-
model(KnownModelName | str | None) -
toolsets(list[str]) -
retries(int | None) -
prompt(str) -
json_schema(dict[str, Any] | JqExpression) -
path(JqExpression) -
foreach(JqExpression) -
input(JqExpression) -
context(JqExpression | None) -
mode(Literal['direct', 'buffered']) -
assertions(list[ExtractAssertion]) -
concurrency(PositiveInt)
Source code in src/omni_ingest/agent/enrichment.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
concurrency
pydantic-field
Maximum number of selected documents to extract concurrently
context
pydantic-field
jq expression selecting extra prompt context
foreach
pydantic-field
jq expression selecting documents to extract from
json_schema
pydantic-field
JSON schema or jq expression producing one
mode
pydantic-field
How selected input is supplied to the model
ExtractAssertion
pydantic-model
Bases: BaseModel
Fields:
Source code in src/omni_ingest/agent/enrichment.py
PromptAgent
pydantic-model
Bases: BaseModel, Step, AgentMixin
Write model output to pipeline metadata.
Fields:
-
model(KnownModelName | str | None) -
toolsets(list[str]) -
retries(int | None) -
prompt(str) -
input(JqExpression) -
path(JqExpression)
Source code in src/omni_ingest/agent/enrichment.py
TransformAgent
pydantic-model
Bases: BaseModel, Step
Applies jq transforms to root metadata.
Fields:
Source code in src/omni_ingest/agent/enrichment.py
TranslateAgent
pydantic-model
Bases: BaseModel, Step
Translates text or structured metadata in place.
Fields:
-
src(str | None) -
dst(str) -
input(JqExpression) -
path(JqExpression) -
skip_fields(list[str]) -
model(KnownTranslationModelName)
Source code in src/omni_ingest/agent/enrichment.py
governance
Agents for pipeline validation, audit logging, and lineage metadata.
Classes:
| Name | Description |
|---|---|
DataLineageAgent |
Maintains data provenance and lineage information for KnowledgeItems. |
IngestionLoggerAgent |
Records operational metadata for ingestion pipeline execution. |
DataLineageAgent
pydantic-model
Bases: BaseModel, Step
Maintains data provenance and lineage information for KnowledgeItems.
This agent attaches metadata documenting the origin and transformation history of each KnowledgeItem, ensuring traceability from the source data to the finalized index.
Source code in src/omni_ingest/agent/governance.py
IngestionLoggerAgent
pydantic-model
Bases: BaseModel, Step
Records operational metadata for ingestion pipeline execution.
This agent logs audit information—including execution timestamps and item counts—to the metadata store, providing a record for monitoring and auditing purposes.
Source code in src/omni_ingest/agent/governance.py
indexing
Agents for generating embeddings.
Classes:
| Name | Description |
|---|---|
EmbeddingAgent |
Generates vector embeddings for KnowledgeItems to facilitate semantic search. |
EmbeddingAgent
pydantic-model
Bases: BaseModel, Step
Generates vector embeddings for KnowledgeItems to facilitate semantic search.
This agent converts textual content into numerical vector representations (embeddings). These vectors enable similarity-based retrieval operations within a vector database.
Fields:
-
model(KnownEmbeddingModelName | str) -
foreach(JqExpression) -
input(JqExpression) -
path(JqExpression)
Source code in src/omni_ingest/agent/indexing.py
model
pydantic-field
Model to use for embedding
modality
Agents for modality transformation.
Classes:
| Name | Description |
|---|---|
TextAgent |
Transforms incoming modality into textual content. |
TextAgent
pydantic-model
Bases: BaseModel, Step, AgentMixin
Transforms incoming modality into textual content.
This agent normalizes resources and existing KnowledgeItems to text. This is useful when downstream processing expects textual content. If the content is already text, it only records the encoding on the object.
Note that this agent infers content type using libmagic to check for text/
prefix. The output content may be of any valid text/ type, not necessarily
text/plain.
Fields:
-
model(KnownModelName | str | None) -
toolsets(list[str]) -
retries(int | None) -
encoding(str) -
image_conversion_prompt(str)
Source code in src/omni_ingest/agent/modality.py
image_conversion_prompt
pydantic-field
image_conversion_prompt: str = (
"Convert the image into a complete, accessibility-focused text description for someone who cannot see it. Capture all visible text exactly, describe the layout, objects, people, actions, relationships, colors, symbols, charts, tables, UI elements, and any important visual context. Preserve reading order where possible. Be factual, avoid guessing, and clearly mark anything uncertain. The output should let a visually impaired person understand and reason about the image without needing to view it."
)
The prompt to use when transforming image to text.
cli
Command-line entrypoint for running Omni Ingest pipeline YAML files.
core
Core logic and foundational data models for the ingestion framework.
Modules:
| Name | Description |
|---|---|
config |
Configuration management and environment variable loading for the framework. |
content |
Content URI construction for virtual content. |
event |
|
model |
Pydantic data models for knowledge items, contexts, and results. |
ocr |
OCR engine abstraction and factory wiring. |
output |
Output abstractions for finalized ingestion contexts. |
pipeline |
Orchestration logic for defining and executing ingestion pipelines. |
protocol |
Protocol definitions (Abstract Base Classes) for framework extensibility. |
config
Configuration management and environment variable loading for the framework.
Classes:
| Name | Description |
|---|---|
Settings |
Global application settings, loaded from environment variables or .env file. |
Settings
Bases: BaseSettings
Global application settings, loaded from environment variables or .env file.
Attributes:
| Name | Type | Description |
|---|---|---|
azure_speech_key |
SecretStr | None
|
Azure Speech SDK subscription key |
azure_speech_region |
str | None
|
Azure Speech SDK service region |
azure_translation_key |
SecretStr | None
|
Azure Translator subscription key |
azure_translation_region |
str | None
|
Azure Translator service region |
default_chat_completion_model |
KnownModelName | str
|
Default chat completion model to use during pipeline execution |
default_embedding_model |
KnownEmbeddingModelName | str
|
Default embedding completion model to use during pipeline execution |
default_ocr_engine |
str
|
Default OCR engine used by the ocr step, selected entirely through environment configuration |
default_translation_model |
KnownTranslationModelName
|
Default translation model to use during pipeline execution |
documentintelligence_api_key |
SecretStr | None
|
Azure Document Intelligence API key |
documentintelligence_endpoint |
AnyHttpUrl | None
|
Azure Document Intelligence endpoint |
graph_store |
GraphStoreConfig
|
Graph store configuration selected entirely through environment configuration |
metadata_store |
str
|
SQLAlchemy connection string |
ocr_api_key |
SecretStr | None
|
API key for OpenAI-compatible OCR |
ocr_base_url |
AnyHttpUrl | None
|
Base URL for OpenAI-compatible OCR |
ocr_model |
str
|
Model to use for OpenAI-compatible OCR |
profiles_dir |
Path
|
Directory containing reusable pipeline components |
vector_store |
VectorStoreConfig
|
Vector store configuration selected entirely through environment configuration |
Source code in src/omni_ingest/core/config.py
azure_speech_key
class-attribute
instance-attribute
Azure Speech SDK subscription key
azure_speech_region
class-attribute
instance-attribute
Azure Speech SDK service region
azure_translation_key
class-attribute
instance-attribute
Azure Translator subscription key
azure_translation_region
class-attribute
instance-attribute
Azure Translator service region
default_chat_completion_model
class-attribute
instance-attribute
Default chat completion model to use during pipeline execution
default_embedding_model
class-attribute
instance-attribute
Default embedding completion model to use during pipeline execution
default_ocr_engine
class-attribute
instance-attribute
Default OCR engine used by the ocr step, selected entirely through environment configuration
default_translation_model
class-attribute
instance-attribute
Default translation model to use during pipeline execution
documentintelligence_api_key
class-attribute
instance-attribute
Azure Document Intelligence API key
documentintelligence_endpoint
class-attribute
instance-attribute
Azure Document Intelligence endpoint
graph_store
class-attribute
instance-attribute
Graph store configuration selected entirely through environment configuration
metadata_store
class-attribute
instance-attribute
SQLAlchemy connection string
ocr_api_key
class-attribute
instance-attribute
API key for OpenAI-compatible OCR
ocr_base_url
class-attribute
instance-attribute
Base URL for OpenAI-compatible OCR
ocr_model
class-attribute
instance-attribute
Model to use for OpenAI-compatible OCR
profiles_dir
class-attribute
instance-attribute
Directory containing reusable pipeline components
content
Content URI construction for virtual content.
event
Classes:
| Name | Description |
|---|---|
Event |
Base class for all events. |
PipelineBeginEvent |
Event emitted at the start of a pipeline. |
PipelineEndEvent |
Event emitted at the end of a pipeline. |
PipelineStepBeginEvent |
Event emitted at the start of a pipeline step. |
PipelineStepEndEvent |
Event emitted at the end of a pipeline step. |
Functions:
| Name | Description |
|---|---|
publish |
Publishes an event to all subscribers. |
shutdown |
Shuts down the event system, notifying all subscribers. |
subscribe |
Subscribes to the event stream, yielding events as they are published. |
Event
dataclass
Base class for all events.
Attributes:
| Name | Type | Description |
|---|---|---|
identifier |
str
|
Unique identifier for the event |
metadata |
dict[str, Any]
|
Additional event metadata |
timestamp |
datetime
|
Event creation timestamp |
Source code in src/omni_ingest/core/event.py
metadata
class-attribute
instance-attribute
Additional event metadata
PipelineBeginEvent
dataclass
Bases: Event, _PipelineMixin
Event emitted at the start of a pipeline.
Source code in src/omni_ingest/core/event.py
PipelineEndEvent
dataclass
Bases: Event, _PipelineMixin
Event emitted at the end of a pipeline.
Attributes:
| Name | Type | Description |
|---|---|---|
error |
str | None
|
Human-readable error message if the pipeline failed |
status |
Literal['succeeded', 'failed']
|
Outcome of the pipeline |
Source code in src/omni_ingest/core/event.py
PipelineStepBeginEvent
dataclass
Bases: Event, _PipelineMixin, _StepMixin
Event emitted at the start of a pipeline step.
Source code in src/omni_ingest/core/event.py
PipelineStepEndEvent
dataclass
Bases: Event, _PipelineMixin, _StepMixin
Event emitted at the end of a pipeline step.
Attributes:
| Name | Type | Description |
|---|---|---|
step_result |
StepResult
|
Result of the step execution |
Source code in src/omni_ingest/core/event.py
publish
shutdown
subscribe
async
Subscribes to the event stream, yielding events as they are published.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
populate_with_buffered
|
bool
|
Whether to initialize this subscriber with buffered events. |
True
|
Source code in src/omni_ingest/core/event.py
model
Pydantic data models for knowledge items, contexts, and results.
Classes:
| Name | Description |
|---|---|
AgentMixin |
|
KnowledgeItem |
Represents a discrete unit of information within the framework. |
PipelineCheckpoint |
State restored when a pipeline run resumes. |
PipelineConfig |
Configuration for a complete ingestion pipeline. |
Step |
|
StepConfig |
|
StepResult |
Result of an individual agentic step. |
ValidationCheck |
A jq validation attached to a pipeline step. |
AgentMixin
Attributes:
| Name | Type | Description |
|---|---|---|
model |
KnownModelName | str | None
|
Model to use for this step |
retries |
int | None
|
Per-category retry budgets for tools and output validation |
toolsets |
list[str]
|
Toolsets to enable for the agent |
Source code in src/omni_ingest/core/model.py
KnowledgeItem
pydantic-model
Bases: ByteContent
Represents a discrete unit of information within the framework.
A KnowledgeItem serves as a container for processed data, such as text segments, audio transcripts, or structured metadata. It is the primary entity processed and transformed throughout the ingestion pipeline.
Config:
from_attributes:Truepopulate_by_name:True
Fields:
-
content_uri(str | None) -
content_encoding(str) -
raw_content(StrictBytes) -
id(UUID) -
tenant_id(UUID | None) -
source_uri(str | None) -
metadata(dict[str, Any])
Source code in src/omni_ingest/core/model.py
metadata
pydantic-field
Arbitrary key-value pairs for additional contextual information
PipelineCheckpoint
pydantic-model
Bases: BaseModel
State restored when a pipeline run resumes.
Fields:
-
stage(int) -
resource(ResolvedResource) -
tenant_id(UUID) -
domain_profile(str) -
metadata(dict[str, Any]) -
items(list[KnowledgeItem])
Source code in src/omni_ingest/core/model.py
PipelineConfig
pydantic-model
Bases: BaseModel
Configuration for a complete ingestion pipeline.
Fields:
-
pipeline_id(str | None) -
domain_profile(str) -
input_modality(str | None) -
description(str | None) -
parameters(dict[str, Any]) -
steps(list[StepConfig]) -
tool_vendors(dict[str, MCPServerTypes])
Source code in src/omni_ingest/core/model.py
parameters
pydantic-field
JSON schema for configurable pipeline parameters
steps
pydantic-field
Agentic steps partitioned into ordered execution stages
Step
Bases: ABC
Methods:
| Name | Description |
|---|---|
run |
Executes the specific logic for this ingestion step. |
Source code in src/omni_ingest/core/model.py
run
abstractmethod
async
StepConfig
pydantic-model
Bases: BaseModel
Fields:
-
agent(str) -
description(str | None) -
stage(str | None) -
config(dict[str, Any]) -
validation(list[ValidationCheck])
Source code in src/omni_ingest/core/model.py
StepResult
pydantic-model
Bases: BaseModel
Result of an individual agentic step.
Fields:
-
status(StepStatus) -
output_paths(dict[str, str]) -
error(str | None) -
metadata(dict[str, Any]) -
items(list[KnowledgeItem])
Source code in src/omni_ingest/core/model.py
output_paths
pydantic-field
Paths to any artifacts generated by the step
ValidationCheck
pydantic-model
Bases: BaseModel
A jq validation attached to a pipeline step.
condition checks skip the step when false. before checks run before the
step. after checks run after a successful step and can inspect .result.
plain checks run before the step, but when they pass, they stop the remaining
validation chain for that step.
Fields:
Source code in src/omni_ingest/core/model.py
ocr
OCR engine abstraction and factory wiring.
Functions:
| Name | Description |
|---|---|
build_simple_factory |
Build an |
build_simple_factory
Build an OcrFactory that dispatches by engine name to a fixed mapping.
Source code in src/omni_ingest/core/ocr.py
output
Output abstractions for finalized ingestion contexts.
Classes:
| Name | Description |
|---|---|
GraphStoreOutput |
Writes finalized graph data to a graph store. |
JsonFileOutput |
Writes finalized ingestion output to a JSON file. |
MongoDocumentOutput |
Writes KnowledgeItems as flat BSON documents to a plain MongoDB collection. |
PickleFileOutput |
Writes finalized ingestion output to a pickle file. |
StdoutOutput |
Writes finalized ingestion output to stdout as JSON. |
VectorStoreOutput |
Writes finalized knowledge items to a vector store. |
GraphStoreOutput
Bases: Output
Writes finalized graph data to a graph store.
Attributes:
| Name | Type | Description |
|---|---|---|
store |
The GraphStore implementation to use |
Source code in src/omni_ingest/core/output.py
JsonFileOutput
Bases: FileOutput
Writes finalized ingestion output to a JSON file.
Source code in src/omni_ingest/core/output.py
MongoDocumentOutput
Bases: Output
Writes KnowledgeItems as flat BSON documents to a plain MongoDB collection.
URI format
mongodb://host:port/database/collection
Source code in src/omni_ingest/core/output.py
PickleFileOutput
Bases: FileOutput
Writes finalized ingestion output to a pickle file.
Source code in src/omni_ingest/core/output.py
StdoutOutput
Bases: Output
Writes finalized ingestion output to stdout as JSON.
Source code in src/omni_ingest/core/output.py
VectorStoreOutput
Bases: Output
Writes finalized knowledge items to a vector store.
Attributes:
| Name | Type | Description |
|---|---|---|
store |
The physical database where data will be saved |
|
deduplication_strategy |
Strategy used to skip duplicate items before indexing |
Source code in src/omni_ingest/core/output.py
pipeline
Orchestration logic for defining and executing ingestion pipelines.
Classes:
| Name | Description |
|---|---|
IngestionContext |
Maintains state and shared metadata across a single ingestion pipeline execution. |
KnowledgeBaseAdapter |
Provides a high-level interface for querying and retrieving ingested knowledge. |
PipelineRunner |
Orchestrates the execution of data processing steps within an ingestion pipeline. |
Functions:
| Name | Description |
|---|---|
create_pipeline_from_config |
Factory function to create a PipelineRunner from a YAML configuration file. |
register_step |
Register a Step class in the global factory. |
IngestionContext
dataclass
Bases: Generic[ResourceT]
Maintains state and shared metadata across a single ingestion pipeline execution.
The IngestionContext object facilitates communication between sequential processing steps by carrying operational state, configuration parameters, and the current set of KnowledgeItems.
Attributes:
| Name | Type | Description |
|---|---|---|
content_resolver |
ContentResolver
|
Reference to a storage engine or backend |
domain_profile |
str
|
The configuration profile being executed |
items |
list[KnowledgeItem]
|
The working set of knowledge items |
metadata |
dict[str, Any]
|
Shared state or context across steps |
ocr_factory |
OcrFactory
|
OCR factory to vend OCR engines from |
run_id |
UUID
|
Unique identifier for the current pipeline run |
store |
MetadataStore
|
Reference to a storage engine or backend |
tenant_id |
UUID
|
Identifier for the active tenant |
Source code in src/omni_ingest/core/pipeline.py
content_resolver
class-attribute
instance-attribute
Reference to a storage engine or backend
domain_profile
class-attribute
instance-attribute
The configuration profile being executed
items
class-attribute
instance-attribute
The working set of knowledge items
metadata
class-attribute
instance-attribute
Shared state or context across steps
ocr_factory
class-attribute
instance-attribute
OCR factory to vend OCR engines from
run_id
class-attribute
instance-attribute
Unique identifier for the current pipeline run
store
class-attribute
instance-attribute
Reference to a storage engine or backend
KnowledgeBaseAdapter
Provides a high-level interface for querying and retrieving ingested knowledge.
The adapter abstracts the underlying storage mechanisms, such as vector databases and metadata stores, allowing for unified search and retrieval operations across different data domain profiles.
Source code in src/omni_ingest/core/pipeline.py
PipelineRunner
Orchestrates the execution of data processing steps within an ingestion pipeline.
The PipelineRunner is responsible for initializing the IngestionContext, executing ordered stages of configured steps (agents), and managing the overall lifecycle of the ingestion process, including error handling and status reporting. Steps in a stage run concurrently against the same ingestion context.
Methods:
| Name | Description |
|---|---|
resume |
Resumes a pipeline run from its latest successful-stage checkpoint. |
run |
Executes the ingestion pipeline. |
Source code in src/omni_ingest/core/pipeline.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
resume
async
resume(
run_id: UUID,
store: MetadataStore,
output: Output | None = None,
) -> tuple[
IngestionContext[ResolvedResource],
Awaitable[list[StepResult]],
]
Resumes a pipeline run from its latest successful-stage checkpoint.
Source code in src/omni_ingest/core/pipeline.py
run
async
Executes the ingestion pipeline.
Runs stages sequentially and their steps concurrently, updating the shared context and reporting progress to the metadata store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
IngestionContext[Any]
|
The shared ingestion context containing items and state. |
required |
Returns:
| Type | Description |
|---|---|
list[StepResult]
|
A list of StepResult objects, one for each executed step. |
Source code in src/omni_ingest/core/pipeline.py
create_pipeline_from_config
create_pipeline_from_config(
config_path: Path,
factory: StepFactory | None = None,
config_args: dict[str, Any] | None = None,
) -> PipelineRunner
Factory function to create a PipelineRunner from a YAML configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
Path
|
Path to the .yaml configuration file. |
required |
factory
|
StepFactory | None
|
Factory to use to resolve and load steps from. |
None
|
Source code in src/omni_ingest/core/pipeline.py
register_step
Register a Step class in the global factory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Name used to identify this step in configurations. |
required |
cls
|
type[Step]
|
Step class the identifier must model. |
required |
override
|
bool
|
Whether to override if step with the ID already exists. |
False
|
Source code in src/omni_ingest/core/pipeline.py
protocol
Protocol definitions (Abstract Base Classes) for framework extensibility.
Classes:
| Name | Description |
|---|---|
ContentResolver |
Resolve virtual content URIs into bytes during ingestion. |
MetadataStore |
Interface for metadata management and data lineage tracking. |
Translator |
Translate text or string values in a nested dictionary. |
VectorStore |
Interface for vector-based search and retrieval systems. |
ContentResolver
Bases: Protocol
Resolve virtual content URIs into bytes during ingestion.
ByteContent.content(ctx) delegates to ctx.content_resolver whenever an
item has content_uri instead of inline raw_content. Implementations can
use full ingestion context to resolve routes against source resources,
object stores, caches, or other pipeline-scoped state.
Methods:
| Name | Description |
|---|---|
resolve |
Return resolved bytes or raise |
Source code in src/omni_ingest/core/protocol.py
resolve
async
MetadataStore
Bases: Protocol
Interface for metadata management and data lineage tracking.
The MetadataStore protocol defines the operations required for managing relational data, including multi-tenancy records, pipeline execution logs, and data provenance information.
Methods:
| Name | Description |
|---|---|
create_knowledge_item |
Persists a new knowledge item. |
create_pipeline_run |
Records the start of a pipeline run. |
create_step_run |
Records the start of a pipeline step. |
create_tenant |
Creates a new tenant. |
get_default_pipeline_version |
Retrieves the default version for a pipeline. |
get_knowledge_item |
Retrieves a knowledge item by ID. |
get_pipeline_checkpoint |
Returns the latest checkpoint for a pipeline run. |
get_pipeline_version |
Retrieves a specific pipeline version. |
get_tenant |
Retrieves a tenant by slug. |
list_knowledge_items |
Lists knowledge items for a tenant. |
set_pipeline_checkpoint |
Replaces the checkpoint, or deletes it when checkpoint is None. |
update_pipeline_run |
Updates the status of a pipeline run. |
update_step_run |
Updates the status and metadata of a step run. |
upsert_pipeline |
Creates or updates a pipeline definition. |
upsert_pipeline_version |
Creates or updates a pipeline version. |
Source code in src/omni_ingest/core/protocol.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
create_knowledge_item
async
create_knowledge_item(
tenant_id: UUID,
domain_profile: str,
modality: str,
source_uri: str,
content: bytes | None = None,
pipeline_version_id: UUID | None = None,
title: str | None = None,
description: str | None = None,
structured_views: JsonObject | None = None,
lineage: JsonObject | None = None,
metadata: JsonObject | None = None,
) -> UUID
Persists a new knowledge item.
Source code in src/omni_ingest/core/protocol.py
create_pipeline_run
async
create_step_run
async
create_tenant
async
get_default_pipeline_version
async
get_knowledge_item
async
get_pipeline_checkpoint
async
get_pipeline_version
async
get_tenant
async
list_knowledge_items
async
set_pipeline_checkpoint
async
update_pipeline_run
async
update_step_run
async
upsert_pipeline
async
Translator
Bases: Protocol
Translate text or string values in a nested dictionary.
Source code in src/omni_ingest/core/protocol.py
VectorStore
Bases: Protocol
Interface for vector-based search and retrieval systems.
The VectorStore protocol specifies methods for storing and querying mathematical vector representations of data, enabling semantic search capabilities based on contextual meaning.
Methods:
| Name | Description |
|---|---|
close |
Closes the connection to the store. |
count |
Returns the total number of items in the store. |
search |
Searches for items similar to the given query vector. |
upsert |
Persists or updates knowledge items in the store. |
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
str
|
Stable identifier for the backing vector store implementation. |
space |
str
|
Logical namespace used by the vector store, such as a table or collection. |
Source code in src/omni_ingest/core/protocol.py
parser
Resource readers for turning local or remote inputs into resolved content.
Functions:
| Name | Description |
|---|---|
as_wav |
Return (wav_path, is_temp). If |
as_wav
async
Return (wav_path, is_temp). If src is already a WAV it is returned
unchanged. Otherwise it is converted to a temporary WAV file; the
caller owns that file and must delete it when done.
Source code in src/omni_ingest/parser.py
port
Interfaces and concrete implementations for external storage and data connectivity.
Modules:
| Name | Description |
|---|---|
content |
Content resolver implementations. |
graph_store |
|
metadata_store |
Persistent storage implementation for pipeline metadata and tenant information. |
ocr |
OCR engine builders for document/page-image to Markdown extraction. |
translator |
Translation service implementations. |
vector_store |
Implementations for storing and querying high-dimensional vector embeddings. |
content
Content resolver implementations.
graph_store
Classes:
| Name | Description |
|---|---|
InMemoryGraphStore |
Volatile in-memory implementation of a graph store for testing and local dev. |
Neo4jGraphStore |
Production graph storage using Neo4j. |
InMemoryGraphStore
Bases: GraphStore
Volatile in-memory implementation of a graph store for testing and local dev.
Source code in src/omni_ingest/port/graph_store.py
Neo4jGraphStore
Bases: GraphStore
Production graph storage using Neo4j.
Source code in src/omni_ingest/port/graph_store.py
metadata_store
Persistent storage implementation for pipeline metadata and tenant information.
Classes:
| Name | Description |
|---|---|
NullMetadataStore |
Metadata store that preserves metadata records without storing item content. |
SQLAlchemyMetadataStore |
SQLAlchemy-based implementation of the MetadataStore protocol. |
NullMetadataStore
Bases: MetadataStore
Metadata store that preserves metadata records without storing item content.
Source code in src/omni_ingest/port/metadata_store.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | |
SQLAlchemyMetadataStore
Bases: MetadataStore
SQLAlchemy-based implementation of the MetadataStore protocol.
Persistent storage for tenants, pipeline runs, and knowledge base tracking using an asynchronous SQL backend.
Methods:
| Name | Description |
|---|---|
close |
Disposes of the database engine and releases all connections. |
Source code in src/omni_ingest/port/metadata_store.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
ocr
OCR engine builders for document/page-image to Markdown extraction.
Functions:
| Name | Description |
|---|---|
by_page |
Wrap a single-image |
llm_ocr_builder |
OCR via a vision LLM. Sends the document as-is (PDF or image) in one call — any |
openai_ocr_builder |
OCR via any OpenAI-compatible vision/chat-completions endpoint. |
by_page
by_page(
extract_page: Ocr,
dpi: int = 200,
ocr_scanned: bool = True,
text_layer_threshold: int = 20,
) -> Ocr
Wrap a single-image Ocr into a full-document Ocr
Source code in src/omni_ingest/port/ocr.py
llm_ocr_builder
llm_ocr_builder(
ctx: IngestionContext[ResolvedResource],
src_lang: str | None,
dst_lang: str | None,
) -> Ocr
OCR via a vision LLM. Sends the document as-is (PDF or image) in one call — any
Source code in src/omni_ingest/port/ocr.py
openai_ocr_builder
openai_ocr_builder(
ctx: IngestionContext[ResolvedResource],
src_lang: str | None,
dst_lang: str | None,
) -> Ocr
OCR via any OpenAI-compatible vision/chat-completions endpoint.
Source code in src/omni_ingest/port/ocr.py
translator
Translation service implementations.
vector_store
Implementations for storing and querying high-dimensional vector embeddings.
Classes:
| Name | Description |
|---|---|
AzureVectorSearchStore |
Azure AI Search vector retrieval backed by a pre-created index. |
ChromaVectorStore |
Persistent ChromaDB storage for local vector retrieval. |
InMemoryVectorStore |
Volatile, fast vector storage suitable for testing and ephemeral processing. |
LanceDBVectorStore |
Vector storage and semantic search powered by LanceDB. |
MongoVectorStore |
MongoDB Atlas vector search backed by a pre-provisioned search index. |
QdrantVectorStore |
Production-grade vector search using Qdrant. |
AzureVectorSearchStore
Bases: VectorStore
Azure AI Search vector retrieval backed by a pre-created index.
Source code in src/omni_ingest/port/vector_store.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | |
ChromaVectorStore
Bases: VectorStore
Persistent ChromaDB storage for local vector retrieval.
Source code in src/omni_ingest/port/vector_store.py
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | |
InMemoryVectorStore
Bases: LanceDBVectorStore
Volatile, fast vector storage suitable for testing and ephemeral processing.
Source code in src/omni_ingest/port/vector_store.py
LanceDBVectorStore
Bases: VectorStore
Vector storage and semantic search powered by LanceDB.
Source code in src/omni_ingest/port/vector_store.py
MongoVectorStore
Bases: VectorStore
MongoDB Atlas vector search backed by a pre-provisioned search index.
Source code in src/omni_ingest/port/vector_store.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | |
QdrantVectorStore
Bases: VectorStore
Production-grade vector search using Qdrant.
Source code in src/omni_ingest/port/vector_store.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |