import{s as ue,n as he,o as be}from"../chunks/scheduler.3d32dc09.js";import{S as Je,i as Te,e as M,s as n,c as i,h as ge,a as y,d as t,b as a,f as me,g as p,j as o,k as Ll,l as fe,m as s,n as U,t as r,o as j,p as c}from"../chunks/index.f9718211.js";import{C as Ae,H as zl,E as Ie}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.51c38499.js";import{C as w}from"../chunks/CodeBlock.ab331c21.js";import{D as Be}from"../chunks/DocNotebookDropdown.79c5aa63.js";function ke(Fl){let d,nl,tl,al,m,Ml,u,yl,h,ol,b,ql="In this notebook we will make a <strong>multi-agent web browser: an agentic system with several agents collaborating to solve problems using the web!</strong>",il,J,Pl="It will be a simple hierarchy:",pl,T,Ul,g,Dl="Let’s set up this system.",rl,f,Kl="Run the line below to install the required dependencies:",jl,A,cl,I,Ol="Let’s login to HF in order to call Inference Providers:",wl,B,dl,k,le='⚡️ Our agent will be powered by <a href="https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct" rel="nofollow">Qwen/Qwen2.5-Coder-32B-Instruct</a> using <code>InferenceClientModel</code> class that uses HF’s Inference API: the Inference API allows to quickly and easily run any OS model.',Cl,C,ee='<p>Inference Providers give access to hundreds of models, powered by serverless inference partners. A list of supported providers can be found <a href="https://huggingface.co/docs/inference-providers/index" rel="nofollow">here</a>.</p>',ml,Z,ul,v,hl,G,te='For web browsing, we can already use our native <a href="/docs/smolagents/v1.22.0/en/reference/default_tools#smolagents.WebSearchTool">WebSearchTool</a> tool to provide a Google search equivalent.',bl,W,se=`But then we will also need to be able to peak into the page found by the <code>WebSearchTool</code>.
To do so, we could import the library’s built-in <code>VisitWebpageTool</code>, but we will build it again to see how it’s done.`,Jl,S,ne="So let’s create our <code>VisitWebpageTool</code> tool from scratch using <code>markdownify</code>.",Tl,$,gl,V,ae="Ok, now let’s initialize and test our tool!",fl,E,Al,Q,Il,_,Me="Now that we have all the tools <code>search</code> and <code>visit_webpage</code>, we can use them to create the web agent.",Bl,x,ye="Which configuration to choose for this agent?",kl,H,oe="<li>Web browsing is a single-timeline task that does not require parallel tool calls, so JSON tool calling works well for that. We thus choose a <code>ToolCallingAgent</code>.</li> <li>Also, since sometimes web search requires exploring many pages before finding the correct answer, we prefer to increase the number of <code>max_steps</code> to 10.</li>",Zl,R,vl,X,ie="Note that we gave this agent attributes <code>name</code> and <code>description</code>, mandatory attributes to make this agent callable by its manager agent.",Gl,N,pe="Then we create a manager agent, and upon initialization we pass our managed agent to it in its <code>managed_agents</code> argument.",Wl,Y,Ue="Since this agent is the one tasked with the planning and thinking, advanced reasoning will be beneficial, so a <code>CodeAgent</code> will work well.",Sl,L,re="Also, we want to ask a question that involves the current year and does additional data calculations: so let us add <code>additional_authorized_imports=[&quot;time&quot;, &quot;numpy&quot;, &quot;pandas&quot;]</code>, just in case the agent needs these packages.",$l,z,Vl,F,je="That’s all! Now let’s run our system! We select a question that requires both some calculation and research:",El,q,Ql,P,ce="We get this report as the answer:",_l,D,xl,K,we='Seems like we’ll need some sizeable powerplants if the <a href="https://gwern.net/scaling-hypothesis" rel="nofollow">scaling hypothesis</a> continues to hold true.',Hl,O,de="Our agents managed to efficiently collaborate towards solving the task! ✅",Rl,ll,Ce="💡 You can easily extend this orchestration to more agents: one does the code execution, one the web search, one handles file loadings…",Xl,el,Nl,sl,Yl;return m=new Ae({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),u=new zl({props:{title:"Orchestrate a multi-agent system 🤖🤝🤖",local:"orchestrate-a-multi-agent-system-",headingTag:"h1"}}),h=new Be({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/multiagents.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/pytorch/multiagents.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/en/tensorflow/multiagents.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/multiagents.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/pytorch/multiagents.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/en/tensorflow/multiagents.ipynb"}]}}),T=new w({props:{code:"JTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTJCLS0tLS0tLS0tLS0tLS0tLSUyQiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyME1hbmFnZXIlMjBhZ2VudCUyMCUyMCU3QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyQi0tLS0tLS0tLS0tLS0tLS0lMkIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0MlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBfX19fX19fX19fX19fX18lN0NfX19fX19fX19fX19fXyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUwQUNvZGUlMjBJbnRlcnByZXRlciUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyQi0tLS0tLS0tLS0tLS0tLS0tLSUyQiUwQSUyMCUyMCUyMCUyMHRvb2wlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0MlMjBXZWIlMjBTZWFyY2glMjBhZ2VudCUyMCU3QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyQi0tLS0tLS0tLS0tLS0tLS0tLSUyQiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFdlYiUyMFNlYXJjaCUyMHRvb2wlMjAlMjAlMjAlMjAlMjAlN0MlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBWaXNpdCUyMHdlYnBhZ2UlMjB0b29s",highlighted:`              +----------------+
              |<span class="hljs-string"> Manager agent  </span>|
              +----------------+
                       |<span class="hljs-string">
        _______________</span>|______________
       |<span class="hljs-string">                              </span>|
Code Interpreter            +------------------+
    tool                    |<span class="hljs-string"> Web Search agent </span>|
                            +------------------+
                               |<span class="hljs-string">            </span>|
                        Web Search tool     |<span class="hljs-string">
                                   Visit webpage tool</span>`,wrap:!1}}),A=new w({props:{code:"IXBpcCUyMGluc3RhbGwlMjAnc21vbGFnZW50cyU1QnRvb2xraXQlNUQnJTIwLS11cGdyYWRlJTIwLXE=",highlighted:'!pip install <span class="hljs-string">&#x27;smolagents[toolkit]&#x27;</span> --upgrade -q',wrap:!1}}),B=new w({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGxvZ2luJTBBJTBBbG9naW4oKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> login

login()`,wrap:!1}}),Z=new w({props:{code:"bW9kZWxfaWQlMjAlM0QlMjAlMjJRd2VuJTJGUXdlbjIuNS1Db2Rlci0zMkItSW5zdHJ1Y3QlMjI=",highlighted:'model_id = <span class="hljs-string">&quot;Qwen/Qwen2.5-Coder-32B-Instruct&quot;</span>',wrap:!1}}),v=new zl({props:{title:"🔍 Create a web search tool",local:"-create-a-web-search-tool",headingTag:"h2"}}),$=new w({props:{code:"aW1wb3J0JTIwcmUlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBtYXJrZG93bmlmeSUyMGltcG9ydCUyMG1hcmtkb3duaWZ5JTBBZnJvbSUyMHJlcXVlc3RzLmV4Y2VwdGlvbnMlMjBpbXBvcnQlMjBSZXF1ZXN0RXhjZXB0aW9uJTBBZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjB0b29sJTBBJTBBJTBBJTQwdG9vbCUwQWRlZiUyMHZpc2l0X3dlYnBhZ2UodXJsJTNBJTIwc3RyKSUyMC0lM0UlMjBzdHIlM0ElMEElMjAlMjAlMjAlMjAlMjIlMjIlMjJWaXNpdHMlMjBhJTIwd2VicGFnZSUyMGF0JTIwdGhlJTIwZ2l2ZW4lMjBVUkwlMjBhbmQlMjByZXR1cm5zJTIwaXRzJTIwY29udGVudCUyMGFzJTIwYSUyMG1hcmtkb3duJTIwc3RyaW5nLiUwQSUwQSUyMCUyMCUyMCUyMEFyZ3MlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB1cmwlM0ElMjBUaGUlMjBVUkwlMjBvZiUyMHRoZSUyMHdlYnBhZ2UlMjB0byUyMHZpc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QyUyMCUyMiU1Q24lNUNuJTIyJTJDJTIwbWFya2Rvd25fY29udGVudCklMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBtYXJrZG93bl9jb250ZW50JTBBJTBBJTIwJTIwJTIwJTIwZXhjZXB0JTIwUmVxdWVzdEV4Y2VwdGlvbiUyMGFzJTIwZSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMGYlMjJFcnJvciUyMGZldGNoaW5nJTIwdGhlJTIwd2VicGFnZSUzQSUyMCU3QnN0cihlKSU3RCUyMiUwQSUyMCUyMCUyMCUyMGV4Y2VwdCUyMEV4Y2VwdGlvbiUyMGFzJTIwZSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMGYlMjJBbiUyMHVuZXhwZWN0ZWQlMjBlcnJvciUyMG9jY3VycmVkJTNBJTIwJTdCc3RyKGUpJTdEJTIy",highlighted:`<span class="hljs-keyword">import</span> re
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> markdownify <span class="hljs-keyword">import</span> markdownify
<span class="hljs-keyword">from</span> requests.exceptions <span class="hljs-keyword">import</span> RequestException
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> tool


<span class="hljs-meta">@tool</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">visit_webpage</span>(<span class="hljs-params">url: <span class="hljs-built_in">str</span></span>) -&gt; <span class="hljs-built_in">str</span>:
    <span class="hljs-string">&quot;&quot;&quot;Visits a webpage at the given URL and returns its content as a markdown string.

    Args:
        url: The URL of the webpage to visit.

    Returns:
        The content of the webpage converted to Markdown, or an error message if the request fails.
    &quot;&quot;&quot;</span>
    <span class="hljs-keyword">try</span>:
        <span class="hljs-comment"># Send a GET request to the URL</span>
        response = requests.get(url)
        response.raise_for_status()  <span class="hljs-comment"># Raise an exception for bad status codes</span>

        <span class="hljs-comment"># Convert the HTML content to Markdown</span>
        markdown_content = markdownify(response.text).strip()

        <span class="hljs-comment"># Remove multiple line breaks</span>
        markdown_content = re.sub(<span class="hljs-string">r&quot;\\n{3,}&quot;</span>, <span class="hljs-string">&quot;\\n\\n&quot;</span>, markdown_content)

        <span class="hljs-keyword">return</span> markdown_content

    <span class="hljs-keyword">except</span> RequestException <span class="hljs-keyword">as</span> e:
        <span class="hljs-keyword">return</span> <span class="hljs-string">f&quot;Error fetching the webpage: <span class="hljs-subst">{<span class="hljs-built_in">str</span>(e)}</span>&quot;</span>
    <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:
        <span class="hljs-keyword">return</span> <span class="hljs-string">f&quot;An unexpected error occurred: <span class="hljs-subst">{<span class="hljs-built_in">str</span>(e)}</span>&quot;</span>`,wrap:!1}}),E=new w({props:{code:"cHJpbnQodmlzaXRfd2VicGFnZSglMjJodHRwcyUzQSUyRiUyRmVuLndpa2lwZWRpYS5vcmclMkZ3aWtpJTJGSHVnZ2luZ19GYWNlJTIyKSU1QiUzQTUwMCU1RCk=",highlighted:'<span class="hljs-built_in">print</span>(visit_webpage(<span class="hljs-string">&quot;https://en.wikipedia.org/wiki/Hugging_Face&quot;</span>)[:<span class="hljs-number">500</span>])',wrap:!1}}),Q=new zl({props:{title:"Build our multi-agent system 🤖🤝🤖",local:"build-our-multi-agent-system-",headingTag:"h2"}}),R=new w({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjAoJTBBJTIwJTIwJTIwJTIwQ29kZUFnZW50JTJDJTBBJTIwJTIwJTIwJTIwVG9vbENhbGxpbmdBZ2VudCUyQyUwQSUyMCUyMCUyMCUyMEluZmVyZW5jZUNsaWVudE1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwV2ViU2VhcmNoVG9vbCUyQyUwQSUyMCUyMCUyMCUyMExpdGVMTE1Nb2RlbCUyQyUwQSklMEElMEFtb2RlbCUyMCUzRCUyMEluZmVyZW5jZUNsaWVudE1vZGVsKG1vZGVsX2lkJTNEbW9kZWxfaWQpJTBBJTBBd2ViX2FnZW50JTIwJTNEJTIwVG9vbENhbGxpbmdBZ2VudCglMEElMjAlMjAlMjAlMjB0b29scyUzRCU1QldlYlNlYXJjaFRvb2woKSUyQyUyMHZpc2l0X3dlYnBhZ2UlNUQlMkMlMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwbWF4X3N0ZXBzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjBuYW1lJTNEJTIyd2ViX3NlYXJjaF9hZ2VudCUyMiUyQyUwQSUyMCUyMCUyMCUyMGRlc2NyaXB0aW9uJTNEJTIyUnVucyUyMHdlYiUyMHNlYXJjaGVzJTIwZm9yJTIweW91LiUyMiUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> (
    CodeAgent,
    ToolCallingAgent,
    InferenceClientModel,
    WebSearchTool,
    LiteLLMModel,
)

model = InferenceClientModel(model_id=model_id)

web_agent = ToolCallingAgent(
    tools=[WebSearchTool(), visit_webpage],
    model=model,
    max_steps=<span class="hljs-number">10</span>,
    name=<span class="hljs-string">&quot;web_search_agent&quot;</span>,
    description=<span class="hljs-string">&quot;Runs web searches for you.&quot;</span>,
)`,wrap:!1}}),z=new w({props:{code:"bWFuYWdlcl9hZ2VudCUyMCUzRCUyMENvZGVBZ2VudCglMEElMjAlMjAlMjAlMjB0b29scyUzRCU1QiU1RCUyQyUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBtYW5hZ2VkX2FnZW50cyUzRCU1QndlYl9hZ2VudCU1RCUyQyUwQSUyMCUyMCUyMCUyMGFkZGl0aW9uYWxfYXV0aG9yaXplZF9pbXBvcnRzJTNEJTVCJTIydGltZSUyMiUyQyUyMCUyMm51bXB5JTIyJTJDJTIwJTIycGFuZGFzJTIyJTVEJTJDJTBBKQ==",highlighted:`manager_agent = CodeAgent(
    tools=[],
    model=model,
    managed_agents=[web_agent],
    additional_authorized_imports=[<span class="hljs-string">&quot;time&quot;</span>, <span class="hljs-string">&quot;numpy&quot;</span>, <span class="hljs-string">&quot;pandas&quot;</span>],
)`,wrap:!1}}),q=new w({props:{code:"YW5zd2VyJTIwJTNEJTIwbWFuYWdlcl9hZ2VudC5ydW4oJTIySWYlMjBMTE0lMjB0cmFpbmluZyUyMGNvbnRpbnVlcyUyMHRvJTIwc2NhbGUlMjB1cCUyMGF0JTIwdGhlJTIwY3VycmVudCUyMHJoeXRobSUyMHVudGlsJTIwMjAzMCUyQyUyMHdoYXQlMjB3b3VsZCUyMGJlJTIwdGhlJTIwZWxlY3RyaWMlMjBwb3dlciUyMGluJTIwR1clMjByZXF1aXJlZCUyMHRvJTIwcG93ZXIlMjB0aGUlMjBiaWdnZXN0JTIwdHJhaW5pbmclMjBydW5zJTIwYnklMjAyMDMwJTNGJTIwV2hhdCUyMHdvdWxkJTIwdGhhdCUyMGNvcnJlc3BvbmQlMjB0byUyQyUyMGNvbXBhcmVkJTIwdG8lMjBzb21lJTIwY291bnRyaWVzJTNGJTIwUGxlYXNlJTIwcHJvdmlkZSUyMGElMjBzb3VyY2UlMjBmb3IlMjBhbnklMjBudW1iZXJzJTIwdXNlZC4lMjIp",highlighted:'answer = manager_agent.run(<span class="hljs-string">&quot;If LLM training continues to scale up at the current rhythm until 2030, what would be the electric power in GW required to power the biggest training runs by 2030? What would that correspond to, compared to some countries? Please provide a source for any numbers used.&quot;</span>)',wrap:!1}}),D=new w({props:{code:"QmFzZWQlMjBvbiUyMGN1cnJlbnQlMjBncm93dGglMjBwcm9qZWN0aW9ucyUyMGFuZCUyMGVuZXJneSUyMGNvbnN1bXB0aW9uJTIwZXN0aW1hdGVzJTJDJTIwaWYlMjBMTE0lMjB0cmFpbmluZ3MlMjBjb250aW51ZSUyMHRvJTIwc2NhbGUlMjB1cCUyMGF0JTIwdGhlJTIwJTBBY3VycmVudCUyMHJoeXRobSUyMHVudGlsJTIwM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R1clMjBmb3IlMjBmdXR1cmUlMjBMTE0lMjB0cmFpbmluZyUyMGNvbWVzJTIwZnJvbSUyMEFXUyUyMENFTyUyME1hdHQlMjBHYXJtYW4uJTBBJTIwJTIwJTIwLSUyMFRoZSUyMGdyb3d0aCUyMHByb2plY3Rpb24lMjB1c2VkJTIwYSUyMENBR1IlMjBvZiUyMDc5LjgwJTI1JTIwZnJvbSUyMG1hcmtldCUyMHJlc2VhcmNoJTIwYnklMjBTcHJpbmdzLiUwQSUyMCUyMCUyMC0lMjBDb3VudHJ5JTIwZWxlY3RyaWNpdHklMjBjb25zdW1wdGlvbiUyMGRhdGElMjBpcyUyMGZyb20lMjB0aGUlMjBVLlMuJTIwRW5lcmd5JTIwSW5mb3JtYXRpb24lMjBBZG1pbmlzdHJhdGlvbiUyQyUyMHByaW1hcmlseSUyMGZvciUyMHRoZSUyMHllYXIlMjAlMEEyMDIxLg==",highlighted:`Based <span class="hljs-keyword">on</span> current growth projections <span class="hljs-keyword">and</span> energy consumption estimates, <span class="hljs-keyword">if</span> LLM trainings <span class="hljs-keyword">continue</span> <span class="hljs-keyword">to</span> scale up <span class="hljs-keyword">at</span> <span class="hljs-keyword">the</span> 
current rhythm <span class="hljs-keyword">until</span> <span class="hljs-number">2030</span>:

<span class="hljs-number">1.</span> The electric power required <span class="hljs-keyword">to</span> power <span class="hljs-keyword">the</span> biggest training runs <span class="hljs-keyword">by</span> <span class="hljs-number">2030</span> would be approximately <span class="hljs-number">303.74</span> GW, which 
translates <span class="hljs-keyword">to</span> <span class="hljs-keyword">about</span> <span class="hljs-number">2</span>,<span class="hljs-number">660</span>,<span class="hljs-number">762</span> GWh/<span class="hljs-built_in">year</span>.

<span class="hljs-number">2.</span> Comparing this <span class="hljs-keyword">to</span> countries&#x27; electricity consumption:
   - It would be equivalent <span class="hljs-keyword">to</span> <span class="hljs-keyword">about</span> <span class="hljs-number">34</span>% <span class="hljs-keyword">of</span> China&#x27;s total electricity consumption.
   - It would exceed <span class="hljs-keyword">the</span> total electricity consumption <span class="hljs-keyword">of</span> India (<span class="hljs-number">184</span>%), Russia (<span class="hljs-number">267</span>%), <span class="hljs-keyword">and</span> Japan (<span class="hljs-number">291</span>%).
   - It would be nearly <span class="hljs-number">9</span> <span class="hljs-keyword">times</span> <span class="hljs-keyword">the</span> electricity consumption <span class="hljs-keyword">of</span> countries like Italy <span class="hljs-keyword">or</span> Mexico.

<span class="hljs-number">3.</span> Source <span class="hljs-keyword">of</span> numbers:
   - The initial estimate <span class="hljs-keyword">of</span> <span class="hljs-number">5</span> GW <span class="hljs-keyword">for</span> future LLM training comes <span class="hljs-keyword">from</span> AWS CEO Matt Garman.
   - The growth projection used a CAGR <span class="hljs-keyword">of</span> <span class="hljs-number">79.80</span>% <span class="hljs-keyword">from</span> market research <span class="hljs-keyword">by</span> Springs.
   - Country electricity consumption data <span class="hljs-keyword">is</span> <span class="hljs-keyword">from</span> <span class="hljs-keyword">the</span> U.S. Energy Information Administration, primarily <span class="hljs-keyword">for</span> <span class="hljs-keyword">the</span> <span class="hljs-built_in">year</span> 
<span class="hljs-number">2021.</span>`,wrap:!1}}),el=new Ie({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/en/examples/multiagents.md"}}),{c(){d=M("meta"),nl=n(),tl=M("p"),al=n(),i(m.$$.fragment),Ml=n(),i(u.$$.fragment),yl=n(),i(h.$$.fragment),ol=n(),b=M("p"),b.innerHTML=ql,il=n(),J=M("p"),J.textContent=Pl,pl=n(),i(T.$$.fragment),Ul=n(),g=M("p"),g.textContent=Dl,rl=n(),f=M("p"),f.textContent=Kl,jl=n(),i(A.$$.fragment),cl=n(),I=M("p"),I.textContent=Ol,wl=n(),i(B.$$.fragment),dl=n(),k=M("p"),k.innerHTML=le,Cl=n(),C=M("blockquote"),C.innerHTML=ee,ml=n(),i(Z.$$.fragment),ul=n(),i(v.$$.fragment),hl=n(),G=M("p"),G.innerHTML=te,bl=n(),W=M("p"),W.innerHTML=se,Jl=n(),S=M("p"),S.innerHTML=ne,Tl=n(),i($.$$.fragment),gl=n(),V=M("p"),V.textContent=ae,fl=n(),i(E.$$.fragment),Al=n(),i(Q.$$.fragment),Il=n(),_=M("p"),_.innerHTML=Me,Bl=n(),x=M("p"),x.textContent=ye,kl=n(),H=M("ul"),H.innerHTML=oe,Zl=n(),i(R.$$.fragment),vl=n(),X=M("p"),X.innerHTML=ie,Gl=n(),N=M("p"),N.innerHTML=pe,Wl=n(),Y=M("p"),Y.innerHTML=Ue,Sl=n(),L=M("p"),L.innerHTML=re,$l=n(),i(z.$$.fragment),Vl=n(),F=M("p"),F.textContent=je,El=n(),i(q.$$.fragment),Ql=n(),P=M("p"),P.textContent=ce,_l=n(),i(D.$$.fragment),xl=n(),K=M("p"),K.innerHTML=we,Hl=n(),O=M("p"),O.textContent=de,Rl=n(),ll=M("p"),ll.textContent=Ce,Xl=n(),i(el.$$.fragment),Nl=n(),sl=M("p"),this.h()},l(l){const e=ge("svelte-u9bgzb",document.head);d=y(e,"META",{name:!0,content:!0}),e.forEach(t),nl=a(l),tl=y(l,"P",{}),me(tl).forEach(t),al=a(l),p(m.$$.fragment,l),Ml=a(l),p(u.$$.fragment,l),yl=a(l),p(h.$$.fragment,l),ol=a(l),b=y(l,"P",{"data-svelte-h":!0}),o(b)!=="svelte-45abwn"&&(b.innerHTML=ql),il=a(l),J=y(l,"P",{"data-svelte-h":!0}),o(J)!=="svelte-1f6nia6"&&(J.textContent=Pl),pl=a(l),p(T.$$.fragment,l),Ul=a(l),g=y(l,"P",{"data-svelte-h":!0}),o(g)!=="svelte-1occiln"&&(g.textContent=Dl),rl=a(l),f=y(l,"P",{"data-svelte-h":!0}),o(f)!=="svelte-ofrdjq"&&(f.textContent=Kl),jl=a(l),p(A.$$.fragment,l),cl=a(l),I=y(l,"P",{"data-svelte-h":!0}),o(I)!=="svelte-gkovew"&&(I.textContent=Ol),wl=a(l),p(B.$$.fragment,l),dl=a(l),k=y(l,"P",{"data-svelte-h":!0}),o(k)!=="svelte-16hajs3"&&(k.innerHTML=le),Cl=a(l),C=y(l,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(C)!=="svelte-1lti5bi"&&(C.innerHTML=ee),ml=a(l),p(Z.$$.fragment,l),ul=a(l),p(v.$$.fragment,l),hl=a(l),G=y(l,"P",{"data-svelte-h":!0}),o(G)!=="svelte-6hbbyh"&&(G.innerHTML=te),bl=a(l),W=y(l,"P",{"data-svelte-h":!0}),o(W)!=="svelte-128rf40"&&(W.innerHTML=se),Jl=a(l),S=y(l,"P",{"data-svelte-h":!0}),o(S)!=="svelte-1ms2uj2"&&(S.innerHTML=ne),Tl=a(l),p($.$$.fragment,l),gl=a(l),V=y(l,"P",{"data-svelte-h":!0}),o(V)!=="svelte-hbvg5t"&&(V.textContent=ae),fl=a(l),p(E.$$.fragment,l),Al=a(l),p(Q.$$.fragment,l),Il=a(l),_=y(l,"P",{"data-svelte-h":!0}),o(_)!=="svelte-5768lo"&&(_.innerHTML=Me),Bl=a(l),x=y(l,"P",{"data-svelte-h":!0}),o(x)!=="svelte-noa5rw"&&(x.textContent=ye),kl=a(l),H=y(l,"UL",{"data-svelte-h":!0}),o(H)!=="svelte-cg2xmz"&&(H.innerHTML=oe),Zl=a(l),p(R.$$.fragment,l),vl=a(l),X=y(l,"P",{"data-svelte-h":!0}),o(X)!=="svelte-fbxoqx"&&(X.innerHTML=ie),Gl=a(l),N=y(l,"P",{"data-svelte-h":!0}),o(N)!=="svelte-wtigy3"&&(N.innerHTML=pe),Wl=a(l),Y=y(l,"P",{"data-svelte-h":!0}),o(Y)!=="svelte-1lmitd7"&&(Y.innerHTML=Ue),Sl=a(l),L=y(l,"P",{"data-svelte-h":!0}),o(L)!=="svelte-1ezr7oa"&&(L.innerHTML=re),$l=a(l),p(z.$$.fragment,l),Vl=a(l),F=y(l,"P",{"data-svelte-h":!0}),o(F)!=="svelte-90lagx"&&(F.textContent=je),El=a(l),p(q.$$.fragment,l),Ql=a(l),P=y(l,"P",{"data-svelte-h":!0}),o(P)!=="svelte-tvhx1x"&&(P.textContent=ce),_l=a(l),p(D.$$.fragment,l),xl=a(l),K=y(l,"P",{"data-svelte-h":!0}),o(K)!=="svelte-19s7crl"&&(K.innerHTML=we),Hl=a(l),O=y(l,"P",{"data-svelte-h":!0}),o(O)!=="svelte-ollz3q"&&(O.textContent=de),Rl=a(l),ll=y(l,"P",{"data-svelte-h":!0}),o(ll)!=="svelte-rvy62f"&&(ll.textContent=Ce),Xl=a(l),p(el.$$.fragment,l),Nl=a(l),sl=y(l,"P",{}),me(sl).forEach(t),this.h()},h(){Ll(d,"name","hf:doc:metadata"),Ll(d,"content",Ze),Ll(C,"class","tip")},m(l,e){fe(document.head,d),s(l,nl,e),s(l,tl,e),s(l,al,e),U(m,l,e),s(l,Ml,e),U(u,l,e),s(l,yl,e),U(h,l,e),s(l,ol,e),s(l,b,e),s(l,il,e),s(l,J,e),s(l,pl,e),U(T,l,e),s(l,Ul,e),s(l,g,e),s(l,rl,e),s(l,f,e),s(l,jl,e),U(A,l,e),s(l,cl,e),s(l,I,e),s(l,wl,e),U(B,l,e),s(l,dl,e),s(l,k,e),s(l,Cl,e),s(l,C,e),s(l,ml,e),U(Z,l,e),s(l,ul,e),U(v,l,e),s(l,hl,e),s(l,G,e),s(l,bl,e),s(l,W,e),s(l,Jl,e),s(l,S,e),s(l,Tl,e),U($,l,e),s(l,gl,e),s(l,V,e),s(l,fl,e),U(E,l,e),s(l,Al,e),U(Q,l,e),s(l,Il,e),s(l,_,e),s(l,Bl,e),s(l,x,e),s(l,kl,e),s(l,H,e),s(l,Zl,e),U(R,l,e),s(l,vl,e),s(l,X,e),s(l,Gl,e),s(l,N,e),s(l,Wl,e),s(l,Y,e),s(l,Sl,e),s(l,L,e),s(l,$l,e),U(z,l,e),s(l,Vl,e),s(l,F,e),s(l,El,e),U(q,l,e),s(l,Ql,e),s(l,P,e),s(l,_l,e),U(D,l,e),s(l,xl,e),s(l,K,e),s(l,Hl,e),s(l,O,e),s(l,Rl,e),s(l,ll,e),s(l,Xl,e),U(el,l,e),s(l,Nl,e),s(l,sl,e),Yl=!0},p:he,i(l){Yl||(r(m.$$.fragment,l),r(u.$$.fragment,l),r(h.$$.fragment,l),r(T.$$.fragment,l),r(A.$$.fragment,l),r(B.$$.fragment,l),r(Z.$$.fragment,l),r(v.$$.fragment,l),r($.$$.fragment,l),r(E.$$.fragment,l),r(Q.$$.fragment,l),r(R.$$.fragment,l),r(z.$$.fragment,l),r(q.$$.fragment,l),r(D.$$.fragment,l),r(el.$$.fragment,l),Yl=!0)},o(l){j(m.$$.fragment,l),j(u.$$.fragment,l),j(h.$$.fragment,l),j(T.$$.fragment,l),j(A.$$.fragment,l),j(B.$$.fragment,l),j(Z.$$.fragment,l),j(v.$$.fragment,l),j($.$$.fragment,l),j(E.$$.fragment,l),j(Q.$$.fragment,l),j(R.$$.fragment,l),j(z.$$.fragment,l),j(q.$$.fragment,l),j(D.$$.fragment,l),j(el.$$.fragment,l),Yl=!1},d(l){l&&(t(nl),t(tl),t(al),t(Ml),t(yl),t(ol),t(b),t(il),t(J),t(pl),t(Ul),t(g),t(rl),t(f),t(jl),t(cl),t(I),t(wl),t(dl),t(k),t(Cl),t(C),t(ml),t(ul),t(hl),t(G),t(bl),t(W),t(Jl),t(S),t(Tl),t(gl),t(V),t(fl),t(Al),t(Il),t(_),t(Bl),t(x),t(kl),t(H),t(Zl),t(vl),t(X),t(Gl),t(N),t(Wl),t(Y),t(Sl),t(L),t($l),t(Vl),t(F),t(El),t(Ql),t(P),t(_l),t(xl),t(K),t(Hl),t(O),t(Rl),t(ll),t(Xl),t(Nl),t(sl)),t(d),c(m,l),c(u,l),c(h,l),c(T,l),c(A,l),c(B,l),c(Z,l),c(v,l),c($,l),c(E,l),c(Q,l),c(R,l),c(z,l),c(q,l),c(D,l),c(el,l)}}}const Ze='{"title":"Orchestrate a multi-agent system 🤖🤝🤖","local":"orchestrate-a-multi-agent-system-","sections":[{"title":"🔍 Create a web search tool","local":"-create-a-web-search-tool","sections":[],"depth":2},{"title":"Build our multi-agent system 🤖🤝🤖","local":"build-our-multi-agent-system-","sections":[],"depth":2}],"depth":1}';function ve(Fl){return be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ee extends Je{constructor(d){super(),Te(this,d,ve,ke,ue,{})}}export{Ee as component};
