await knowledge.store({
collection: "transactions",
type: "transaction",
id: "TXN-001",
content: {
customer_id: "CUS-1022",
amount: 5000,
currency: "NGN",
status: "failed",
reason: "insufficient_funds",
},
});Maps to POST /memory/v1/store.
Bulk store#
await knowledge.storeMany({
collection: "transactions",
items: [
{ id: "TXN-002", content: { amount: 100 } },
{ id: "TXN-003", content: { amount: 200 } },
],
});Maps to POST /memory/v1/store-many.
Get#
await knowledge.get({
collection: "transactions",
id: "TXN-001",
});Maps to POST /memory/v1/get.
Update#
Content keys are shallow-merged into the existing object.
await knowledge.update({
collection: "transactions",
id: "TXN-001",
content: {
status: "resolved",
},
});Maps to POST /memory/v1/update.
Delete#
await knowledge.delete({
collection: "transactions",
id: "TXN-001",
});Maps to POST /memory/v1/delete (mode: "soft" default, or "permanent").