Skip to content

Commit b98b8e7

Browse files
committed
updated run, pending agents update
1 parent 022bcc2 commit b98b8e7

File tree

1 file changed

+76
-16
lines changed

1 file changed

+76
-16
lines changed

tool_use/memory_cookbook.ipynb

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
},
6363
{
6464
"cell_type": "code",
65-
"execution_count": null,
65+
"execution_count": 36,
6666
"metadata": {},
6767
"outputs": [],
6868
"source": [
@@ -90,9 +90,17 @@
9090
},
9191
{
9292
"cell_type": "code",
93-
"execution_count": null,
93+
"execution_count": 37,
9494
"metadata": {},
95-
"outputs": [],
95+
"outputs": [
96+
{
97+
"name": "stdout",
98+
"output_type": "stream",
99+
"text": [
100+
"Repository already exists at /tmp/anthropic-quickstarts\n"
101+
]
102+
}
103+
],
96104
"source": [
97105
"import sys \n",
98106
"import os\n",
@@ -124,9 +132,17 @@
124132
},
125133
{
126134
"cell_type": "code",
127-
"execution_count": null,
135+
"execution_count": 38,
128136
"metadata": {},
129-
"outputs": [],
137+
"outputs": [
138+
{
139+
"name": "stdout",
140+
"output_type": "stream",
141+
"text": [
142+
"*eye roll* Another laptop crisis. What's it doing? Singing off-key? Refusing to work unless you feed it cookies? Details, please.\n"
143+
]
144+
}
145+
],
130146
"source": [
131147
"import nest_asyncio\n",
132148
"nest_asyncio.apply()\n",
@@ -166,7 +182,7 @@
166182
},
167183
{
168184
"cell_type": "code",
169-
"execution_count": null,
185+
"execution_count": 39,
170186
"metadata": {},
171187
"outputs": [],
172188
"source": [
@@ -289,7 +305,7 @@
289305
},
290306
{
291307
"cell_type": "code",
292-
"execution_count": null,
308+
"execution_count": 40,
293309
"metadata": {},
294310
"outputs": [],
295311
"source": [
@@ -364,7 +380,7 @@
364380
},
365381
{
366382
"cell_type": "code",
367-
"execution_count": null,
383+
"execution_count": 41,
368384
"metadata": {},
369385
"outputs": [],
370386
"source": [
@@ -544,9 +560,33 @@
544560
},
545561
{
546562
"cell_type": "code",
547-
"execution_count": null,
563+
"execution_count": 43,
548564
"metadata": {},
549-
"outputs": [],
565+
"outputs": [
566+
{
567+
"data": {
568+
"text/plain": [
569+
"[{'type': 'file',\n",
570+
" 'id': 'file_011CPaGpXxdBojQLTszA5LGp',\n",
571+
" 'size_bytes': 544347,\n",
572+
" 'created_at': '2025-05-28T16:51:06.716000Z',\n",
573+
" 'filename': 'sample.pdf',\n",
574+
" 'mime_type': 'application/pdf',\n",
575+
" 'downloadable': False},\n",
576+
" {'type': 'file',\n",
577+
" 'id': 'file_011CPYNG2Sf1cWjuCFhKJFV7',\n",
578+
" 'size_bytes': 3,\n",
579+
" 'created_at': '2025-05-27T16:41:15.335000Z',\n",
580+
" 'filename': 'number.txt',\n",
581+
" 'mime_type': 'text/plain',\n",
582+
" 'downloadable': True}]"
583+
]
584+
},
585+
"execution_count": 43,
586+
"metadata": {},
587+
"output_type": "execute_result"
588+
}
589+
],
550590
"source": [
551591
"import requests\n",
552592
"import mimetypes\n",
@@ -621,10 +661,11 @@
621661
" raise ValueError(f\"Failed to upload file: {res.status_code} - {res.text}\")\n",
622662
" \n",
623663
"# example usage\n",
624-
"file_path = \"/Users/user/Downloads/SB1029-ProjectUpdate-FINAL_020317-A11Y.pdf\" # REPLACE\n",
664+
"#file_path = \"/Users/user/Downloads/SB1029-ProjectUpdate-FINAL_020317-A11Y.pdf\" # REPLACE\n",
625665
"storage_manager = StorageManager(os.getenv(\"ANTHROPIC_API_KEY\"))\n",
626-
"uploaded = storage_manager.upload_file(file_path)\n",
627-
"storage_manager.get_file_metadata(uploaded['id'])"
666+
"#uploaded = storage_manager.upload_file(file_path)\n",
667+
"#storage_manager.get_file_metadata(uploaded['id'])\n",
668+
"storage_manager.list_files()[:2]"
628669
]
629670
},
630671
{
@@ -673,9 +714,28 @@
673714
},
674715
{
675716
"cell_type": "code",
676-
"execution_count": null,
717+
"execution_count": 44,
677718
"metadata": {},
678-
"outputs": [],
719+
"outputs": [
720+
{
721+
"data": {
722+
"text/plain": [
723+
"memory\n",
724+
"├── self_managed\n",
725+
"│ ├── user_session_notes\n",
726+
"│ │ ├── ongoing_projects.txt\n",
727+
"│ │ └── preferences.txt\n",
728+
"│ └── projects\n",
729+
"│ └── building_agi.txt\n",
730+
"└── files\n",
731+
" └── projects"
732+
]
733+
},
734+
"execution_count": 44,
735+
"metadata": {},
736+
"output_type": "execute_result"
737+
}
738+
],
679739
"source": [
680740
"# example usage\n",
681741
"company_agent_memory = MemoryTree()\n",
@@ -700,7 +760,7 @@
700760
},
701761
{
702762
"cell_type": "code",
703-
"execution_count": null,
763+
"execution_count": 45,
704764
"metadata": {},
705765
"outputs": [],
706766
"source": [

0 commit comments

Comments
 (0)