QVAC Logo

ragCloseWorkspace( )

Closes a RAG workspace, releasing in-memory resources (Corestore, HyperDB adapter, RAG instance). **Workspace lifecycle:** Workspaces are implicitly opened. This function explicitly closes them, releasing memory and file locks. The workspace data remains on disk unless `deleteOnClose` is set to true.

function ragCloseWorkspace(params?: any): Promise

Description

Closes a RAG workspace, releasing in-memory resources (Corestore, HyperDB adapter, RAG instance).

Workspace lifecycle: Workspaces are implicitly opened. This function explicitly closes them, releasing memory and file locks. The workspace data remains on disk unless deleteOnClose is set to true.

Parameters

NameTypeRequired?Description
paramsanyThe parameters for closing

Returns

Promise

Examples

// Close a specific workspace
await ragCloseWorkspace({ workspace: "my-docs" });

// Close and delete in one call
await ragCloseWorkspace({ workspace: "my-docs", deleteOnClose: true });

On this page