File size: 88,905 Bytes
0b5a701
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": 25,
      "metadata": {
        "id": "LYLftQMbY-LW",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "4cff713f-8711-40e7-9c94-49aa3cc02bcb"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: smolagents[toolkit] in /usr/local/lib/python3.11/dist-packages (1.14.0)\n",
            "\u001b[33mWARNING: smolagents 1.14.0 does not provide the extra 'toolkit'\u001b[0m\u001b[33m\n",
            "\u001b[0mRequirement already satisfied: huggingface-hub>=0.28.0 in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (0.30.2)\n",
            "Requirement already satisfied: requests>=2.32.3 in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (2.32.3)\n",
            "Requirement already satisfied: rich>=13.9.4 in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (13.9.4)\n",
            "Requirement already satisfied: jinja2>=3.1.4 in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (3.1.6)\n",
            "Requirement already satisfied: pillow>=11.0.0 in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (11.2.1)\n",
            "Requirement already satisfied: markdownify>=0.14.1 in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (1.1.0)\n",
            "Requirement already satisfied: duckduckgo-search>=6.3.7 in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (8.0.1)\n",
            "Requirement already satisfied: python-dotenv in /usr/local/lib/python3.11/dist-packages (from smolagents[toolkit]) (1.1.0)\n",
            "Requirement already satisfied: click>=8.1.8 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents[toolkit]) (8.1.8)\n",
            "Requirement already satisfied: primp>=0.15.0 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents[toolkit]) (0.15.0)\n",
            "Requirement already satisfied: lxml>=5.3.0 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents[toolkit]) (5.4.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents[toolkit]) (3.18.0)\n",
            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents[toolkit]) (2025.3.2)\n",
            "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents[toolkit]) (24.2)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents[toolkit]) (6.0.2)\n",
            "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents[toolkit]) (4.67.1)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents[toolkit]) (4.13.2)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2>=3.1.4->smolagents[toolkit]) (3.0.2)\n",
            "Requirement already satisfied: beautifulsoup4<5,>=4.9 in /usr/local/lib/python3.11/dist-packages (from markdownify>=0.14.1->smolagents[toolkit]) (4.13.4)\n",
            "Requirement already satisfied: six<2,>=1.15 in /usr/local/lib/python3.11/dist-packages (from markdownify>=0.14.1->smolagents[toolkit]) (1.17.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents[toolkit]) (3.4.1)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents[toolkit]) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents[toolkit]) (2.4.0)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents[toolkit]) (2025.4.26)\n",
            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.11/dist-packages (from rich>=13.9.4->smolagents[toolkit]) (3.0.0)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.11/dist-packages (from rich>=13.9.4->smolagents[toolkit]) (2.19.1)\n",
            "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.11/dist-packages (from beautifulsoup4<5,>=4.9->markdownify>=0.14.1->smolagents[toolkit]) (2.7)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.11/dist-packages (from markdown-it-py>=2.2.0->rich>=13.9.4->smolagents[toolkit]) (0.1.2)\n"
          ]
        }
      ],
      "source": [
        "!pip install -U smolagents[toolkit]\n"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install smolagents  # Install smolagents"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "GQxYhy7ludJB",
        "outputId": "4e1dd9ea-603a-4154-d51e-4cf630d99c9b"
      },
      "execution_count": 15,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: smolagents in /usr/local/lib/python3.11/dist-packages (1.14.0)\n",
            "Requirement already satisfied: huggingface-hub>=0.28.0 in /usr/local/lib/python3.11/dist-packages (from smolagents) (0.30.2)\n",
            "Requirement already satisfied: requests>=2.32.3 in /usr/local/lib/python3.11/dist-packages (from smolagents) (2.32.3)\n",
            "Requirement already satisfied: rich>=13.9.4 in /usr/local/lib/python3.11/dist-packages (from smolagents) (13.9.4)\n",
            "Requirement already satisfied: jinja2>=3.1.4 in /usr/local/lib/python3.11/dist-packages (from smolagents) (3.1.6)\n",
            "Requirement already satisfied: pillow>=11.0.0 in /usr/local/lib/python3.11/dist-packages (from smolagents) (11.2.1)\n",
            "Requirement already satisfied: markdownify>=0.14.1 in /usr/local/lib/python3.11/dist-packages (from smolagents) (1.1.0)\n",
            "Requirement already satisfied: duckduckgo-search>=6.3.7 in /usr/local/lib/python3.11/dist-packages (from smolagents) (8.0.1)\n",
            "Requirement already satisfied: python-dotenv in /usr/local/lib/python3.11/dist-packages (from smolagents) (1.1.0)\n",
            "Requirement already satisfied: click>=8.1.8 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents) (8.1.8)\n",
            "Requirement already satisfied: primp>=0.15.0 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents) (0.15.0)\n",
            "Requirement already satisfied: lxml>=5.3.0 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents) (5.4.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (3.18.0)\n",
            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (2025.3.2)\n",
            "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (24.2)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (6.0.2)\n",
            "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (4.67.1)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (4.13.2)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2>=3.1.4->smolagents) (3.0.2)\n",
            "Requirement already satisfied: beautifulsoup4<5,>=4.9 in /usr/local/lib/python3.11/dist-packages (from markdownify>=0.14.1->smolagents) (4.13.4)\n",
            "Requirement already satisfied: six<2,>=1.15 in /usr/local/lib/python3.11/dist-packages (from markdownify>=0.14.1->smolagents) (1.17.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (3.4.1)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (2.4.0)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (2025.4.26)\n",
            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.11/dist-packages (from rich>=13.9.4->smolagents) (3.0.0)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.11/dist-packages (from rich>=13.9.4->smolagents) (2.19.1)\n",
            "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.11/dist-packages (from beautifulsoup4<5,>=4.9->markdownify>=0.14.1->smolagents) (2.7)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.11/dist-packages (from markdown-it-py>=2.2.0->rich>=13.9.4->smolagents) (0.1.2)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install --upgrade smolagents  # Update smolagents to the latest version"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "6BTZt6Gquy_k",
        "outputId": "81a90b9c-f85a-4569-9a69-33d1226353dc"
      },
      "execution_count": 20,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: smolagents in /usr/local/lib/python3.11/dist-packages (1.14.0)\n",
            "Requirement already satisfied: huggingface-hub>=0.28.0 in /usr/local/lib/python3.11/dist-packages (from smolagents) (0.30.2)\n",
            "Requirement already satisfied: requests>=2.32.3 in /usr/local/lib/python3.11/dist-packages (from smolagents) (2.32.3)\n",
            "Requirement already satisfied: rich>=13.9.4 in /usr/local/lib/python3.11/dist-packages (from smolagents) (13.9.4)\n",
            "Requirement already satisfied: jinja2>=3.1.4 in /usr/local/lib/python3.11/dist-packages (from smolagents) (3.1.6)\n",
            "Requirement already satisfied: pillow>=11.0.0 in /usr/local/lib/python3.11/dist-packages (from smolagents) (11.2.1)\n",
            "Requirement already satisfied: markdownify>=0.14.1 in /usr/local/lib/python3.11/dist-packages (from smolagents) (1.1.0)\n",
            "Requirement already satisfied: duckduckgo-search>=6.3.7 in /usr/local/lib/python3.11/dist-packages (from smolagents) (8.0.1)\n",
            "Requirement already satisfied: python-dotenv in /usr/local/lib/python3.11/dist-packages (from smolagents) (1.1.0)\n",
            "Requirement already satisfied: click>=8.1.8 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents) (8.1.8)\n",
            "Requirement already satisfied: primp>=0.15.0 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents) (0.15.0)\n",
            "Requirement already satisfied: lxml>=5.3.0 in /usr/local/lib/python3.11/dist-packages (from duckduckgo-search>=6.3.7->smolagents) (5.4.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (3.18.0)\n",
            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (2025.3.2)\n",
            "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (24.2)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (6.0.2)\n",
            "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (4.67.1)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.28.0->smolagents) (4.13.2)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2>=3.1.4->smolagents) (3.0.2)\n",
            "Requirement already satisfied: beautifulsoup4<5,>=4.9 in /usr/local/lib/python3.11/dist-packages (from markdownify>=0.14.1->smolagents) (4.13.4)\n",
            "Requirement already satisfied: six<2,>=1.15 in /usr/local/lib/python3.11/dist-packages (from markdownify>=0.14.1->smolagents) (1.17.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (3.4.1)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (2.4.0)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.3->smolagents) (2025.4.26)\n",
            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.11/dist-packages (from rich>=13.9.4->smolagents) (3.0.0)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.11/dist-packages (from rich>=13.9.4->smolagents) (2.19.1)\n",
            "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.11/dist-packages (from beautifulsoup4<5,>=4.9->markdownify>=0.14.1->smolagents) (2.7)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.11/dist-packages (from markdown-it-py>=2.2.0->rich>=13.9.4->smolagents) (0.1.2)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel\n",
        "\n",
        "# Inicialize o modelo\n",
        "model = InferenceClientModel()\n",
        "\n",
        "# Inicialize a ferramenta de busca\n",
        "search_tool = DuckDuckGoSearchTool()\n",
        "\n",
        "# Crie o agente com a ferramenta de busca\n",
        "agent = CodeAgent(tools=[search_tool], model=model)\n",
        "\n",
        "# Execute uma consulta\n",
        "response = agent.run(\"Qual a altura do Cristo Redentor?\")\n",
        "print(response)\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "u92U9-FwtYGy",
        "outputId": "83e41566-a5e7-44cd-8bb5-8ab8e4bb3204"
      },
      "execution_count": 27,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[38;2;212;183;2m╭─\u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[1;38;2;212;183;2mNew run\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╮\u001b[0m\n",
              "\u001b[38;2;212;183;2m│\u001b[0m                                                                                                                 \u001b[38;2;212;183;2m│\u001b[0m\n",
              "\u001b[38;2;212;183;2m│\u001b[0m \u001b[1mQual a altura do Cristo Redentor?\u001b[0m                                                                               \u001b[38;2;212;183;2m│\u001b[0m\n",
              "\u001b[38;2;212;183;2m│\u001b[0m                                                                                                                 \u001b[38;2;212;183;2m│\u001b[0m\n",
              "\u001b[38;2;212;183;2m╰─\u001b[0m\u001b[38;2;212;183;2m InferenceClientModel - Qwen/Qwen2.5-Coder-32B-Instruct \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">╭──────────────────────────────────────────────────── </span><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">New run</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ────────────────────────────────────────────────────╮</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>                                                                                                                 <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\">Qual a altura do Cristo Redentor?</span>                                                                               <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>                                                                                                                 <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">╰─ InferenceClientModel - Qwen/Qwen2.5-Coder-32B-Instruct ────────────────────────────────────────────────────────╯</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m1\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mtranslated_question\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34msearch\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mquery\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mQual a altura do Cristo Redentor?\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                        \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mf\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mThe translated question is \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m{\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtranslated_question\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m}\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m.\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                    \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mheight_info\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mweb_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mquery\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mheight of Christ the Redeemer\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mheight_info\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                                                             \u001b[0m  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">translated_question </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> search(query</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"Qual a altura do Cristo Redentor?\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\">                                        </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">f\"The translated question is {</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">translated_question</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">}.\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\">                                                    </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">height_info </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> web_search(query</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"height of Christ the Redeemer\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\">                                                </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(height_info)</span><span style=\"background-color: #272822\">                                                                                             </span>  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1;31mCode execution failed at line \u001b[0m\u001b[32m'translated_question = search\u001b[0m\u001b[32m(\u001b[0m\u001b[32mquery\u001b[0m\u001b[32m=\u001b[0m\u001b[32m\"Qual\u001b[0m\u001b[32m a altura do Cristo Redentor?\"\u001b[0m\u001b[32m)\u001b[0m\u001b[32m'\u001b[0m\u001b[1;31m due to: \u001b[0m\n",
              "\u001b[1;31mInterpreterError: Forbidden function evaluation: \u001b[0m\u001b[32m'search'\u001b[0m\u001b[1;31m is not among the explicitly allowed tools or \u001b[0m\n",
              "\u001b[1;31mdefined/imported in the preceding code\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">Code execution failed at line </span><span style=\"color: #008000; text-decoration-color: #008000\">'translated_question = search(query=\"Qual a altura do Cristo Redentor?\")'</span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\"> due to: </span>\n",
              "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">InterpreterError: Forbidden function evaluation: </span><span style=\"color: #008000; text-decoration-color: #008000\">'search'</span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\"> is not among the explicitly allowed tools or </span>\n",
              "<span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">defined/imported in the preceding code</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[2m[Step 1: Duration 0.25 seconds| Input tokens: 2,047 | Output tokens: 97]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 1: Duration 0.25 seconds| Input tokens: 2,047 | Output tokens: 97]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m2\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mheight_info\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mweb_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mquery\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mheight of Christ the Redeemer\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mheight_info\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                                                             \u001b[0m  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">height_info </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> web_search(query</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"height of Christ the Redeemer\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\">                                                </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(height_info)</span><span style=\"background-color: #272822\">                                                                                             </span>  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1mExecution logs:\u001b[0m\n",
              "## Search Results\n",
              "\n",
              "[Christ the Redeemer | History, Height, & Facts | Britannica](https://www.britannica.com/topic/Christ-the-Redeemer)\n",
              "Christ the Redeemer, colossal statue of Jesus Christ at the summit of Mount Corcovado, Rio de Janeiro, Brazil. It \n",
              "was completed in 1931 and stands 98 feet (30 meters) tall. The statue is the largest Art Deco-style sculpture in \n",
              "the world and is one of Rio de Janeiro's most recognizable landmarks.\n",
              "\n",
              "[Christ the Redeemer (statue) - Wikipedia](https://en.wikipedia.org/wiki/Christ_the_Redeemer_(statue))\n",
              "Christ the Redeemer (Portuguese: Cristo Redentor, standard Brazilian Portuguese: [ˈkɾistu ʁedẽˈtoʁ]) is an Art Deco\n",
              "statue of Jesus in Rio de Janeiro, Brazil, created by French-Polish sculptor Paul Landowski and built by Brazilian \n",
              "engineer Heitor da Silva Costa, in collaboration with French engineer Albert Caquot. Romanian sculptor Gheorghe \n",
              "Leonida sculpted the face.\n",
              "\n",
              "[Christ The Redeemer: Height, History, And Significance Of Brazil's \n",
              "...](https://travelpander.com/christ-the-redeemer-how-tall/)\n",
              "The exact height of Christ the Redeemer from base to tip is approximately 38 meters (125 feet), including its \n",
              "pedestal. The statue itself is about 30 meters (98 feet) tall, while the pedestal adds an additional 8 meters (26 \n",
              "feet). Key measurements of Christ the Redeemer: 1. Total height (statue + pedestal): 38 meters (125 feet) 2.\n",
              "\n",
              "[Christ the Redeemer - History, Meaning, Height, Construction & Other \n",
              "...](https://worldhistoryedu.com/christ-the-redeemer-history-meaning-height-construction-other-notable-facts/)\n",
              "By 1931, the Christ the Redeemer statue was up and looked over the lands. All in all, it cost, at the time, about a\n",
              "quarter of a million USD to complete the statue. In today's US Dollar equivalent, that figure is around $ 4 \n",
              "million. Christ the Redeemer was inaugurated on 12th October 1931. Renovations and Restoration\n",
              "\n",
              "[Christ The Redeemer Statue: Fascinating Facts, History, And Height Of \n",
              "...](https://travelpander.com/brazil-statue-of-christ-the-redeemer-facts/)\n",
              "The Christ the Redeemer statue in Brazil was completed in 1931. It stands 30 meters tall and has arms measuring 28 \n",
              "meters. The statue weighs 635 metric tons ... Brazil, stands at a height of 30 meters (98 feet) without its \n",
              "pedestal. The total height, including the pedestal, reaches 38 meters (125 feet).\n",
              "\n",
              "[Dimensions of Christ the Redeemer - Wonders of the \n",
              "world](https://www.wonders-of-the-world.net/Christ-the-Redeemer/Dimensions-of-Christ-the-Redeemer.php)\n",
              "Christ the Redeemer of Rio, on the hill of Corcovado, is a large statue, but it is far from being among the highest\n",
              "in the world. It measures 38m high, of which 8m for the base. ... Total height: 38m; Height of the statue: 30m; \n",
              "Height of the pedestal: 8m; Height of the head: 3,75m; Lenght of a hand: 3,20m; Width: 8,50m; Total Scope: 28m;\n",
              "\n",
              "[Christ the Redeemer: 12 facts about Brazil's beloved \n",
              "monument](https://www.goaheadtours.com/travel-blog/articles/facts-about-christ-the-redeemer)\n",
              "The dynamic city on Brazil's southeastern coast is known for many things—its gorgeous beaches, legendary Carnival, \n",
              "and the iconic, towering statue of Jesus known as Christ the Redeemer, or Cristo Redentor in Portuguese. The statue\n",
              "stands 98 feet tall with arms spanning 92 feet and sits on a 26-foot-high pedestal.\n",
              "\n",
              "[Christ the Redeemer - 7 Wonders](https://7wonders.org/south-america/brazil/rio-de-janeiro/christ-redeemer/)\n",
              "The statue of Christ the Redeemer is located at the top of Corcovado Mountain. The entire monument of statue of \n",
              "Christ the Redeemer is 38m high with the statue accounting for 30m and overlooking the city of Rio de Janeiro is \n",
              "one of the tallest statues in the world; the span from finger tip to fingertip is 28m and there is a small chapel \n",
              "housed in the base.\n",
              "\n",
              "[Christ the Redeemer - Paul Landowski](https://www.paul-landowski.com/en/le-christ-de-rio/)\n",
              "Height of the head: 3.75 meters. The order of the archbishop of Rio with Heitor da Silva Costa. In May 1922, the \n",
              "\"catholic Circle\" of Rio takes up a 63 years old idea, which consisted in building a figure of Christ on a hill \n",
              "overhanging the city and the bay of Rio. Among several proposals for a \"monument with Christ the Redeemer\", the ...\n",
              "\n",
              "[Christ The Redeemer Statue (Everything To Know Before A \n",
              "Visit)](https://thetouristchecklist.com/christ-the-redeemer-statue/)\n",
              "The Christ the Redeemer Statue is one of the most iconic landmarks in the world. The sheer size and stature of this\n",
              "colossal statue of Jesus Christ dominate the skyline of Rio de Janeiro, Brazil. At 30 meters tall, not including \n",
              "its 8 meter pedestal, this masterpiece sits atop Corcovado Mountain, which rises 700 meters above the ground. ...\n",
              "\n",
              "Out: None\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
              "## Search Results\n",
              "\n",
              "[Christ the Redeemer | History, Height, &amp; Facts | Britannica](https://www.britannica.com/topic/Christ-the-Redeemer)\n",
              "Christ the Redeemer, colossal statue of Jesus Christ at the summit of Mount Corcovado, Rio de Janeiro, Brazil. It \n",
              "was completed in 1931 and stands 98 feet (30 meters) tall. The statue is the largest Art Deco-style sculpture in \n",
              "the world and is one of Rio de Janeiro's most recognizable landmarks.\n",
              "\n",
              "[Christ the Redeemer (statue) - Wikipedia](https://en.wikipedia.org/wiki/Christ_the_Redeemer_(statue))\n",
              "Christ the Redeemer (Portuguese: Cristo Redentor, standard Brazilian Portuguese: [ˈkɾistu ʁedẽˈtoʁ]) is an Art Deco\n",
              "statue of Jesus in Rio de Janeiro, Brazil, created by French-Polish sculptor Paul Landowski and built by Brazilian \n",
              "engineer Heitor da Silva Costa, in collaboration with French engineer Albert Caquot. Romanian sculptor Gheorghe \n",
              "Leonida sculpted the face.\n",
              "\n",
              "[Christ The Redeemer: Height, History, And Significance Of Brazil's \n",
              "...](https://travelpander.com/christ-the-redeemer-how-tall/)\n",
              "The exact height of Christ the Redeemer from base to tip is approximately 38 meters (125 feet), including its \n",
              "pedestal. The statue itself is about 30 meters (98 feet) tall, while the pedestal adds an additional 8 meters (26 \n",
              "feet). Key measurements of Christ the Redeemer: 1. Total height (statue + pedestal): 38 meters (125 feet) 2.\n",
              "\n",
              "[Christ the Redeemer - History, Meaning, Height, Construction &amp; Other \n",
              "...](https://worldhistoryedu.com/christ-the-redeemer-history-meaning-height-construction-other-notable-facts/)\n",
              "By 1931, the Christ the Redeemer statue was up and looked over the lands. All in all, it cost, at the time, about a\n",
              "quarter of a million USD to complete the statue. In today's US Dollar equivalent, that figure is around $ 4 \n",
              "million. Christ the Redeemer was inaugurated on 12th October 1931. Renovations and Restoration\n",
              "\n",
              "[Christ The Redeemer Statue: Fascinating Facts, History, And Height Of \n",
              "...](https://travelpander.com/brazil-statue-of-christ-the-redeemer-facts/)\n",
              "The Christ the Redeemer statue in Brazil was completed in 1931. It stands 30 meters tall and has arms measuring 28 \n",
              "meters. The statue weighs 635 metric tons ... Brazil, stands at a height of 30 meters (98 feet) without its \n",
              "pedestal. The total height, including the pedestal, reaches 38 meters (125 feet).\n",
              "\n",
              "[Dimensions of Christ the Redeemer - Wonders of the \n",
              "world](https://www.wonders-of-the-world.net/Christ-the-Redeemer/Dimensions-of-Christ-the-Redeemer.php)\n",
              "Christ the Redeemer of Rio, on the hill of Corcovado, is a large statue, but it is far from being among the highest\n",
              "in the world. It measures 38m high, of which 8m for the base. ... Total height: 38m; Height of the statue: 30m; \n",
              "Height of the pedestal: 8m; Height of the head: 3,75m; Lenght of a hand: 3,20m; Width: 8,50m; Total Scope: 28m;\n",
              "\n",
              "[Christ the Redeemer: 12 facts about Brazil's beloved \n",
              "monument](https://www.goaheadtours.com/travel-blog/articles/facts-about-christ-the-redeemer)\n",
              "The dynamic city on Brazil's southeastern coast is known for many things—its gorgeous beaches, legendary Carnival, \n",
              "and the iconic, towering statue of Jesus known as Christ the Redeemer, or Cristo Redentor in Portuguese. The statue\n",
              "stands 98 feet tall with arms spanning 92 feet and sits on a 26-foot-high pedestal.\n",
              "\n",
              "[Christ the Redeemer - 7 Wonders](https://7wonders.org/south-america/brazil/rio-de-janeiro/christ-redeemer/)\n",
              "The statue of Christ the Redeemer is located at the top of Corcovado Mountain. The entire monument of statue of \n",
              "Christ the Redeemer is 38m high with the statue accounting for 30m and overlooking the city of Rio de Janeiro is \n",
              "one of the tallest statues in the world; the span from finger tip to fingertip is 28m and there is a small chapel \n",
              "housed in the base.\n",
              "\n",
              "[Christ the Redeemer - Paul Landowski](https://www.paul-landowski.com/en/le-christ-de-rio/)\n",
              "Height of the head: 3.75 meters. The order of the archbishop of Rio with Heitor da Silva Costa. In May 1922, the \n",
              "\"catholic Circle\" of Rio takes up a 63 years old idea, which consisted in building a figure of Christ on a hill \n",
              "overhanging the city and the bay of Rio. Among several proposals for a \"monument with Christ the Redeemer\", the ...\n",
              "\n",
              "[Christ The Redeemer Statue (Everything To Know Before A \n",
              "Visit)](https://thetouristchecklist.com/christ-the-redeemer-statue/)\n",
              "The Christ the Redeemer Statue is one of the most iconic landmarks in the world. The sheer size and stature of this\n",
              "colossal statue of Jesus Christ dominate the skyline of Rio de Janeiro, Brazil. At 30 meters tall, not including \n",
              "its 8 meter pedestal, this masterpiece sits atop Corcovado Mountain, which rises 700 meters above the ground. ...\n",
              "\n",
              "Out: None\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[2m[Step 2: Duration 1.08 seconds| Input tokens: 4,377 | Output tokens: 167]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 2: Duration 1.08 seconds| Input tokens: 4,377 | Output tokens: 167]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m3\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mfinal_answer\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m38 meters\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                                                      \u001b[0m  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">final_answer(</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"38 meters\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\">                                                                                      </span>  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1;38;2;212;183;2mOut - Final answer: 38 meters\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">Out - Final answer: 38 meters</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[2m[Step 3: Duration 0.12 seconds| Input tokens: 8,076 | Output tokens: 228]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 3: Duration 0.12 seconds| Input tokens: 8,076 | Output tokens: 228]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "38 meters\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel\n",
        "\n",
        "# Inicialize o modelo\n",
        "model = InferenceClientModel()\n",
        "\n",
        "# Inicialize a ferramenta de busca\n",
        "search_tool = DuckDuckGoSearchTool()\n",
        "\n",
        "# Crie o agente com a ferramenta de busca\n",
        "agent = CodeAgent(tools=[search_tool], model=model)\n",
        "\n",
        "# Execute uma consulta\n",
        "response = agent.run(\"Quem foi Ada Lovelace?\")\n",
        "print(response)\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "wPWT5CS5vcHZ",
        "outputId": "786caad3-610a-437c-e4e1-03b9575e6f92"
      },
      "execution_count": 31,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[38;2;212;183;2m╭─\u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[1;38;2;212;183;2mNew run\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╮\u001b[0m\n",
              "\u001b[38;2;212;183;2m│\u001b[0m                                                                                                                 \u001b[38;2;212;183;2m│\u001b[0m\n",
              "\u001b[38;2;212;183;2m│\u001b[0m \u001b[1mQuem foi Ada Lovelace?\u001b[0m                                                                                          \u001b[38;2;212;183;2m│\u001b[0m\n",
              "\u001b[38;2;212;183;2m│\u001b[0m                                                                                                                 \u001b[38;2;212;183;2m│\u001b[0m\n",
              "\u001b[38;2;212;183;2m╰─\u001b[0m\u001b[38;2;212;183;2m InferenceClientModel - Qwen/Qwen2.5-Coder-32B-Instruct \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">╭──────────────────────────────────────────────────── </span><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">New run</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ────────────────────────────────────────────────────╮</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>                                                                                                                 <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\">Quem foi Ada Lovelace?</span>                                                                                          <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>                                                                                                                 <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702\">╰─ InferenceClientModel - Qwen/Qwen2.5-Coder-32B-Instruct ────────────────────────────────────────────────────────╯</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m1\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mada_lovelace_info\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mweb_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mquery\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mWho is Ada Lovelace?\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                   \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mada_lovelace_info\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                                                       \u001b[0m  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">ada_lovelace_info </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> web_search(query</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"Who is Ada Lovelace?\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\">                                                   </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(ada_lovelace_info)</span><span style=\"background-color: #272822\">                                                                                       </span>  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1mExecution logs:\u001b[0m\n",
              "## Search Results\n",
              "\n",
              "[Ada Lovelace | Biography, Computer, & Facts | Britannica](https://www.britannica.com/biography/Ada-Lovelace)\n",
              "Ada Lovelace, English mathematician, an associate of Charles Babbage, for whose digital computer prototype, the \n",
              "Analytical Engine, she created a program in 1843. She has been called the first computer programmer. Ada Lovelace \n",
              "Day, the second Tuesday in October, honors women's contributions to science and technology.\n",
              "\n",
              "[Ada Lovelace - Wikipedia](https://en.wikipedia.org/wiki/Ada_Lovelace)\n",
              "Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 - 27 November 1852), also known as Ada \n",
              "Lovelace, was an English mathematician and writer chiefly known for her work on Charles Babbage's proposed \n",
              "mechanical general-purpose computer, the Analytical Engine.She was the first to recognise that the machine had \n",
              "applications beyond pure calculation.\n",
              "\n",
              "[Ada Lovelace - Quotes, Children & Facts - Biography](https://www.biography.com/scholars-educators/ada-lovelace)\n",
              "Ada Lovelace, born as Augusta Ada Byron on December 10, 1815, was the only legitimate child of the famous poet Lord\n",
              "George Gordon Byron. Lord Byron's marriage to Lovelace's mother, Lady Anne ...\n",
              "\n",
              "[Ada Lovelace: The First Computer Programmer | \n",
              "Britannica](https://www.britannica.com/story/ada-lovelace-the-first-computer-programmer)\n",
              "Ada Lovelace was the daughter of the noted poet Lord Byron and Annabella Milbanke Byron. Their marriage lasted \n",
              "little more than a year, and Ada never met her father. To counteract the \"dangerous\" mental tendencies of Ada's \n",
              "father, Annabella emphasized music, French, and mathematics in her daughter's studies. ...\n",
              "\n",
              "[Biography of Ada Lovelace, First Computer Programmer - \n",
              "ThoughtCo](https://www.thoughtco.com/ada-lovelace-biography-5113321)\n",
              "Ada Lovelace (born Augusta Ada Byron; December 10, 1815- November 27, 1852) was an English mathematician who has \n",
              "been called the first computer programmer for writing an algorithm, or a set of operating instructions, for the \n",
              "early computing machine built by Charles Babbage in 1821. As the daughter of the famed English Romantic poet Lord \n",
              "Byron, her life has been characterized as a constant ...\n",
              "\n",
              "[Ada Lovelace - National Geographic Kids](https://kids.nationalgeographic.com/history/article/ada-lovelace)\n",
              "Ada Lovelace excelled at them—and became what some say is the world's first computer programmer. Born in England on\n",
              "December 10, 1815, Ada was the daughter of the famous poet Lord George Byron and his wife, Lady Anne Byron. Her \n",
              "father left the family just weeks after Ada's birth, but her mother insisted that her daughter have expert ...\n",
              "\n",
              "[10 Facts About Ada Lovelace: The First Computer \n",
              "Programmer](https://www.historyhit.com/facts-about-ada-lovelace-the-first-computer-programmer/)\n",
              "Ada Lovelace was born on 10 December 1815 in London, as Augusta Ada Byron, and was the only legitimate child of \n",
              "Lord George Gordon Byron and his wife Lady Annabella Byron. Today considered one of Britain's greatest Romantic \n",
              "poets, Lord Byron was infamous for his many affairs and dark moods. Though an unconventional match for the deeply \n",
              "...\n",
              "\n",
              "[Who was Ada? - Ada Lovelace Day](https://findingada.com/about/who-was-ada/)\n",
              "Who was Ada Lovelace? By Sydney Padua, author of The Thrilling Adventures of Lovelace & Babbage.. Read the longer \n",
              "biography of Ada Lovelace by Suw Charman-Anderson, taken from our book, A Passion for Science: Stories of Discovery\n",
              "and Invention, but for a short overview of her life and achievements, read on!. The woman most often known as 'Ada \n",
              "Lovelace' was born Ada Gordon in 1815, sole ...\n",
              "\n",
              "[Ada Lovelace: The World's First Computer Programmer Who Predicted \n",
              "...](https://www.nist.gov/blogs/taking-measure/ada-lovelace-worlds-first-computer-programmer-who-predicted-artifici\n",
              "al)\n",
              "Augusta Ada King, the Countess of Lovelace, was born in London on Dec. 10, 1815.She's most well known as Ada \n",
              "Lovelace. Her parents were the English poet Lord Byron and Lady Anne Isabella Milbanke.. After her parents' \n",
              "marriage ended, Lovelace had an isolated childhood at the country estate of her grandparents, where her mother \n",
              "moved after leaving London.\n",
              "\n",
              "[Ada Lovelace - Lemelson](https://lemelson.mit.edu/resources/ada-lovelace)\n",
              "Ada Lovelace (birth name Augusta Ada Byron) was born in London, England on December 10, 1815 to Anne Milbank and \n",
              "the famous poet, Lord Byron. Her father and mother separated months after she was born. Lord Byron moved to Greece \n",
              "where he died when Ada was eight years old. Ada's childhood was not a traditional one.\n",
              "\n",
              "Out: None\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
              "## Search Results\n",
              "\n",
              "[Ada Lovelace | Biography, Computer, &amp; Facts | Britannica](https://www.britannica.com/biography/Ada-Lovelace)\n",
              "Ada Lovelace, English mathematician, an associate of Charles Babbage, for whose digital computer prototype, the \n",
              "Analytical Engine, she created a program in 1843. She has been called the first computer programmer. Ada Lovelace \n",
              "Day, the second Tuesday in October, honors women's contributions to science and technology.\n",
              "\n",
              "[Ada Lovelace - Wikipedia](https://en.wikipedia.org/wiki/Ada_Lovelace)\n",
              "Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 - 27 November 1852), also known as Ada \n",
              "Lovelace, was an English mathematician and writer chiefly known for her work on Charles Babbage's proposed \n",
              "mechanical general-purpose computer, the Analytical Engine.She was the first to recognise that the machine had \n",
              "applications beyond pure calculation.\n",
              "\n",
              "[Ada Lovelace - Quotes, Children &amp; Facts - Biography](https://www.biography.com/scholars-educators/ada-lovelace)\n",
              "Ada Lovelace, born as Augusta Ada Byron on December 10, 1815, was the only legitimate child of the famous poet Lord\n",
              "George Gordon Byron. Lord Byron's marriage to Lovelace's mother, Lady Anne ...\n",
              "\n",
              "[Ada Lovelace: The First Computer Programmer | \n",
              "Britannica](https://www.britannica.com/story/ada-lovelace-the-first-computer-programmer)\n",
              "Ada Lovelace was the daughter of the noted poet Lord Byron and Annabella Milbanke Byron. Their marriage lasted \n",
              "little more than a year, and Ada never met her father. To counteract the \"dangerous\" mental tendencies of Ada's \n",
              "father, Annabella emphasized music, French, and mathematics in her daughter's studies. ...\n",
              "\n",
              "[Biography of Ada Lovelace, First Computer Programmer - \n",
              "ThoughtCo](https://www.thoughtco.com/ada-lovelace-biography-5113321)\n",
              "Ada Lovelace (born Augusta Ada Byron; December 10, 1815- November 27, 1852) was an English mathematician who has \n",
              "been called the first computer programmer for writing an algorithm, or a set of operating instructions, for the \n",
              "early computing machine built by Charles Babbage in 1821. As the daughter of the famed English Romantic poet Lord \n",
              "Byron, her life has been characterized as a constant ...\n",
              "\n",
              "[Ada Lovelace - National Geographic Kids](https://kids.nationalgeographic.com/history/article/ada-lovelace)\n",
              "Ada Lovelace excelled at them—and became what some say is the world's first computer programmer. Born in England on\n",
              "December 10, 1815, Ada was the daughter of the famous poet Lord George Byron and his wife, Lady Anne Byron. Her \n",
              "father left the family just weeks after Ada's birth, but her mother insisted that her daughter have expert ...\n",
              "\n",
              "[10 Facts About Ada Lovelace: The First Computer \n",
              "Programmer](https://www.historyhit.com/facts-about-ada-lovelace-the-first-computer-programmer/)\n",
              "Ada Lovelace was born on 10 December 1815 in London, as Augusta Ada Byron, and was the only legitimate child of \n",
              "Lord George Gordon Byron and his wife Lady Annabella Byron. Today considered one of Britain's greatest Romantic \n",
              "poets, Lord Byron was infamous for his many affairs and dark moods. Though an unconventional match for the deeply \n",
              "...\n",
              "\n",
              "[Who was Ada? - Ada Lovelace Day](https://findingada.com/about/who-was-ada/)\n",
              "Who was Ada Lovelace? By Sydney Padua, author of The Thrilling Adventures of Lovelace &amp; Babbage.. Read the longer \n",
              "biography of Ada Lovelace by Suw Charman-Anderson, taken from our book, A Passion for Science: Stories of Discovery\n",
              "and Invention, but for a short overview of her life and achievements, read on!. The woman most often known as 'Ada \n",
              "Lovelace' was born Ada Gordon in 1815, sole ...\n",
              "\n",
              "[Ada Lovelace: The World's First Computer Programmer Who Predicted \n",
              "...](https://www.nist.gov/blogs/taking-measure/ada-lovelace-worlds-first-computer-programmer-who-predicted-artifici\n",
              "al)\n",
              "Augusta Ada King, the Countess of Lovelace, was born in London on Dec. 10, 1815.She's most well known as Ada \n",
              "Lovelace. Her parents were the English poet Lord Byron and Lady Anne Isabella Milbanke.. After her parents' \n",
              "marriage ended, Lovelace had an isolated childhood at the country estate of her grandparents, where her mother \n",
              "moved after leaving London.\n",
              "\n",
              "[Ada Lovelace - Lemelson](https://lemelson.mit.edu/resources/ada-lovelace)\n",
              "Ada Lovelace (birth name Augusta Ada Byron) was born in London, England on December 10, 1815 to Anne Milbank and \n",
              "the famous poet, Lord Byron. Her father and mother separated months after she was born. Lord Byron moved to Greece \n",
              "where he died when Ada was eight years old. Ada's childhood was not a traditional one.\n",
              "\n",
              "Out: None\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[2m[Step 1: Duration 1.31 seconds| Input tokens: 2,045 | Output tokens: 68]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 1: Duration 1.31 seconds| Input tokens: 2,045 | Output tokens: 68]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m2\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mada_lovelace_summary\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[48;2;39;40;34m                                                                                       \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34m    \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mAda Lovelace, born as Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 - 27 November \u001b[0m\u001b[48;2;39;40;34m  \u001b[0m  \n",
              "  \u001b[38;2;230;219;116;48;2;39;40;34m1852), \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[48;2;39;40;34m                                                                                                       \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34m    \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mwas an English mathematician and writer. She is best known for her work on Charles Babbage\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m'\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34ms proposed \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[48;2;39;40;34m   \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34m    \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mmechanical general-purpose computer, the Analytical Engine. She is recognized as the first computer \u001b[0m\u001b[48;2;39;40;34m      \u001b[0m  \n",
              "  \u001b[38;2;230;219;116;48;2;39;40;34mprogrammer \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[48;2;39;40;34m                                                                                                   \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34m    \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mfor writing an algorithm intended for the Analytical Engine. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[48;2;39;40;34m                                            \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                                                                              \u001b[0m  \n",
              "  \u001b[38;2;248;248;242;48;2;39;40;34mfinal_answer\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mada_lovelace_summary\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m                                                                             \u001b[0m  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">ada_lovelace_summary </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> (</span><span style=\"background-color: #272822\">                                                                                       </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">    </span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"Ada Lovelace, born as Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 - 27 November </span><span style=\"background-color: #272822\">  </span>  \n",
              "  <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">1852), \"</span><span style=\"background-color: #272822\">                                                                                                       </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">    </span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"was an English mathematician and writer. She is best known for her work on Charles Babbage's proposed \"</span><span style=\"background-color: #272822\">   </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">    </span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"mechanical general-purpose computer, the Analytical Engine. She is recognized as the first computer </span><span style=\"background-color: #272822\">      </span>  \n",
              "  <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">programmer \"</span><span style=\"background-color: #272822\">                                                                                                   </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">    </span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"for writing an algorithm intended for the Analytical Engine. \"</span><span style=\"background-color: #272822\">                                            </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\">                                                                                                              </span>  \n",
              "  <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">final_answer(ada_lovelace_summary)</span><span style=\"background-color: #272822\">                                                                             </span>  \n",
              " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1;38;2;212;183;2mOut - Final answer: Ada Lovelace, born as Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 - 27 \u001b[0m\n",
              "\u001b[1;38;2;212;183;2mNovember 1852), was an English mathematician and writer. She is best known for her work on Charles Babbage's \u001b[0m\n",
              "\u001b[1;38;2;212;183;2mproposed mechanical general-purpose computer, the Analytical Engine. She is recognized as the first computer \u001b[0m\n",
              "\u001b[1;38;2;212;183;2mprogrammer for writing an algorithm intended for the Analytical Engine. \u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">Out - Final answer: Ada Lovelace, born as Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 - 27 </span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">November 1852), was an English mathematician and writer. She is best known for her work on Charles Babbage's </span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">proposed mechanical general-purpose computer, the Analytical Engine. She is recognized as the first computer </span>\n",
              "<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">programmer for writing an algorithm intended for the Analytical Engine. </span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[2m[Step 2: Duration 0.10 seconds| Input tokens: 5,344 | Output tokens: 228]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 2: Duration 0.10 seconds| Input tokens: 5,344 | Output tokens: 228]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Ada Lovelace, born as Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 - 27 November 1852), was an English mathematician and writer. She is best known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine. She is recognized as the first computer programmer for writing an algorithm intended for the Analytical Engine. \n"
          ]
        }
      ]
    }
  ]
}