ExuluReadApi provides low-level, RBAC-enforced read functions for knowledge contexts. Where ExuluContext.search() covers relevance-ranked retrieval, ExuluReadApi covers targeted reads by item ID or external ID, embed-query utilities, and table-name resolution — all while applying the same access-control rules as the GraphQL layer.
Use ExuluReadApi when you need to read specific known items without going through vector search, or when you need the underlying table names to build custom queries.
API surface
ExuluReadApi.authorizedRead
applyAccessControl. At least itemIds or externalIds must be supplied — unconstrained full-table reads are rejected.
The context to read from. Must have an
id matching a registered ExuluContext.Authenticated user. Used for RBAC filtering on the items table.
Role ID. Merged into the user object so access-control’s role branch works correctly.
Filter to chunks whose parent item ID is in this list.
Filter to chunks whose parent item
external_id is in this list.Restrict to a contiguous range of
chunk_index values within the matched items.Chunk rows with joined item metadata, ordered by
(source, chunk_index).ExuluReadApi.embedQuery
ExuluReadApi.entitiesAvailable
true when the context declares an entities config and the corresponding _chunk_entities table physically exists. Use this to guard entity tool registration at runtime.
Table-name helpers
Example
Notes
authorizedReadalways applies RBAC viaapplyAccessControlon theitemsalias — this gate cannot be bypassed throughopts.- Results are ordered by
(chunks.source, chunks.chunk_index)— stable page order for items with multiple chunks. embedQueryroutes through the sameresolveEmbedderpath as the ingestion pipeline, so LiteLLM cost attribution applies.
Related
- ExuluContext — introduction:
ExuluContext.search()for relevance-ranked retrieval. VectorSearchChunkResult: shape of the returned chunk rows.