1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "owner_authorized": true,
12 "memories": [
13 {
14 "id": "synthetic-1",
15 "content": "The assistant prefers concise responses.",
16 "scope": "preferences",
17 "key": "response_style",
18 "value": "concise",
19 "updated_at": "2026-10-01T00:00:00Z",
20 "language": "en",
21 "protected": true
22 },
23 {
24 "id": "synthetic-2",
25 "content": "The assistant prefers detailed responses.",
26 "scope": "preferences",
27 "key": "response_style",
28 "value": "detailed",
29 "updated_at": "2026-10-02T00:00:00Z",
30 "language": "en"
31 }
32 ]
33};
34
35
36const run = await client.actor("jp-public-data/ai-clinic-memory-cleaning").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46