{ "cells": [ { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: smolagents[litellm] in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (1.10.0)\n", "Requirement already satisfied: huggingface-hub>=0.28.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (0.29.1)\n", "Requirement already satisfied: requests>=2.32.3 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (2.32.3)\n", "Requirement already satisfied: rich>=13.9.4 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (13.9.4)\n", "Requirement already satisfied: pandas>=2.2.3 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (2.2.3)\n", "Requirement already satisfied: jinja2>=3.1.4 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (3.1.5)\n", "Requirement already satisfied: pillow>=11.0.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (11.1.0)\n", "Requirement already satisfied: markdownify>=0.14.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (1.0.0)\n", "Requirement already satisfied: duckduckgo-search>=6.3.7 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (7.5.0)\n", "Requirement already satisfied: python-dotenv in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (1.0.1)\n", "Collecting litellm>=1.60.2 (from smolagents[litellm])\n", " Downloading litellm-1.63.2-py3-none-any.whl (6.9 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.9/6.9 MB\u001b[0m \u001b[31m35.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n", "\u001b[?25hRequirement already satisfied: click>=8.1.8 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from duckduckgo-search>=6.3.7->smolagents[litellm]) (8.1.8)\n", "Requirement already satisfied: primp>=0.14.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from duckduckgo-search>=6.3.7->smolagents[litellm]) (0.14.0)\n", "Requirement already satisfied: lxml>=5.3.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from duckduckgo-search>=6.3.7->smolagents[litellm]) (5.3.1)\n", "Requirement already satisfied: filelock in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (3.17.0)\n", "Requirement already satisfied: fsspec>=2023.5.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (2024.9.0)\n", "Requirement already satisfied: packaging>=20.9 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (24.1)\n", "Requirement already satisfied: pyyaml>=5.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (6.0.2)\n", "Requirement already satisfied: tqdm>=4.42.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (4.66.5)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (4.12.2)\n", "Requirement already satisfied: MarkupSafe>=2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from jinja2>=3.1.4->smolagents[litellm]) (3.0.2)\n", "Requirement already satisfied: aiohttp in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (3.10.10)\n", "Requirement already satisfied: httpx>=0.23.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (0.27.2)\n", "Collecting importlib-metadata>=6.8.0 (from litellm>=1.60.2->smolagents[litellm])\n", " Downloading importlib_metadata-8.6.1-py3-none-any.whl (26 kB)\n", "Collecting jsonschema<5.0.0,>=4.22.0 (from litellm>=1.60.2->smolagents[litellm])\n", " Downloading jsonschema-4.23.0-py3-none-any.whl (88 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m88.5/88.5 kB\u001b[0m \u001b[31m29.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hCollecting openai>=1.61.0 (from litellm>=1.60.2->smolagents[litellm])\n", " Downloading openai-1.65.4-py3-none-any.whl (473 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m473.5/473.5 kB\u001b[0m \u001b[31m70.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hRequirement already satisfied: pydantic<3.0.0,>=2.0.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (2.9.2)\n", "Requirement already satisfied: tiktoken>=0.7.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (0.8.0)\n", "Collecting tokenizers (from litellm>=1.60.2->smolagents[litellm])\n", " Using cached tokenizers-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)\n", "Requirement already satisfied: beautifulsoup4<5,>=4.9 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from markdownify>=0.14.1->smolagents[litellm]) (4.12.3)\n", "Requirement already satisfied: six<2,>=1.15 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from markdownify>=0.14.1->smolagents[litellm]) (1.16.0)\n", "Requirement already satisfied: numpy>=1.23.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (1.26.4)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (2.9.0.post0)\n", "Requirement already satisfied: pytz>=2020.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (2024.2)\n", "Requirement already satisfied: tzdata>=2022.7 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (2024.2)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (3.4.0)\n", "Requirement already satisfied: idna<4,>=2.5 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (3.10)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (2.2.3)\n", "Requirement already satisfied: certifi>=2017.4.17 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (2024.8.30)\n", "Requirement already satisfied: markdown-it-py>=2.2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from rich>=13.9.4->smolagents[litellm]) (3.0.0)\n", "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from rich>=13.9.4->smolagents[litellm]) (2.18.0)\n", "Requirement already satisfied: soupsieve>1.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from beautifulsoup4<5,>=4.9->markdownify>=0.14.1->smolagents[litellm]) (2.6)\n", "Requirement already satisfied: anyio in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (4.6.0)\n", "Requirement already satisfied: httpcore==1.* in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (1.0.6)\n", "Requirement already satisfied: sniffio in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (1.3.1)\n", "Requirement already satisfied: h11<0.15,>=0.13 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpcore==1.*->httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (0.14.0)\n", "Collecting zipp>=3.20 (from importlib-metadata>=6.8.0->litellm>=1.60.2->smolagents[litellm])\n", " Downloading zipp-3.21.0-py3-none-any.whl (9.6 kB)\n", "Requirement already satisfied: attrs>=22.2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm]) (24.2.0)\n", "Collecting jsonschema-specifications>=2023.03.6 (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm])\n", " Downloading jsonschema_specifications-2024.10.1-py3-none-any.whl (18 kB)\n", "Collecting referencing>=0.28.4 (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm])\n", " Downloading referencing-0.36.2-py3-none-any.whl (26 kB)\n", "Collecting rpds-py>=0.7.1 (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm])\n", " Downloading rpds_py-0.23.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (386 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m386.3/386.3 kB\u001b[0m \u001b[31m66.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hRequirement already satisfied: mdurl~=0.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from markdown-it-py>=2.2.0->rich>=13.9.4->smolagents[litellm]) (0.1.2)\n", "Requirement already satisfied: distro<2,>=1.7.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from openai>=1.61.0->litellm>=1.60.2->smolagents[litellm]) (1.9.0)\n", "Requirement already satisfied: jiter<1,>=0.4.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from openai>=1.61.0->litellm>=1.60.2->smolagents[litellm]) (0.6.1)\n", "Requirement already satisfied: annotated-types>=0.6.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.0.0->litellm>=1.60.2->smolagents[litellm]) (0.7.0)\n", "Requirement already satisfied: pydantic-core==2.23.4 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.0.0->litellm>=1.60.2->smolagents[litellm]) (2.23.4)\n", "Requirement already satisfied: regex>=2022.1.18 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from tiktoken>=0.7.0->litellm>=1.60.2->smolagents[litellm]) (2024.9.11)\n", "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (2.4.3)\n", "Requirement already satisfied: aiosignal>=1.1.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (1.3.1)\n", "Requirement already satisfied: frozenlist>=1.1.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (1.4.1)\n", "Requirement already satisfied: multidict<7.0,>=4.5 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (6.1.0)\n", "Requirement already satisfied: yarl<2.0,>=1.12.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (1.15.0)\n", "Requirement already satisfied: propcache>=0.2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from yarl<2.0,>=1.12.0->aiohttp->litellm>=1.60.2->smolagents[litellm]) (0.2.0)\n", "Installing collected packages: zipp, rpds-py, referencing, importlib-metadata, tokenizers, openai, jsonschema-specifications, jsonschema, litellm\n", " Attempting uninstall: openai\n", " Found existing installation: openai 1.51.2\n", " Uninstalling openai-1.51.2:\n", " Successfully uninstalled openai-1.51.2\n", "Successfully installed importlib-metadata-8.6.1 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 litellm-1.63.2 openai-1.65.4 referencing-0.36.2 rpds-py-0.23.1 tokenizers-0.21.0 zipp-3.21.0\n", "\n", "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.1.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.0.1\u001b[0m\n", "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n" ] } ], "source": [ "\n", "!pip install 'smolagents[litellm]'" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "685a5c8515104215a7e1aa805b0985b2", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HTML(value='
╭──────────────────────────────────────────────────── New run ────────────────────────────────────────────────────╮\n", " \n", " Search for the best music recommendations for a party at the Wayne's mansion. \n", " \n", "╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯\n", "\n" ], "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[1mSearch for the best music recommendations for a party at the Wayne's mansion.\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 LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  party_music_search = web_search(query=\"best music for a party\")                                                  \n",
       "  print(party_music_search)                                                                                        \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;248;248;242;48;2;39;40;34mparty_music_search\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;34mbest music for a party\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;34mparty_music_search\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Execution logs:\n",
       "## Search Results\n",
       "\n",
       "[The 75 Best Party Songs That Will Get Everyone Dancing - \n",
       "Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n",
       "The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n",
       "mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n",
       "dance favorite.\n",
       "\n",
       "[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n",
       "Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n",
       "Best Songs To Party: DJ's Ultimate Party Songs Playlist. If you're looking for the ultimate playlist to get your \n",
       "party started, look no further than this best party songs playlist. Whether you're hosting a birthday bash, a \n",
       "backyard barbecue, or just a night in with friends, the right music can make all the difference. From classic hits \n",
       "to ...\n",
       "\n",
       "[45 Songs That Get Your Event Guests on the Dance Floor Every \n",
       "Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n",
       "y-time)\n",
       "You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n",
       "popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n",
       "Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n",
       "\n",
       "[40 Best Party Songs | Songs To Dance To, Ranked By Our Editors - Time \n",
       "Out](https://www.timeout.com/music/best-party-songs)\n",
       "The best is when you go for the extended version, and find yourself in the midst of the intro for about 11 minutes.\n",
       "But whichever version you go for, this is the party song, in every way. She ...\n",
       "\n",
       "[The Top 100 Best Party Songs of All Time - \n",
       "LiveAbout](https://www.liveabout.com/top-best-party-songs-of-all-time-3248355)\n",
       "\"Macarena\" then spent 14 weeks at No. 1 on the U.S. pop singles chart. For more than a year this was one of the \n",
       "most popular special event songs in the United States. It still works well as a charming party song encouraging \n",
       "everyone to join in on the simple dance.\n",
       "\n",
       "[50+ Best Songs For Your Next Party in 2025 - Aleka's \n",
       "Get-Together](https://alekasgettogether.com/top-songs-for-any-party/)\n",
       "Whether you're planning a How To Host The Best Party At Home or just want to liven up your playlist, we've got you \n",
       "covered with 100 crowd-pleasing tunes. From timeless classics to modern hits, these songs are guaranteed to keep \n",
       "the energy high and the good times rolling all night long. 50 Popular Party Songs. Uptown Funk - Mark Ronson ft ...\n",
       "\n",
       "[The 101 Best Party Songs Of All Time - Music Grotto](https://www.musicgrotto.com/best-party-songs/)\n",
       "A pounding beat and dramatic vocals make this song one of the best party songs to come out of Europe, and the \n",
       "song's music video features a strange and compelling premise of a dead man being reanimated and falling in love \n",
       "with a woman. Tjis Verwest, (a.k.a. Tiësto) composed the song with help from James Bell, Julia Karlsson, and Anton \n",
       "Rundberg.\n",
       "\n",
       "[Top 200 Most Requested Songs - DJ Event Planner](https://djeventplanner.com/mostrequested.htm)\n",
       "Based on over 2 million requests using the DJ Event Planner song request system, this is a list of the most \n",
       "requested songs of the past year. Sign Up For A Free Trial Click To Hide Me Top 200 Decades Special Songs Print \n",
       "Download PDF UK Edition Last Year's List Sign Up For A Free Trial\n",
       "\n",
       "[20 Best Celebration Songs for Your Party Playlist - The Knot](https://www.theknot.com/content/celebration-songs)\n",
       "Celebrate good times with the best celebration songs, perfect for bringing everyone to the dance floor to \n",
       "scream-sing your favorite celebratory lyrics. Earn cash as you plan. Get a $20 gift card for every 200 points. ... \n",
       "Few celebration party songs hold a candle to this one by Rare Earth, which has been a must-have addition to any \n",
       "wedding song ...\n",
       "\n",
       "[100 Best Party Songs: The Ultimate Party Playlist](https://audiocaptain.com/best-party-songs/)\n",
       "Best 2000s Party Songs. Stylistically speaking, music that dominated the charts in the 2000s was nondescript.. \n",
       "There was not much new regarding musical directions. Club and hip hop dominated the charts while indie acts and \n",
       "some rock groups still had influence.\n",
       "\n",
       "Out: None\n",
       "
\n" ], "text/plain": [ "\u001b[1mExecution logs:\u001b[0m\n", "## Search Results\n", "\n", "[The 75 Best Party Songs That Will Get Everyone Dancing - \n", "Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n", "The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n", "mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n", "dance favorite.\n", "\n", "[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n", "Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n", "Best Songs To Party: DJ's Ultimate Party Songs Playlist. If you're looking for the ultimate playlist to get your \n", "party started, look no further than this best party songs playlist. Whether you're hosting a birthday bash, a \n", "backyard barbecue, or just a night in with friends, the right music can make all the difference. From classic hits \n", "to ...\n", "\n", "[45 Songs That Get Your Event Guests on the Dance Floor Every \n", "Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n", "y-time)\n", "You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n", "popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n", "Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n", "\n", "[40 Best Party Songs | Songs To Dance To, Ranked By Our Editors - Time \n", "Out](https://www.timeout.com/music/best-party-songs)\n", "The best is when you go for the extended version, and find yourself in the midst of the intro for about 11 minutes.\n", "But whichever version you go for, this is the party song, in every way. She ...\n", "\n", "[The Top 100 Best Party Songs of All Time - \n", "LiveAbout](https://www.liveabout.com/top-best-party-songs-of-all-time-3248355)\n", "\"Macarena\" then spent 14 weeks at No. 1 on the U.S. pop singles chart. For more than a year this was one of the \n", "most popular special event songs in the United States. It still works well as a charming party song encouraging \n", "everyone to join in on the simple dance.\n", "\n", "[50+ Best Songs For Your Next Party in 2025 - Aleka's \n", "Get-Together](https://alekasgettogether.com/top-songs-for-any-party/)\n", "Whether you're planning a How To Host The Best Party At Home or just want to liven up your playlist, we've got you \n", "covered with 100 crowd-pleasing tunes. From timeless classics to modern hits, these songs are guaranteed to keep \n", "the energy high and the good times rolling all night long. 50 Popular Party Songs. Uptown Funk - Mark Ronson ft ...\n", "\n", "[The 101 Best Party Songs Of All Time - Music Grotto](https://www.musicgrotto.com/best-party-songs/)\n", "A pounding beat and dramatic vocals make this song one of the best party songs to come out of Europe, and the \n", "song's music video features a strange and compelling premise of a dead man being reanimated and falling in love \n", "with a woman. Tjis Verwest, (a.k.a. Tiësto) composed the song with help from James Bell, Julia Karlsson, and Anton \n", "Rundberg.\n", "\n", "[Top 200 Most Requested Songs - DJ Event Planner](https://djeventplanner.com/mostrequested.htm)\n", "Based on over 2 million requests using the DJ Event Planner song request system, this is a list of the most \n", "requested songs of the past year. Sign Up For A Free Trial Click To Hide Me Top 200 Decades Special Songs Print \n", "Download PDF UK Edition Last Year's List Sign Up For A Free Trial\n", "\n", "[20 Best Celebration Songs for Your Party Playlist - The Knot](https://www.theknot.com/content/celebration-songs)\n", "Celebrate good times with the best celebration songs, perfect for bringing everyone to the dance floor to \n", "scream-sing your favorite celebratory lyrics. Earn cash as you plan. Get a $20 gift card for every 200 points. ... \n", "Few celebration party songs hold a candle to this one by Rare Earth, which has been a must-have addition to any \n", "wedding song ...\n", "\n", "[100 Best Party Songs: The Ultimate Party Playlist](https://audiocaptain.com/best-party-songs/)\n", "Best 2000s Party Songs. Stylistically speaking, music that dominated the charts in the 2000s was nondescript.. \n", "There was not much new regarding musical directions. Club and hip hop dominated the charts while indie acts and \n", "some rock groups still had influence.\n", "\n", "Out: None\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 1: Duration 9.02 seconds| Input tokens: 2,249 | Output tokens: 82]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 1: Duration 9.02 seconds| Input tokens: 2,249 | Output tokens: 82]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  wayne_mansion_music = web_search(query=\"best music for a party Wayne's mansion\")                                 \n",
       "  print(wayne_mansion_music)                                                                                       \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;248;248;242;48;2;39;40;34mwayne_mansion_music\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;34mbest music for a party Wayne\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 mansion\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;34mwayne_mansion_music\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Execution logs:\n",
       "## Search Results\n",
       "\n",
       "[The 75 Best Party Songs That Will Get Everyone Dancing - \n",
       "Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n",
       "The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n",
       "mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n",
       "dance favorite.\n",
       "\n",
       "[45 Songs That Get Your Event Guests on the Dance Floor Every \n",
       "Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n",
       "y-time)\n",
       "You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n",
       "popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n",
       "Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n",
       "\n",
       "[50 Songs on Every Event Planner's Playlist - \n",
       "Eventbrite](https://www.eventbrite.com/blog/event-planning-playlist-ds00/)\n",
       "Music sets the mood and provides the soundtrack (literally) for a memorable and exciting time. While the right \n",
       "songs can enhance the experience, the wrong event music can throw off the vibe. For example, fast-paced songs \n",
       "probably aren't the best fit for a formal gala. And smooth jazz is likely to lull your guests at a motivational \n",
       "conference.\n",
       "\n",
       "[Wedding Party Entrance Songs to Get the Party Started - The Mansion \n",
       "...](https://mansiononmainstreet.com/wedding-party-entrance-songs-to-get-the-party-started/)\n",
       "Best Wedding Party Entrance Songs. No matter what vibe you're going for, there are some wedding party entrance \n",
       "songs that are guaranteed to be a hit with people. ... \"Down,\" by Jay Sean ft. Lil Wayne ... The Mansion on Main \n",
       "Street is a picturesque events venue wrapped in elegance and modern beauty. Situated amidst exquisitely manicured \n",
       "...\n",
       "\n",
       "[27 Most Influential Songs About Parties & Celebrations (Must Hear)](https://www.pdmusic.org/songs-about-parties/)\n",
       "Contents. 1 27 Most Famous Songs About Parties, Partying & Drinking With Friend (Ultimate Playlist); 2 #1 \"Party in\n",
       "the U.S.A.\" by Miley Cyrus; 3 #2 \"I Gotta Feeling\" by The Black Eyed Peas; 4 #3 \"Party Rock Anthem\" by LMFAO; 5 #4 \n",
       "\"Last Friday Night (T.G.I.F.)\" by Katy Perry; 6 #5 \"Dancing Queen\" by ABBA; 7 #6 \"Turn Down for What\" by DJ Snake &\n",
       "Lil Jon\n",
       "\n",
       "[Old School R&B Mix 2024 | BEST 90s & 2000s R&B Party Songs](https://www.youtube.com/watch?v=1E2iltstrbU)\n",
       "Get ready to ignite the dance floor with the ultimate Music Mix ! We've curated the hottest tracks and hits to \n",
       "ensure your party is nothing short of epic. ...\n",
       "\n",
       "[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n",
       "Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n",
       "If you're looking for the ultimate playlist to get your party started, look no further than this best party songs \n",
       "playlist. Whether you're hosting a birthday bash, a backyard barbecue, or just a night in with friends, the right \n",
       "music can make all the difference. From classic hits to modern bangers, we've compiled a list of the best songs ...\n",
       "\n",
       "[Party music mix ~ Songs to play in the party ~ Best songs that make you \n",
       "...](https://www.youtube.com/watch?v=d40kl-TvBj8)\n",
       "Party music mix ~ Songs to play in the party ~ Best songs that make you dance#ACmewsic #partymusic #dancesongs👍 \n",
       "Suggested Video:Songs to sing in the car: ht...\n",
       "\n",
       "[The 55+ Best Songs About Partying, For Your Next Party Anthem - \n",
       "Ranker](https://www.ranker.com/list/the-best-songs-about-parties/ranker-music)\n",
       "Unveiling the best songs about partying, this collection captures the quintessential beats and lyrics that have \n",
       "stood the test of time, leaving an indelible mark on the minds of music enthusiasts. Delving into the realm of top \n",
       "song party hits, every entry in the compilation boasts distinct elements that contribute to its popularity and \n",
       "charm.\n",
       "\n",
       "[111 Wedding Party Entrance Songs to Get the Party Started - The \n",
       "Knot](https://www.theknot.com/content/wedding-party-entrance-songs)\n",
       "Unique Wedding Party Entrance Songs . Don't be afraid to think outside of the box with these unique wedding party \n",
       "entrance songs. Here are a few of our favorite underrated picks. 72. \"We Are Family,\" by Sister Sledge. From the \n",
       "album: We are Family, 1979. Lyrics you'll love: \"We are family/I got all my sisters with me/We are family/Get up \n",
       "...\n",
       "\n",
       "Out: None\n",
       "
\n" ], "text/plain": [ "\u001b[1mExecution logs:\u001b[0m\n", "## Search Results\n", "\n", "[The 75 Best Party Songs That Will Get Everyone Dancing - \n", "Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n", "The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n", "mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n", "dance favorite.\n", "\n", "[45 Songs That Get Your Event Guests on the Dance Floor Every \n", "Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n", "y-time)\n", "You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n", "popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n", "Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n", "\n", "[50 Songs on Every Event Planner's Playlist - \n", "Eventbrite](https://www.eventbrite.com/blog/event-planning-playlist-ds00/)\n", "Music sets the mood and provides the soundtrack (literally) for a memorable and exciting time. While the right \n", "songs can enhance the experience, the wrong event music can throw off the vibe. For example, fast-paced songs \n", "probably aren't the best fit for a formal gala. And smooth jazz is likely to lull your guests at a motivational \n", "conference.\n", "\n", "[Wedding Party Entrance Songs to Get the Party Started - The Mansion \n", "...](https://mansiononmainstreet.com/wedding-party-entrance-songs-to-get-the-party-started/)\n", "Best Wedding Party Entrance Songs. No matter what vibe you're going for, there are some wedding party entrance \n", "songs that are guaranteed to be a hit with people. ... \"Down,\" by Jay Sean ft. Lil Wayne ... The Mansion on Main \n", "Street is a picturesque events venue wrapped in elegance and modern beauty. Situated amidst exquisitely manicured \n", "...\n", "\n", "[27 Most Influential Songs About Parties & Celebrations (Must Hear)](https://www.pdmusic.org/songs-about-parties/)\n", "Contents. 1 27 Most Famous Songs About Parties, Partying & Drinking With Friend (Ultimate Playlist); 2 #1 \"Party in\n", "the U.S.A.\" by Miley Cyrus; 3 #2 \"I Gotta Feeling\" by The Black Eyed Peas; 4 #3 \"Party Rock Anthem\" by LMFAO; 5 #4 \n", "\"Last Friday Night (T.G.I.F.)\" by Katy Perry; 6 #5 \"Dancing Queen\" by ABBA; 7 #6 \"Turn Down for What\" by DJ Snake &\n", "Lil Jon\n", "\n", "[Old School R&B Mix 2024 | BEST 90s & 2000s R&B Party Songs](https://www.youtube.com/watch?v=1E2iltstrbU)\n", "Get ready to ignite the dance floor with the ultimate Music Mix ! We've curated the hottest tracks and hits to \n", "ensure your party is nothing short of epic. ...\n", "\n", "[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n", "Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n", "If you're looking for the ultimate playlist to get your party started, look no further than this best party songs \n", "playlist. Whether you're hosting a birthday bash, a backyard barbecue, or just a night in with friends, the right \n", "music can make all the difference. From classic hits to modern bangers, we've compiled a list of the best songs ...\n", "\n", "[Party music mix ~ Songs to play in the party ~ Best songs that make you \n", "...](https://www.youtube.com/watch?v=d40kl-TvBj8)\n", "Party music mix ~ Songs to play in the party ~ Best songs that make you dance#ACmewsic #partymusic #dancesongs👍 \n", "Suggested Video:Songs to sing in the car: ht...\n", "\n", "[The 55+ Best Songs About Partying, For Your Next Party Anthem - \n", "Ranker](https://www.ranker.com/list/the-best-songs-about-parties/ranker-music)\n", "Unveiling the best songs about partying, this collection captures the quintessential beats and lyrics that have \n", "stood the test of time, leaving an indelible mark on the minds of music enthusiasts. Delving into the realm of top \n", "song party hits, every entry in the compilation boasts distinct elements that contribute to its popularity and \n", "charm.\n", "\n", "[111 Wedding Party Entrance Songs to Get the Party Started - The \n", "Knot](https://www.theknot.com/content/wedding-party-entrance-songs)\n", "Unique Wedding Party Entrance Songs . Don't be afraid to think outside of the box with these unique wedding party \n", "entrance songs. Here are a few of our favorite underrated picks. 72. \"We Are Family,\" by Sister Sledge. From the \n", "album: We are Family, 1979. Lyrics you'll love: \"We are family/I got all my sisters with me/We are family/Get up \n", "...\n", "\n", "Out: None\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 2: Duration 14.49 seconds| Input tokens: 5,762 | Output tokens: 165]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 2: Duration 14.49 seconds| Input tokens: 5,762 | Output tokens: 165]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  playlist = \"\"\"                                                                                                   \n",
       "  1. \"September\" - Earth, Wind & Fire                                                                              \n",
       "  2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars                                                                    \n",
       "  3. \"Crazy in Love\" - Beyoncé ft. Jay-Z                                                                           \n",
       "  4. \"Good as Hell\" - Lizzo                                                                                        \n",
       "  5. \"Treasure\" - Bruno Mars                                                                                       \n",
       "  6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams                                                                 \n",
       "  7. \"Signed, Sealed, Delivered (I'm Yours)\" - Stevie Wonder                                                       \n",
       "  8. \"Dancing Queen\" - ABBA                                                                                        \n",
       "  9. \"Happy\" - Pharrell Williams                                                                                   \n",
       "  10. \"Can't Stop the Feeling!\" - Justin Timberlake                                                                \n",
       "  \"\"\"                                                                                                              \n",
       "  final_answer(playlist)                                                                                           \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;248;248;242;48;2;39;40;34mplaylist\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;230;219;116;48;2;39;40;34m\"\"\"\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m1. \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;34mSeptember\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 - Earth, Wind & Fire\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m2. \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;34mUptown Funk\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 - Mark Ronson ft. Bruno Mars\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m3. \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;34mCrazy in Love\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 - Beyoncé ft. Jay-Z\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m4. \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;34mGood as Hell\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 - Lizzo\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m5. \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;34mTreasure\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 - Bruno Mars\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m6. \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;34mGet Lucky\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 - Daft Punk ft. Pharrell Williams\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m7. \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;34mSigned, Sealed, Delivered (I\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;34mm Yours)\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 - Stevie Wonder\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m8. \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;34mDancing Queen\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 - ABBA\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m9. \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;34mHappy\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 - Pharrell Williams\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34m10. \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;34mCan\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;34mt Stop the Feeling!\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 - Justin Timberlake\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \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;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;34mplaylist\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Out - Final answer: \n",
       "1. \"September\" - Earth, Wind & Fire\n",
       "2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars\n",
       "3. \"Crazy in Love\" - Beyoncé ft. Jay-Z\n",
       "4. \"Good as Hell\" - Lizzo\n",
       "5. \"Treasure\" - Bruno Mars\n",
       "6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams\n",
       "7. \"Signed, Sealed, Delivered (I'm Yours)\" - Stevie Wonder\n",
       "8. \"Dancing Queen\" - ABBA\n",
       "9. \"Happy\" - Pharrell Williams\n",
       "10. \"Can't Stop the Feeling!\" - Justin Timberlake\n",
       "\n",
       "
\n" ], "text/plain": [ "\u001b[1;38;2;212;183;2mOut - Final answer: \u001b[0m\n", "\u001b[1;38;2;212;183;2m1. \"September\" - Earth, Wind & Fire\u001b[0m\n", "\u001b[1;38;2;212;183;2m2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars\u001b[0m\n", "\u001b[1;38;2;212;183;2m3. \"Crazy in Love\" - Beyoncé ft. Jay-Z\u001b[0m\n", "\u001b[1;38;2;212;183;2m4. \"Good as Hell\" - Lizzo\u001b[0m\n", "\u001b[1;38;2;212;183;2m5. \"Treasure\" - Bruno Mars\u001b[0m\n", "\u001b[1;38;2;212;183;2m6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams\u001b[0m\n", "\u001b[1;38;2;212;183;2m7. \"Signed, Sealed, Delivered (I'm Yours)\" - Stevie Wonder\u001b[0m\n", "\u001b[1;38;2;212;183;2m8. \"Dancing Queen\" - ABBA\u001b[0m\n", "\u001b[1;38;2;212;183;2m9. \"Happy\" - Pharrell Williams\u001b[0m\n", "\u001b[1;38;2;212;183;2m10. \"Can't Stop the Feeling!\" - Justin Timberlake\u001b[0m\n", "\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 3: Duration 3.61 seconds| Input tokens: 10,597 | Output tokens: 619]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 3: Duration 3.61 seconds| Input tokens: 10,597 | Output tokens: 619]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "'\\n1. \"September\" - Earth, Wind & Fire\\n2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars\\n3. \"Crazy in Love\" - Beyoncé ft. Jay-Z\\n4. \"Good as Hell\" - Lizzo\\n5. \"Treasure\" - Bruno Mars\\n6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams\\n7. \"Signed, Sealed, Delivered (I\\'m Yours)\" - Stevie Wonder\\n8. \"Dancing Queen\" - ABBA\\n9. \"Happy\" - Pharrell Williams\\n10. \"Can\\'t Stop the Feeling!\" - Justin Timberlake\\n'" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from smolagents import CodeAgent, DuckDuckGoSearchTool, LiteLLMModel \n", "\n", "model = LiteLLMModel(\n", " model_id=\"gemini/gemini-2.0-flash-lite-001\",\n", " temperature=0.7,\n", " api_key=\"\")\n", "\n", "\n", "\n", "agent = CodeAgent(tools=[DuckDuckGoSearchTool()],\n", " model=model)\n", "\n", "agent.run(\"Search for the best music recommendations for a party at the Wayne's mansion.\")\n" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
╭──────────────────────────────────────────────────── New run ────────────────────────────────────────────────────╮\n",
       "                                                                                                                 \n",
       " Prepare a formal menu for the party.                                                                            \n",
       "                                                                                                                 \n",
       "╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯\n",
       "
\n" ], "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[1mPrepare a formal menu for the party.\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 LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  menu = suggest_menu(occasion=\"party\")                                                                            \n",
       "  print(menu)                                                                                                      \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;248;248;242;48;2;39;40;34mmenu\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;34msuggest_menu\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;34moccasion\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;34mparty\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;34mmenu\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Execution logs:\n",
       "Custom menu for the butler.\n",
       "\n",
       "Out: None\n",
       "
\n" ], "text/plain": [ "\u001b[1mExecution logs:\u001b[0m\n", "Custom menu for the butler.\n", "\n", "Out: None\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 1: Duration 2.57 seconds| Input tokens: 2,228 | Output tokens: 74]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 1: Duration 2.57 seconds| Input tokens: 2,228 | Output tokens: 74]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  final_answer(\"Custom menu for the butler.\")                                                                      \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "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;34mCustom menu for the butler.\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Out - Final answer: Custom menu for the butler.\n",
       "
\n" ], "text/plain": [ "\u001b[1;38;2;212;183;2mOut - Final answer: Custom menu for the butler.\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 2: Duration 0.94 seconds| Input tokens: 4,611 | Output tokens: 134]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 2: Duration 0.94 seconds| Input tokens: 4,611 | Output tokens: 134]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "'Custom menu for the butler.'" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from smolagents import CodeAgent, tool\n", "\n", "@tool\n", "def suggest_menu(occasion: str) -> str:\n", " \"\"\"\n", " Suggests a menu based on the occasion.\n", " Args:\n", " occasion: The type of occasion for the party.\n", " \"\"\"\n", " if occasion == \"casual\":\n", " return \"Pizza, snacks, and drinks.\"\n", " elif occasion == \"formal\":\n", " return \"3-course dinner with wine and dessert.\"\n", " elif occasion == \"superhero\":\n", " return \"Buffet with high-energy and healthy food.\"\n", " else:\n", " return \"Custom menu for the butler.\"\n", "\n", "agent = CodeAgent(tools=[suggest_menu], model=model)\n", "\n", "agent.run(\"Prepare a formal menu for the party.\")" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
╭──────────────────────────────────────────────────── New run ────────────────────────────────────────────────────╮\n",
       "                                                                                                                 \n",
       " Alfred needs to prepare for the party. Here are the tasks:                                                      \n",
       "     1. Prepare the drinks - 30 minutes                                                                          \n",
       "     2. Decorate the mansion - 60 minutes                                                                        \n",
       "     3. Set up the menu - 45 minutes                                                                             \n",
       "     3. Prepare the music and playlist - 45 minutes                                                              \n",
       "                                                                                                                 \n",
       "     If we start right now, at what time will the party be ready?                                                \n",
       "                                                                                                                 \n",
       "╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯\n",
       "
\n" ], "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[1mAlfred needs to prepare for the party. Here are the tasks:\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n", "\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 1. Prepare the drinks - 30 minutes\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n", "\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 2. Decorate the mansion - 60 minutes\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n", "\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 3. Set up the menu - 45 minutes\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n", "\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 3. Prepare the music and playlist - 45 minutes\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[1m If we start right now, at what time will the party be ready?\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 LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  from datetime import datetime, timedelta                                                                         \n",
       "                                                                                                                   \n",
       "  drink_prep = 30                                                                                                  \n",
       "  decorate = 60                                                                                                    \n",
       "  menu_setup = 45                                                                                                  \n",
       "  music_prep = 45                                                                                                  \n",
       "                                                                                                                   \n",
       "  total_minutes = drink_prep + decorate + menu_setup + music_prep                                                  \n",
       "  print(f\"Total time in minutes: {total_minutes}\")                                                                 \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;255;70;137;48;2;39;40;34mfrom\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;34mdatetime\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;34mimport\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;34mdatetime\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[38;2;248;248;242;48;2;39;40;34mtimedelta\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mdrink_prep\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;174;129;255;48;2;39;40;34m30\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mdecorate\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;174;129;255;48;2;39;40;34m60\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mmenu_setup\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;174;129;255;48;2;39;40;34m45\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mmusic_prep\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;174;129;255;48;2;39;40;34m45\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mtotal_minutes\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;34mdrink_prep\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;34mdecorate\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;34mmenu_setup\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;34mmusic_prep\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;34mTotal time in minutes: \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;34mtotal_minutes\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", " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Execution logs:\n",
       "Total time in minutes: 180\n",
       "\n",
       "Out: None\n",
       "
\n" ], "text/plain": [ "\u001b[1mExecution logs:\u001b[0m\n", "Total time in minutes: 180\n", "\n", "Out: None\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 1: Duration 2.67 seconds| Input tokens: 2,253 | Output tokens: 154]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 1: Duration 2.67 seconds| Input tokens: 2,253 | Output tokens: 154]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  from datetime import datetime, timedelta                                                                         \n",
       "                                                                                                                   \n",
       "  total_minutes = 180                                                                                              \n",
       "  hours = total_minutes // 60                                                                                      \n",
       "  minutes = total_minutes % 60                                                                                     \n",
       "                                                                                                                   \n",
       "  current_time = datetime.now()                                                                                    \n",
       "  duration = timedelta(hours=hours, minutes=minutes)                                                               \n",
       "  party_ready_time = current_time + duration                                                                       \n",
       "                                                                                                                   \n",
       "  print(f\"Party ready time: {party_ready_time}\")                                                                   \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;255;70;137;48;2;39;40;34mfrom\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;34mdatetime\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;34mimport\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;34mdatetime\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[38;2;248;248;242;48;2;39;40;34mtimedelta\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mtotal_minutes\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;174;129;255;48;2;39;40;34m180\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mhours\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;34mtotal_minutes\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;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;174;129;255;48;2;39;40;34m60\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mminutes\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;34mtotal_minutes\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;174;129;255;48;2;39;40;34m60\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;248;248;242;48;2;39;40;34mcurrent_time\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;34mdatetime\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;34mnow\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;34mduration\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;34mtimedelta\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;34mhours\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;34mhours\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[38;2;248;248;242;48;2;39;40;34mminutes\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;34mminutes\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;34mparty_ready_time\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;34mcurrent_time\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;34mduration\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \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;34mParty ready time: \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;34mparty_ready_time\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", " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Execution logs:\n",
       "Party ready time: 2025-03-06 23:06:46.033418\n",
       "\n",
       "Out: None\n",
       "
\n" ], "text/plain": [ "\u001b[1mExecution logs:\u001b[0m\n", "Party ready time: 2025-03-06 23:06:46.033418\n", "\n", "Out: None\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 2: Duration 1.66 seconds| Input tokens: 4,808 | Output tokens: 287]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 2: Duration 1.66 seconds| Input tokens: 4,808 | Output tokens: 287]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  party_ready_time = datetime.now() + timedelta(hours=3)                                                           \n",
       "  final_answer(party_ready_time)                                                                                   \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;248;248;242;48;2;39;40;34mparty_ready_time\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;34mdatetime\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;34mnow\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[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;34mtimedelta\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;34mhours\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m3\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;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;34mparty_ready_time\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Out - Final answer: 2025-03-06 23:06:47.144585\n",
       "
\n" ], "text/plain": [ "\u001b[1;38;2;212;183;2mOut - Final answer: 2025-03-06 23:06:47.144585\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 3: Duration 1.11 seconds| Input tokens: 7,682 | Output tokens: 337]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 3: Duration 1.11 seconds| Input tokens: 7,682 | Output tokens: 337]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "datetime.datetime(2025, 3, 6, 23, 6, 47, 144585)" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\n", "import numpy as np\n", "import time\n", "import datetime\n", "\n", "agent = CodeAgent(tools=[], model=model, additional_authorized_imports=['datetime'])\n", "\n", "agent.run(\n", " \"\"\"\n", " Alfred needs to prepare for the party. Here are the tasks:\n", " 1. Prepare the drinks - 30 minutes\n", " 2. Decorate the mansion - 60 minutes\n", " 3. Set up the menu - 45 minutes\n", " 3. Prepare the music and playlist - 45 minutes\n", "\n", " If we start right now, at what time will the party be ready?\n", " \"\"\"\n", ")" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
╭──────────────────────────────────────────────────── New run ────────────────────────────────────────────────────╮\n",
       "                                                                                                                 \n",
       " Give me best playlist for a party at the Wayne's mansion. The party idea is a 'villain masquerade' theme        \n",
       "                                                                                                                 \n",
       "╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯\n",
       "
\n" ], "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[1mGive me best playlist for a party at the Wayne's mansion. The party idea is a 'villain masquerade' theme\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 LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Output message of the LLM: ────────────────────────────────────────────────────────────────────────────────────────\n",
       "Thought: I need to create a playlist for a villain masquerade party at Wayne's mansion. I will use the             \n",
       "`suggest_menu` tool to get some general party ideas, then `web_search` to search for relevant songs.               \n",
       "Code:                                                                                                              \n",
       "```py                                                                                                              \n",
       "party_theme = superhero_party_theme_generator(category=\"villain masquerade\")                                       \n",
       "print(party_theme)                                                                                                 \n",
       "```                                                                                                                \n",
       "
\n" ], "text/plain": [ "\u001b[1;3mOutput message of the LLM:\u001b[0m \u001b[38;2;212;183;2m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mThought:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mneed\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mto\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcreate\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mvillain\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmasquerade\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mat\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mWayne's\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmansion.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwill\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23muse\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23m`suggest_menu`\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtool\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mto\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mget\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msome\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mgeneral\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mideas,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthen\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m`web_search`\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mto\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msearch\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mrelevant\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs.\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mCode:\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mpy\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mparty_theme\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msuperhero_party_theme_generator\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcategory\u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mvillain masquerade\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mprint\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty_theme\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  party_theme = superhero_party_theme_generator(category=\"villain masquerade\")                                     \n",
       "  print(party_theme)                                                                                               \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;248;248;242;48;2;39;40;34mparty_theme\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;34msuperhero_party_theme_generator\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;34mcategory\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;34mvillain masquerade\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;34mparty_theme\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Execution logs:\n",
       "Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.\n",
       "\n",
       "Out: None\n",
       "
\n" ], "text/plain": [ "\u001b[1mExecution logs:\u001b[0m\n", "Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.\n", "\n", "Out: None\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 1: Duration 5.14 seconds| Input tokens: 2,519 | Output tokens: 81]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 1: Duration 5.14 seconds| Input tokens: 2,519 | Output tokens: 81]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Output message of the LLM: ────────────────────────────────────────────────────────────────────────────────────────\n",
       "Thought: I have the party theme: Gotham Rogues' Ball. Now, I'll search for playlist ideas. I will use the          \n",
       "web_search tool.                                                                                                   \n",
       "Code:                                                                                                              \n",
       "```py                                                                                                              \n",
       "playlist_search = web_search(query=\"playlist for villain masquerade party\")                                        \n",
       "print(playlist_search)                                                                                             \n",
       "```                                                                                                                \n",
       "
\n" ], "text/plain": [ "\u001b[1;3mOutput message of the LLM:\u001b[0m \u001b[38;2;212;183;2m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mThought:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mhave\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtheme:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mGotham\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mRogues'\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mBall.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mNow,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI'll\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msearch\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mideas.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwill\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23muse\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mweb_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtool.\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mCode:\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mpy\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mplaylist_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mweb_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mquery\u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mplaylist for villain masquerade party\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mprint\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  playlist_search = web_search(query=\"playlist for villain masquerade party\")                                      \n",
       "  print(playlist_search)                                                                                           \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "text/plain": [ " ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n", " \u001b[38;2;248;248;242;48;2;39;40;34mplaylist_search\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;34mplaylist for villain masquerade party\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;34mplaylist_search\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Execution logs:\n",
       "## Search Results\n",
       "\n",
       "[Masquerade party music - playlist by drew - Spotify](https://open.spotify.com/playlist/3gICKSayCeN6muUWNGHeK4)\n",
       "Playlist · Masquerade party music 🎭 · 38 items · 8 saves\n",
       "\n",
       "[you're at a masquerade and unknowingly dancing with the \n",
       "villain](https://open.spotify.com/playlist/4zxYvQs9gByjRhAn5ujSfQ)\n",
       "you're at a masquerade and unknowingly dancing with the villain · Playlist · 89 songs · 10 likes\n",
       "\n",
       "[you're at a masquerade and unknowingly dancing with your ... - \n",
       "YouTube](https://www.youtube.com/watch?v=e1ic7bV9dtA)\n",
       "ahh I literally couldn't wait to post this, so here is an upload a day early!! lets be honest, we come here for the\n",
       "music and stay for the povs. I totally di...\n",
       "\n",
       "[Villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLSUxcl7M9WV5zowHmaFGBYkdA2xfaCuuh)\n",
       "Songs with villain energy wether it be songs that give villain origin story vibes, evil monologue energy, the \n",
       "actions of a current villain, or songs giving the energy of the chemistry between a few villain characters, they go\n",
       "here! some of them might not seem villain like at first, but when you listen to them with the perspective of \n",
       "possibly being about / related to a villain character, it ...\n",
       "\n",
       "[dancing with your enemy at a masquerade ball - playlist by ... - \n",
       "Spotify](https://open.spotify.com/playlist/0zNqQEIlXMRKi3bBgccKWv)\n",
       "Playlist · dancing with your enemy at a masquerade ball · 25 items · 8.9K likes\n",
       "\n",
       "[a stormy night, an ancient castle, and a vampire masquerade (dark \n",
       "...](https://www.youtube.com/watch?v=i9yqAmS5DiY)\n",
       "⋅ • ☾ Travelling through the woods one dark evening, you are caught in a storm, but fortunately, an abandoned \n",
       "palace looms ahead. Entering, you find myster...\n",
       "\n",
       "[Villain Party Playlist to Boost Your Confidence ️‍ ... - YouTube](https://www.youtube.com/watch?v=cW2tfICi7yc)\n",
       "Welcome to my Hype Mix ️‍🔥 Let's get down and dirty this week and party it up 💃🏼!! I hope this playlist brings you a\n",
       "Confidence Boost and get you ready t...\n",
       "\n",
       "[villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLeHmu1wrqUW7XZdaCUTHE3bah5Y3a3hux)\n",
       "With the YouTube Music app, enjoy over 100 million songs at your fingertips, plus albums, playlists, remixes, music\n",
       "videos, live performances, covers, and hard-to-find music you can't get anywhere else.\n",
       "\n",
       "[The 99 Best Songs for Villains (Our Villain Arc Playlist) - \n",
       "iSpyTunes](https://www.ispytunes.com/post/best-songs-for-villains)\n",
       "With our handpicked villain playlist with 99 of the best songs, we invite you to immerse yourself in the world of \n",
       "darkness, power, and redemption. Whether you are a storyteller seeking inspiration or a listener looking for an \n",
       "exhilarating musical experience, this playlist offers a journey into the minds and hearts of a villain.\n",
       "\n",
       "[Masquerade Ball Party | Best in 2025 - Classpop](https://www.classpop.com/magazine/masquerade-ball-party)\n",
       "Superheroes and villains; Black and white; Roaring '20s; Angels and demons ... Music is a must. Even if you're not \n",
       "going with an all-out ball gown bash theme, you'll want to have a great playlist. For a traditional period, go with\n",
       "classical music like Vivaldi, Strauss, Beethoven or Mozart. ... While costumes are not necessarily required ...\n",
       "\n",
       "Out: None\n",
       "
\n" ], "text/plain": [ "\u001b[1mExecution logs:\u001b[0m\n", "## Search Results\n", "\n", "[Masquerade party music - playlist by drew - Spotify](https://open.spotify.com/playlist/3gICKSayCeN6muUWNGHeK4)\n", "Playlist · Masquerade party music 🎭 · 38 items · 8 saves\n", "\n", "[you're at a masquerade and unknowingly dancing with the \n", "villain](https://open.spotify.com/playlist/4zxYvQs9gByjRhAn5ujSfQ)\n", "you're at a masquerade and unknowingly dancing with the villain · Playlist · 89 songs · 10 likes\n", "\n", "[you're at a masquerade and unknowingly dancing with your ... - \n", "YouTube](https://www.youtube.com/watch?v=e1ic7bV9dtA)\n", "ahh I literally couldn't wait to post this, so here is an upload a day early!! lets be honest, we come here for the\n", "music and stay for the povs. I totally di...\n", "\n", "[Villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLSUxcl7M9WV5zowHmaFGBYkdA2xfaCuuh)\n", "Songs with villain energy wether it be songs that give villain origin story vibes, evil monologue energy, the \n", "actions of a current villain, or songs giving the energy of the chemistry between a few villain characters, they go\n", "here! some of them might not seem villain like at first, but when you listen to them with the perspective of \n", "possibly being about / related to a villain character, it ...\n", "\n", "[dancing with your enemy at a masquerade ball - playlist by ... - \n", "Spotify](https://open.spotify.com/playlist/0zNqQEIlXMRKi3bBgccKWv)\n", "Playlist · dancing with your enemy at a masquerade ball · 25 items · 8.9K likes\n", "\n", "[a stormy night, an ancient castle, and a vampire masquerade (dark \n", "...](https://www.youtube.com/watch?v=i9yqAmS5DiY)\n", "⋅ • ☾ Travelling through the woods one dark evening, you are caught in a storm, but fortunately, an abandoned \n", "palace looms ahead. Entering, you find myster...\n", "\n", "[Villain Party Playlist to Boost Your Confidence ️‍ ... - YouTube](https://www.youtube.com/watch?v=cW2tfICi7yc)\n", "Welcome to my Hype Mix ️‍🔥 Let's get down and dirty this week and party it up 💃🏼!! I hope this playlist brings you a\n", "Confidence Boost and get you ready t...\n", "\n", "[villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLeHmu1wrqUW7XZdaCUTHE3bah5Y3a3hux)\n", "With the YouTube Music app, enjoy over 100 million songs at your fingertips, plus albums, playlists, remixes, music\n", "videos, live performances, covers, and hard-to-find music you can't get anywhere else.\n", "\n", "[The 99 Best Songs for Villains (Our Villain Arc Playlist) - \n", "iSpyTunes](https://www.ispytunes.com/post/best-songs-for-villains)\n", "With our handpicked villain playlist with 99 of the best songs, we invite you to immerse yourself in the world of \n", "darkness, power, and redemption. Whether you are a storyteller seeking inspiration or a listener looking for an \n", "exhilarating musical experience, this playlist offers a journey into the minds and hearts of a villain.\n", "\n", "[Masquerade Ball Party | Best in 2025 - Classpop](https://www.classpop.com/magazine/masquerade-ball-party)\n", "Superheroes and villains; Black and white; Roaring '20s; Angels and demons ... Music is a must. Even if you're not \n", "going with an all-out ball gown bash theme, you'll want to have a great playlist. For a traditional period, go with\n", "classical music like Vivaldi, Strauss, Beethoven or Mozart. ... While costumes are not necessarily required ...\n", "\n", "Out: None\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 2: Duration 3.63 seconds| Input tokens: 5,220 | Output tokens: 146]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 2: Duration 3.63 seconds| Input tokens: 5,220 | Output tokens: 146]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n",
       "
\n" ], "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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Output message of the LLM: ────────────────────────────────────────────────────────────────────────────────────────\n",
       "Thought: Based on the search results, I can create a playlist with songs that fit the \"villain masquerade\" theme. I\n",
       "will use a combination of instrumental pieces, songs with a dark or mysterious vibe, and perhaps some classic      \n",
       "villain-themed songs. I can't provide a specific list of songs, but I can provide a general description of the     \n",
       "music style.                                                                                                       \n",
       "Code:                                                                                                              \n",
       "```py                                                                                                              \n",
       "final_answer(\"For a villain masquerade party at Wayne's mansion, the playlist should include a mix of orchestral or\n",
       "instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), along with songs \n",
       "that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps some electronic   \n",
       "music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and suspense, fitting the \n",
       "theme.\")                                                                                                           \n",
       "```                                                                                                                \n",
       "
\n" ], "text/plain": [ "\u001b[1;3mOutput message of the LLM:\u001b[0m \u001b[38;2;212;183;2m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mThought:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mBased\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mon\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msearch\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mresults,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcan\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcreate\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwith\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthat\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfit\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m\"villain\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmasquerade\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtheme.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mwill\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23muse\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcombination\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mof\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23minstrumental\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mpieces,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwith\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mdark\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmysterious\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mvibe,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mand\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mperhaps\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msome\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mclassic\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mvillain-themed\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcan't\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mprovide\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mspecific\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mlist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mof\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mbut\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcan\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mprovide\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mgeneral\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mdescription\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mof\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mmusic\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mstyle.\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mCode:\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mpy\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;230;237;243;48;2;13;17;23mfinal_answer\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mFor a villain masquerade party at Wayne\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m'\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23ms mansion, the playlist should include a mix of orchestral or\u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23minstrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), along with songs \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23mthat have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps some electronic \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23mmusic with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and suspense, fitting the \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23mtheme.\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n", "\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Executing parsed code: ──────────────────────────────────────────────────────────────────────────────────────── \n",
       "  final_answer(\"For a villain masquerade party at Wayne's mansion, the playlist should include a mix of            \n",
       "  orchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers),  \n",
       "  along with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and        \n",
       "  perhaps some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of          \n",
       "  intrigue and suspense, fitting the theme.\")                                                                      \n",
       " ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
       "
\n" ], "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;34mFor a villain masquerade party at Wayne\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 mansion, the playlist should include a mix of \u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34morchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers),\u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34malong with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and \u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34mperhaps some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of \u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n", " \u001b[38;2;230;219;116;48;2;39;40;34mintrigue and suspense, fitting the theme.\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" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Out - Final answer: For a villain masquerade party at Wayne's mansion, the playlist should include a mix of \n",
       "orchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), \n",
       "along with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps \n",
       "some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and \n",
       "suspense, fitting the theme.\n",
       "
\n" ], "text/plain": [ "\u001b[1;38;2;212;183;2mOut - Final answer: For a villain masquerade party at Wayne's mansion, the playlist should include a mix of \u001b[0m\n", "\u001b[1;38;2;212;183;2morchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), \u001b[0m\n", "\u001b[1;38;2;212;183;2malong with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps \u001b[0m\n", "\u001b[1;38;2;212;183;2msome electronic music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and \u001b[0m\n", "\u001b[1;38;2;212;183;2msuspense, fitting the theme.\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[Step 3: Duration 1.95 seconds| Input tokens: 8,930 | Output tokens: 315]\n",
       "
\n" ], "text/plain": [ "\u001b[2m[Step 3: Duration 1.95 seconds| Input tokens: 8,930 | Output tokens: 315]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "\"For a villain masquerade party at Wayne's mansion, the playlist should include a mix of orchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), along with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and suspense, fitting the theme.\"" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from smolagents import VisitWebpageTool, FinalAnswerTool, Tool, tool\n", "\n", "@tool\n", "def suggest_menu(occasion: str) -> str:\n", " \"\"\"\n", " Suggests a menu based on the occasion.\n", " Args:\n", " occasion: The type of occasion for the party.\n", " \"\"\"\n", " if occasion == \"casual\":\n", " return \"Pizza, snacks, and drinks.\"\n", " elif occasion == \"formal\":\n", " return \"3-course dinner with wine and dessert.\"\n", " elif occasion == \"superhero\":\n", " return \"Buffet with high-energy and healthy food.\"\n", " else:\n", " return \"Custom menu for the butler.\"\n", "\n", "@tool\n", "def catering_service_tool(query: str) -> str:\n", " \"\"\"\n", " This tool returns the highest-rated catering service in Gotham City.\n", "\n", " Args:\n", " query: A search term for finding catering services.\n", " \"\"\"\n", " # Example list of catering services and their ratings\n", " services = {\n", " \"Gotham Catering Co.\": 4.9,\n", " \"Wayne Manor Catering\": 4.8,\n", " \"Gotham City Events\": 4.7,\n", " }\n", "\n", " # Find the highest rated catering service (simulating search query filtering)\n", " best_service = max(services, key=services.get)\n", "\n", " return best_service\n", "\n", "class SuperheroPartyThemeTool(Tool):\n", " name = \"superhero_party_theme_generator\"\n", " description = \"\"\"\n", " This tool suggests creative superhero-themed party ideas based on a category.\n", " It returns a unique party theme idea.\"\"\"\n", "\n", " inputs = {\n", " \"category\": {\n", " \"type\": \"string\",\n", " \"description\": \"The type of superhero party (e.g., 'classic heroes', 'villain masquerade', 'futuristic Gotham').\",\n", " }\n", " }\n", "\n", " output_type = \"string\"\n", "\n", " def forward(self, category: str):\n", " themes = {\n", " \"classic heroes\": \"Justice League Gala: Guests come dressed as their favorite DC heroes with themed cocktails like 'The Kryptonite Punch'.\",\n", " \"villain masquerade\": \"Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.\",\n", " \"futuristic Gotham\": \"Neo-Gotham Night: A cyberpunk-style party inspired by Batman Beyond, with neon decorations and futuristic gadgets.\"\n", " }\n", "\n", " return themes.get(category.lower(), \"Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.\")\n", "\n", "\n", "# Alfred, the butler, preparing the menu for the party\n", "agent = CodeAgent(\n", " tools=[\n", " DuckDuckGoSearchTool(),\n", " VisitWebpageTool(),\n", " suggest_menu,\n", " catering_service_tool,\n", " SuperheroPartyThemeTool()\n", " ],\n", " model=model,\n", " max_steps=10,\n", " verbosity_level=2\n", ")\n", "\n", "agent.run(\"Give me best playlist for a party at the Wayne's mansion. The party idea is a 'villain masquerade' theme\")" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d6ec1a2b13a34ca19ede0df5888fb427", "version_major": 2, "version_minor": 0 }, "text/plain": [ "README.md: 0%| | 0.00/278 [00:00, line 11)", "output_type": "error", "traceback": [ "Traceback \u001b[0;36m(most recent call last)\u001b[0m:\n", "\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/IPython/core/interactiveshell.py:3577\u001b[0m in \u001b[1;35mrun_code\u001b[0m\n exec(code_obj, self.user_global_ns, self.user_ns)\u001b[0m\n", "\u001b[0m Cell \u001b[1;32mIn[26], line 1\u001b[0m\n agent.push_to_hub('MartinHummel/AlfredAgent')\u001b[0m\n", "\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/agents.py:987\u001b[0m in \u001b[1;35mpush_to_hub\u001b[0m\n self.save(work_dir)\u001b[0m\n", "\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/agents.py:714\u001b[0m in \u001b[1;35msave\u001b[0m\n tool.save(os.path.join(output_dir, \"tools\"), tool_file_name=tool.name, make_gradio_app=False)\u001b[0m\n", "\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/tools.py:286\u001b[0m in \u001b[1;35msave\u001b[0m\n tool_dict = self.to_dict()\u001b[0m\n", "\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/tools.py:258\u001b[0m in \u001b[1;35mto_dict\u001b[0m\n validate_tool_attributes(self.__class__)\u001b[0m\n", "\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/tool_validation.py:205\u001b[0m in \u001b[1;35mvalidate_tool_attributes\u001b[0m\n source = get_source(cls)\u001b[0m\n", "\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/utils.py:412\u001b[0m in \u001b[1;35mget_source\u001b[0m\n tree = ast.parse(all_cells)\u001b[0m\n", "\u001b[0;36m File \u001b[0;32m~/.pyenv/versions/3.11.4/lib/python3.11/ast.py:50\u001b[0;36m in \u001b[0;35mparse\u001b[0;36m\n\u001b[0;31m return compile(source, filename, mode, flags,\u001b[0;36m\n", "\u001b[0;36m File \u001b[0;32m:11\u001b[0;36m\u001b[0m\n\u001b[0;31m add_base_tools=True)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m closing parenthesis ')' does not match opening parenthesis '[' on line 9\n" ] } ], "source": [ "agent.push_to_hub('MartinHummel/AlfredAgent')" ] } ], "metadata": { "kernelspec": { "display_name": "agents", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.4" } }, "nbformat": 4, "nbformat_minor": 2 }