MemoryStores
List MemoryStores
Retrieves a paginated list of memory stores in the workspace. Use cursor-based pagination parameters to navigate through the results.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.list(limit=10)
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.list({});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"search": Optional[str],
"updated_by": Optional[str],
"project_id": Optional[str],
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
search?: string;
updatedBy?: string;
projectId?: string;
}
Show Response
Show Response
{
"object": Literal["list"],
"data": {
"id": str,
"key": str,
"description": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"created": str,
"updated": str,
"ttl": OptionalNullable[float],
"embedding_config": {
"model": str,
},
},
"has_more": bool,
}
{
object: string;
data: {
id: string;
key: string;
description: string;
createdById?: string;
updatedById?: string;
created: string;
updated: string;
ttl?: number;
embeddingConfig: {
model: string;
};
};
hasMore: boolean;
}
Create a MemoryStore
Create memory storefrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.create(request={
"key": "<key>",
"embedding_config": {
"model": "cohere/embed-multilingual-light-v3.0",
},
"description": "unlike excluding soulful quirkily hmph baseboard whereas gee deserted",
"path": "Default",
})
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.create({
key: "<key>",
embeddingConfig: {
model: "cohere/embed-multilingual-light-v3.0",
},
description: "unlike excluding soulful quirkily hmph baseboard whereas gee deserted",
path: "Default",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"key": str, # required
"embedding_config": { # required
"model": str, # required
},
"description": str, # required
"ttl": OptionalNullable[float],
"path": str, # required
}
{
key: string; // required
embeddingConfig: { // required
model: string; // required
};
description: string; // required
ttl?: number;
path: string; // required
}
Show Response
Show Response
{
"id": str,
"key": str,
"description": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"created": str,
"updated": str,
"ttl": OptionalNullable[float],
"embedding_config": {
"model": str,
},
}
{
id: string;
key: string;
description: string;
createdById?: string;
updatedById?: string;
created: string;
updated: string;
ttl?: number;
embeddingConfig: {
model: string;
};
}
Retrieve a MemoryStore
Retrieves detailed information about a specific memory store, including its configuration and metadata.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.retrieve(memory_store_key="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.retrieve({
memoryStoreKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
}
{
memoryStoreKey: string; // required
}
Show Response
Show Response
{
"id": str,
"key": str,
"description": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"created": str,
"updated": str,
"ttl": OptionalNullable[float],
"embedding_config": {
"model": str,
},
}
{
id: string;
key: string;
description: string;
createdById?: string;
updatedById?: string;
created: string;
updated: string;
ttl?: number;
embeddingConfig: {
model: string;
};
}
Update a MemoryStore
Update the memory store configurationfrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.update(memory_store_key="<value>", description="wherever cash since now exempt proliferate aha tabulate ack", path="Default")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.update({
memoryStoreKey: "<value>",
requestBody: {
description: "wherever cash since now exempt proliferate aha tabulate ack",
path: "Default",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"description": Optional[str],
"ttl": OptionalNullable[float],
"path": Optional[str],
}
{
memoryStoreKey: string; // required
requestBody?: {
description?: string;
ttl?: number;
path?: string;
};
}
Show Response
Show Response
{
"id": str,
"key": str,
"description": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"created": str,
"updated": str,
"ttl": OptionalNullable[float],
"embedding_config": {
"model": str,
},
}
{
id: string;
key: string;
description: string;
createdById?: string;
updatedById?: string;
created: string;
updated: string;
ttl?: number;
embeddingConfig: {
model: string;
};
}
Delete a MemoryStore
Permanently delete a memory store, including memories and documents.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.memory_stores.delete(memory_store_key="<value>")
# Use the SDK ...
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
await orq.memoryStores.delete({
memoryStoreKey: "<value>",
});
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
}
{
memoryStoreKey: string; // required
}
List Memories
Retrieves a paginated list of memories for the memory storefrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.list_memories(memory_store_key="<value>", limit=10)
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.listMemories({
memoryStoreKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"q": Optional[str],
}
{
memoryStoreKey: string; // required
limit?: number;
startingAfter?: string;
endingBefore?: string;
q?: string;
}
Show Response
Show Response
{
"object": Literal["list"],
"data": {
"id": str,
"~~`entity_id`~~": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"store_id": str,
"workspace_id": str,
"documents_count": float,
},
"has_more": bool,
}
{
object: string;
data: {
id: string;
~~`entityId`~~: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
storeId: string;
workspaceId: string;
documentsCount: number;
};
hasMore: boolean;
}
Create Memory
Creates a new memory in the specified memory store.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.create_memory(memory_store_key="<value>", entity_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.createMemory({
memoryStoreKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"entity_id": str, # required
}
{
memoryStoreKey: string; // required
requestBody?: {
entityId: string; // required
};
}
Show Response
Show Response
{
"id": str,
"~~`entity_id`~~": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"store_id": str,
"workspace_id": str,
"documents_count": float,
}
{
id: string;
~~`entityId`~~: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
storeId: string;
workspaceId: string;
documentsCount: number;
}
Retrieve Memory
Retrieves details of a specific memory by its IDfrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.retrieve_memory(memory_store_key="<value>", memory_entity_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.retrieveMemory({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
}
Show Response
Show Response
{
"id": str,
"~~`entity_id`~~": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"store_id": str,
"workspace_id": str,
"documents_count": float,
}
{
id: string;
~~`entityId`~~: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
storeId: string;
workspaceId: string;
documentsCount: number;
}
Update Memory
Updates the details of a specific memory.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.update_memory(memory_store_key="<value>", memory_entity_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.updateMemory({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
"metadata": Dict[str, str],
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
requestBody?: {
metadata?: Record<string, string>;
};
}
Show Response
Show Response
{
"id": str,
"~~`entity_id`~~": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"store_id": str,
"workspace_id": str,
"documents_count": float,
}
{
id: string;
~~`entityId`~~: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
storeId: string;
workspaceId: string;
documentsCount: number;
}
Delete Memory
Permanently deletes a specific memory. Use this endpoint to:- Remove a memory from the store
- Clean up unused memories
- Manage memory storage space
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.memory_stores.delete_memory(memory_store_key="<value>", memory_entity_id="<id>")
# Use the SDK ...
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
await orq.memoryStores.deleteMemory({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
});
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
}
List Documents
Retrieves a paginated list of documents associated with a specific memory.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.list_documents(memory_store_key="<value>", memory_entity_id="<id>", limit=10)
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.listDocuments({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"updated_after": date,
"updated_before": date,
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
limit?: number;
startingAfter?: string;
endingBefore?: string;
updatedAfter?: Date;
updatedBefore?: Date;
}
Show Response
Show Response
{
"object": Literal["list"],
"data": {
"id": str,
"memory_id": str,
"store_id": str,
"text": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"workspace_id": str,
"metadata": Dict[str, str],
},
"has_more": bool,
}
{
object: string;
data: {
id: string;
memoryId: string;
storeId: string;
text: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
workspaceId: string;
metadata?: Record<string, string>;
};
hasMore: boolean;
}
Create Document
Creates a new document in the specified memory.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.create_document(memory_store_key="<value>", memory_entity_id="<id>", text="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.createDocument({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
"text": str, # required
"metadata": Dict[str, str],
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
requestBody?: {
text: string; // required
metadata?: Record<string, string>;
};
}
Show Response
Show Response
{
"id": str,
"memory_id": str,
"store_id": str,
"text": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"workspace_id": str,
"metadata": Dict[str, str],
}
{
id: string;
memoryId: string;
storeId: string;
text: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
workspaceId: string;
metadata?: Record<string, string>;
}
Retrieve Document
Retrieves details of a specific memory document by its ID.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.retrieve_document(memory_store_key="<value>", memory_entity_id="<id>", document_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.retrieveDocument({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
documentId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
"document_id": str, # required
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
documentId: string; // required
}
Show Response
Show Response
{
"id": str,
"memory_id": str,
"store_id": str,
"text": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"workspace_id": str,
"metadata": Dict[str, str],
}
{
id: string;
memoryId: string;
storeId: string;
text: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
workspaceId: string;
metadata?: Record<string, string>;
}
Update Document
Updates the details of a specific memory document.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.memory_stores.update_document(memory_store_key="<value>", memory_entity_id="<id>", document_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.memoryStores.updateDocument({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
documentId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
"document_id": str, # required
"text": Optional[str],
"metadata": Dict[str, str],
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
documentId: string; // required
requestBody?: {
text?: string;
metadata?: Record<string, string>;
};
}
Show Response
Show Response
{
"id": str,
"memory_id": str,
"store_id": str,
"text": str,
"created": str,
"updated": str,
"created_by_id": OptionalNullable[str],
"updated_by_id": OptionalNullable[str],
"workspace_id": str,
"metadata": Dict[str, str],
}
{
id: string;
memoryId: string;
storeId: string;
text: string;
created: string;
updated: string;
createdById?: string;
updatedById?: string;
workspaceId: string;
metadata?: Record<string, string>;
}
Delete Document
Permanently deletes a specific memory document. Use this endpoint to:- Remove a document from a memory
- Clean up unused documents
- Manage document storage space
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.memory_stores.delete_document(memory_store_key="<value>", memory_entity_id="<id>", document_id="<id>")
# Use the SDK ...
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
await orq.memoryStores.deleteDocument({
memoryStoreKey: "<value>",
memoryEntityId: "<id>",
documentId: "<id>",
});
}
run();
Show Parameters
Show Parameters
{
"memory_store_key": str, # required
"memory_entity_id": str, # required
"document_id": str, # required
}
{
memoryStoreKey: string; // required
memoryEntityId: string; // required
documentId: string; // required
}