@exulu/backend that are not part of a class. For class APIs see the Core classes and the other reference pages in this section.
Functions
defaultChunker
ChunkerOperation used when a context configures an embedding model but does not provide a custom chunker. It runs the SentenceChunker over the item’s primary text content — checking content, then description, prefixed by name — and respects maxChunkSize as the per-chunk token budget.
Use defaultChunker directly when you want to invoke the standard chunking logic from a custom processor or in tests.
enableLiteLLMClientMode
LITELLM_PORT — colliding with the server’s process — or fail with “package root not set”.
enableLiteLLMClientMode is a no-op when the current process has already started its own supervisor (e.g. a combined server + worker process). It is idempotent.
See Self-hosting / LiteLLM for deployment context.
postgresClient
POSTGRES_DB_NAME, defaulting to "exulu"). Subsequent calls return the cached connection.
db is a Knex instance with pgvector registered, so vector operations (db.raw('... <=> ?', [vector])) work out of the box.
min: 2, max: 4. Connection timeouts, SSL, and credentials are read from environment variables (POSTGRES_DB_HOST, POSTGRES_DB_PORT, POSTGRES_DB_USER, POSTGRES_DB_PASSWORD, POSTGRES_DB_SSL).
Enums
EXULU_STATISTICS_TYPE_ENUM
type field in the statistics table.
The corresponding TypeScript union type is
EXULU_STATISTICS_TYPE.
EXULU_JOB_STATUS_ENUM
jobs table or filtering on queue inspector results.
The corresponding TypeScript union type is
EXULU_JOB_STATUS.
Types
ChunkerOperation
chunker option of an ExuluContext embedder config. utils.storage is available for chunkers that need to read files from object storage (e.g. to extract text from a PDF before chunking).
ChunkerResponse
ChunkerOperation. metadata is stored in a Postgres JSONB column — any JSON-serializable value is accepted (e.g. a page number from a PDF chunker).
ExuluContextEmbedder
ExuluContext. model is the LiteLLM model_name of the embedding model (declared in config.litellm.yaml). When queue is provided, embedding jobs run in the background via BullMQ.
ExuluAgent
ExuluAgent at the package boundary (the internal type is agent.ts:ExuluAgent). Passed to tool execute functions, ExuluEval.run, ExuluReranker.rerank, and other contexts where the calling agent’s identity is needed.
VectorSearchChunkResult
ExuluContext.search(), ExuluReadApi.authorizedRead(), and passed to ExuluReranker.rerank(). chunk_entities is present only when the entity layer is enabled for the context.
ExuluOauthConfig
ExuluTool. When a tool is constructed with an oauth property, IMP wraps its execute to require a valid access token. provider lets multiple tools share the same token under one consent grant; when omitted each tool uses its own id as the provider key.
See ExuluTool — introduction for the full OAuth integration guide.
ExuluOauthToolContext
execute inputs as inputs._oauth. expiresAt is null when the provider did not report an expiry. scopes is the space-joined granted scope string when reported.
ExuluItem
@EXULU_TYPES/models/item as ExuluItem for package consumers. The index signature ([key: string]: any) accommodates context-specific custom fields defined in ExuluContext.fields.