import{s as fi,n as Ci,o as _i}from"../chunks/scheduler.65852ee5.js";import{S as bi,i as Ji,g as s,s as a,r as c,A as Ui,h as l,f as t,c as o,j as ki,u as g,x as r,k as Ti,y as Ii,a as n,v as w,d as p,t as d,w as u}from"../chunks/index.aa74147d.js";import{D as Ai,C as m}from"../chunks/DocNotebookDropdown.479f4286.js";import{H as Ve,E as vi}from"../chunks/EditOnGithub.4eda6a96.js";function ji(Qe){let h,ae,te,oe,M,se,y,le,k,qe='<em>Authored by: <a href="https://huggingface.co/m-ric" rel="nofollow">Aymeric Roucher</a></em>',re,T,Ye='<p>This tutorial is advanced. You should have notions from <a href="agents">this other cookbook</a> first!</p>',ce,f,ze="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>",ge,C,Xe="It will be a simple hierarchy, using a <code>ManagedAgent</code> object to wrap the managed web search agent:",we,_,pe,b,Oe="Let’s set up this system.",de,J,Ke='⚡️ Our agent will be powered by <a href="https://huggingface.co/meta-llama/Meta-Llama-3.1-70B-Instruct" rel="nofollow">meta-llama/Meta-Llama-3.1-70B-Instruct</a> using <code>HfApiEngine</code> class that uses HF’s Inference API: the Inference API allows to quickly and easily run any OS model.',ue,U,ei="Run the line below to install the required dependencies:",he,I,me,A,Me,v,ii="The token has not been saved to the git credentials helper. Pass `add_to_git_credential=True` in this function directly or `--add-to-git-credential` if using via `huggingface-cli` if you want to set the git credential as well.\nToken is valid (permission: fineGrained).\nYour token has been saved to /Users/aymeric/.cache/huggingface/token\nLogin successful\n",ye,j,ke,S,ti='For web browsing, we can already use our pre-existing <a href="https://github.com/huggingface/transformers/blob/main/src/transformers/agents/search.py" rel="nofollow"><code>DuckDuckGoSearchTool</code></a> tool to provide a Google search equivalent.',Te,F,ni=`But then we will also need to be able to peak into the page found by the <code>DuckDuckGoSearchTool</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.`,fe,H,ai="So let’s create our <code>VisitWebpageTool</code> tool from scratch using <code>markdownify</code>.",Ce,B,_e,W,oi="Ok, now let’s initialize and test our tool!",be,G,Je,L,si=`Hugging Face \\- Wikipedia

[Jump to content](#bodyContent)

Main menu

Main menu
move to sidebar
hide

 Navigation
 

* [Main page](/wiki/Main_Page "Visit the main page [z]")
* [Contents](/wiki/Wikipedia:Contents "Guides to browsing Wikipedia")
* [Current events](/wiki/Portal:Current_events "Articles related to current events")
* [Random article](/wiki/Special:Random "Visit a randomly selected article [x]")
* [About Wikipedia](/wiki/Wikipedia:About "Learn about Wikipedia and how it works")
* [Contact us](//en.wikipedia.org/wiki/Wikipedia:Contact_us "How to contact Wikipedia")
* [Donate](https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en "Support us by donating to the Wikimedia Foundation")

 Contribute
 

* [Help](/wiki/Help:Contents "Guidance on how to use and edit Wikipedia")
* [Learn to edit](/wiki/Help:Introduction "Learn how to edit Wikipedia")
* [Community portal](/wiki/Wikipedia:Community_portal "The hub for editors")
* [Recent changes](/wiki/Special:RecentChanges "A list of recent changes to Wikipedia [r]")
* [Upload file](/wiki/Wikipedia:File_upload_wizard "Add images or other media for use on Wikipedia")

[![](/static/images/icons/wikipedia.png)

![Wikipedia](/static/images/mobile/copyright/wikipedia-wordmark-en.svg)
![The Free Encyclopedia](/static/images/mobile/copyright/wikipedia-tagline-en.svg)](/wiki/Main_Page)

[Search](/wiki/Special:Search "Search Wikipedia [f]")

Search

Appearance

* [Create account](/w/index.php?title=Special:CreateAccount&returnto=Hugging+Face "You are encouraged to create an account and log in; however, it is not mandatory")
* [Log in](/w/index.php?title=Special:UserLogin&returnto=Hugging+Face "You're encouraged to log in; however, it's not mandatory. [o]")

Personal tools

* [Create account](/w/index.php?title=Special:CreateAccount&returnto=Hugging+Face "You are encouraged to create an account and log in; however, it is not mandatory")
* [Log in](/w/index.php?title=Special:UserLogin&returnto=Hugging+Face "You're encouraged to log in; however, it's not mandatory. [o]")

 Pages for logged out editors [learn more](/wiki/Help:Introduction)

* [Contributions](/wiki/Special:MyContributions "A list of edits made from this IP address [y]")
* [Talk](/wiki/Special:MyTalk "Discussion about edits from this IP address [n]")

Contents
--------

move to sidebar
hide

* [(Top)](#)
* [1
History](#History)
* [2
Services and technologies](#Services_and_technologies)

Toggle Services and technologies subsection

	+ [2\\.1
	Transformers Library](#Transformers_Library)
	+ [2\\.2
	Hugging Face Hub](#Hugging_Face_Hub)
	+ [2\\.3
	Other libraries](#Other_libraries)
* [3
See also](#See_also)
* [4
References](#References)

Toggle the table of contents

Hugging Face
============

18 languages

* [Català](https://ca.wikipedia.org/wiki/Hugging_Face "Hugging Face – Catalan")
* [Deutsch](https://de.wikipedia.org/wiki/Hugging_Face "Hugging Face – German")
* [Español](https://es.wikipedia.org/wiki/Hugging_Face "Hugging Face – Spanish")
* [Euskara](https://eu.wikipedia.org/wiki/Hugging_Face "Hugging Face – Basque")
* [فارسی](https://fa.wikipedia.org/wiki/%D9%87%D8%A7%DA%AF%DB%8C%D9%86%DA%AF_%D9%81%DB%8C%D8%B3 "هاگینگ فیس – Persian")
* [Français](https://fr.wikipedia.org/wiki/Hugging_Face "Hugging Face – French")
* [한국어](https://ko.wikipedia.org/wiki/%ED%97%88%EA%B9%85_%ED%8E%98%EC%9D%B4%EC%8A%A4 "허깅 페이스 – Korean")
* [Bahasa Indonesia](https://id.wikipedia.org/wiki/Hugging_Face "Hugging Face – Indonesian")
* [עברית](https://he.wikipedia.org/wiki/Hugging_Face "Hugging Face – Hebrew")
* [Nederlands](https://nl.wikipedia.org/wiki/Hugging_Face "Hugging Face – Dutch")
* [日本語](https://ja.wikipedia.org/wiki/Hugging_Face "Hugging Face – Japanese")
* [Português](https://pt.wikipedia.org/wiki/Hugging_Face "Hugging Face – Portuguese")
* [Runa Simi](https://qu.wikipedia.org/wiki/Hugging_Face "Hugging Face – Quechua")
* [Русский](https://ru.wikipedia.org/wiki/Hugging_Face "Hugging Face – Russian")
* [Suomi](https://fi.wikipedia.org/wiki/Hugging_Face "Hugging Face – Finnish")
* [Türkçe](https://tr.wikipedia.org/wiki/Hugging_Face "Hugging Face – Turkish")
* [Українська](https://uk.wikipedia.org/wiki/Hugging_Face "Hugging Face – Ukrainian")
* [中文](https://zh.wikipedia.org/wiki/Hugging_Face "Hugging Face – Chinese")

[Edit links](https://www.wikidata.org/wiki/Special:EntityPage/Q108943604#sitelinks-wikipedia "Edit interlanguage links")

* [Article](/wiki/Hugging_Face "View the content page [c]")
* [Talk](/wiki/Talk:Hugging_Face "Discuss improvements to the content page [t]")

English

* [Read](/wiki/Hugging_Face)
* [Edit](/w/index.php?title=Hugging_Face&action=edit "Edit this page [e]")
* [View history](/w/index.php?title=Hugging_Face&action=history "Past revisions of this page [h]")

Tools

Tools
move to sidebar
hide

 Actions
 

* [Read](/wiki/Hugging_Face)
* [Edit](/w/index.php?title=Hugging_Face&action=edit "Edit this page [e]")
* [View history](/w/index.php?title=Hugging_Face&action=history)

 General
 

* [What links here](/wiki/Special:WhatLinksHere/Hugging_Face "List of all English Wikipedia pages containing links to this page [j]")
* [Related changes](/wiki/Special:RecentChangesLinked/Hugging_Face "Recent changes in pages linked from this page [k]")
* [Upload file](/wiki/Wikipedia:File_Upload_Wizard "Upload files [u]")
* [Special pages](/wiki/Special:SpecialPages "A list of all special pages [q]")
* [Permanent link](/w/index.php?title=Hugging_Face&oldid=1238858455 "Permanent link to this revision of this page")
* [Page information](/w/index.php?title=Hugging_Face&action=info "More information about this page")
* [Cite this page](/w/index.php?title=Special:CiteThisPage&page=Hugging_Face&id=1238858455&wpFormIdentifier=titleform "Information on how to cite this page")
* [Get shortened URL](/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHugging_Face)
* [Download QR code](/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHugging_Face)
* [Wikidata item](https://www.wikidata.org/wiki/Special:EntityPage/Q108943604 "Structured data on this page hosted by Wikidata [g]")

 Print/export
 

* [Download as PDF](/w/index.php?title=Special:DownloadAsPdf&page=Hugging_Face&action=show-download-screen "Download this page as a PDF file")
* [Printable version](/w/index.php?title=Hugging_Face&printable=yes "Printable version of this page [p]")

 In other projects
 

* [Wikimedia Commons](https://commons.wikimedia.org/wiki/Category:Hugging_Face)

Appearance
move to sidebar
hide

From Wikipedia, the free encyclopedia

American software company
This article is about the company. For the emoji, see [Emoji](/wiki/Emoji "Emoji").

|  | This article **relies excessively on [references](/wiki/Wikipedia:Verifiability "Wikipedia:Verifiability") to [primary sources](/wiki/Wikipedia:No_original_research#Primary,_secondary_and_tertiary_sources "Wikipedia:No original research")**. Please improve this article by adding [secondary or tertiary sources](/wiki/Wikipedia:No_original_research#Primary,_secondary_and_tertiary_sources "Wikipedia:No original research"). *Find sources:* ["Hugging Face"](https://www.google.com/search?as_eq=wikipedia&q=%22Hugging+Face%22) – [news](https://www.google.com/search?tbm=nws&q=%22Hugging+Face%22+-wikipedia&tbs=ar:1) **·** [newspapers](https://www.google.com/search?&q=%22Hugging+Face%22&tbs=bkt:s&tbm=bks) **·** [books](https://www.google.com/search?tbs=bks:1&q=%22Hugging+Face%22+-wikipedia) **·** [scholar](https://scholar.google.com/scholar?q=%22Hugging+Face%22) **·** [JSTOR](https://www.jstor.org/action/doBasicSearch?Query=%22Hugging+Face%22&acc=on&wc=on) *(February 2023)* *([Learn how and when to remove this message](/wiki/Help:Maintenance_template_removal "Help:Maintenance template removal"))* |
| --- | --- |

Hugging Face, Inc.
|  | |
| --- | --- |
| Company type | [Private](/wiki/Privately_held_company "Privately held company") |
| Industry | [Artificial intelligence](/wiki/Artificial_intelligence "Artificial intelligence"), [machine learning](/wiki/Machine_learning "Machine learning"), [software development](/wiki/Software_development "Software development") |
| Founded | 2016; 8 years ago (2016) |
| Headquarters | [Manhattan](/wiki/Manhattan "Manhattan"), [New York City](/wiki/New_York_City "New York City") |
| Area served | Worldwide |
| Key people | * Clément Delangue (CEO) * Julien Chaumond (CTO) * Thomas Wolf (CSO) |
| Products | Models, datasets, spaces |
| Revenue | 15,000,000 United States dollar (2022\\) [Edit this on Wikidata](https://www.wikidata.org/wiki/Q108943604?uselang=en#P2139 "Edit this on Wikidata") |
| Number of employees | 170 (2023\\) [Edit this on Wikidata](https://www.wikidata.org/wiki/Q108943604?uselang=en#P1128 "Edit this on Wikidata") |
| Website | [huggingface.co](https://huggingface.co/) |

**Hugging Face, Inc.** is an American company incorporated under the [Delaware General Corporation Law](/wiki/Delaware_General_Corporation_Law "Delaware General Corporation Law")[\\[1]](#cite_note-1) and based in [New York City](/wiki/List_of_tech_companies_in_the_New_York_metropolitan_area "List of tech companies in the New York metropolitan area") that develops [computation](/wiki/Computation "Computation") tools for building applications using [machine learning](/wiki/Machine_learning "Machine learning"). It is most notable for its [transformers](/wiki/Transformer_(machine_learning_model) "Transformer (machine learning model)") [library](/wiki/Software_libraries "Software libraries") built for [natural language processing](/wiki/Natural_language_processing "Natural language processing") applications and its platform that allows users to share machine learning models and [datasets](/wiki/Dataset_(machine_learning) "Dataset (machine learning)") and showcase their work.

History
-------

\\[[edit](/w/index.php?title=Hugging_Face&action=edit§ion=1 "Edit section: History")]
The company was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf in [New York City](/wiki/New_York_City "New York City"), originally as a company that developed a [chatbot](/wiki/Chatbot "Chatbot") app targeted at teenagers.[\\[2]](#cite_note-:0-2) The company was named after the "hugging face" [emoji](/wiki/Emoji "Emoji").[\\[2]](#cite_note-:0-2) After [open sourcing](/wiki/Open-source_software "Open-source software") the model behind the chatbot, the company [pivoted](/wiki/Lean_startup "Lean startup") to focus on being a platform for machine learning.

In March 2021, Hugging Face raised US$40 million in a [Series B](/wiki/Series_B "Series B") funding round.[\\[3]](#cite_note-3)

On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open [large language model](/wiki/Large_language_model "Large language model").[\\[4]](#cite_note-4) In 2022, the workshop concluded with the announcement of [BLOOM](/wiki/BLOOM_(language_model) "BLOOM (language model)"), a multilingual large language model with 176 billion parameters.[\\[5]](#cite_note-5)[\\[6]](#cite_note-6)

In December 2022, the company acquired Gradio, an open source library built for developing machine learning applications in Python.[\\[7]](#cite_note-7)

On May 5, 2022, the company announced its [Series C](/wiki/Series_C "Series C") funding round led by [Coatue](/wiki/Coatue_Management "Coatue Management") and [Sequoia](/wiki/Sequoia_fund "Sequoia fund").[\\[8]](#cite_note-8) The company received a $2 billion valuation.

On August 3, 2022, the company announced the Private Hub, an enterprise version of its public Hugging Face Hub that supports [SaaS](/wiki/Software_as_a_service "Software as a service") or [on\\-premises](/wiki/On-premises_software "On-premises software") deployment.[\\[9]](#cite_note-9)

In February 2023, the company announced partnership with [Amazon Web Services](/wiki/Amazon_Web_Services "Amazon Web Services") (AWS) which would allow Hugging Face's products available to AWS customers to use them as the building blocks for their custom applications. The company also said the next generation of BLOOM will be run on Trainium, a proprietary [machine learning chip](/wiki/Machine_learning_hardware "Machine learning hardware") created by AWS.[\\[10]](#cite_note-10)[\\[11]](#cite_note-11)[\\[12]](#cite_note-12)

In August 2023, the company announced that it raised $235 million in a [Series D](/wiki/Series_D "Series D") funding, at a $4\\.5 billion valuation. The funding was led by [Salesforce](/wiki/Salesforce "Salesforce"), and notable participation came from [Google](/wiki/Google "Google"), [Amazon](/wiki/Amazon_(company) "Amazon (company)"), [Nvidia](/wiki/Nvidia "Nvidia"), [AMD](/wiki/AMD "AMD"), [Intel](/wiki/Intel "Intel"), [IBM](/wiki/IBM "IBM"), and [Qualcomm](/wiki/Qualcomm "Qualcomm").[\\[13]](#cite_note-13)

In June 2024, the company announced, along with [Meta](/wiki/Meta_Platforms "Meta Platforms") and [Scaleway](/wiki/Scaleway "Scaleway"), their launch of a new AI accelerator program for European startups. This initiative aims to help startups integrate open foundation models into their products, accelerating the EU AI ecosystem. The program, based at STATION F in Paris, will run from September 2024 to February 2025\\. Selected startups will receive mentoring, access to AI models and tools, and Scaleway’s computing power.[\\[14]](#cite_note-14)

Services and technologies
-------------------------

\\[[edit](/w/index.php?title=Hugging_Face&action=edit§ion=2 "Edit section: Services and technologies")]
### Transformers Library

\\[[edit](/w/index.php?title=Hugging_Face&action=edit§ion=3 "Edit section: Transformers Library")]
The Transformers library is a [Python](/wiki/Python_(programming_language) "Python (programming language)") package that contains open\\-source implementations of [transformer](/wiki/Transformer_(machine_learning_model) "Transformer (machine learning model)") models for text, image, and audio tasks. It is compatible with the [PyTorch](/wiki/PyTorch "PyTorch"), [TensorFlow](/wiki/TensorFlow "TensorFlow") and [JAX](/wiki/Google_JAX "Google JAX") [deep learning](/wiki/Deep_learning "Deep learning") libraries and includes implementations of notable models like [BERT](/wiki/BERT_(language_model) "BERT (language model)") and [GPT\\-2](/wiki/GPT-2 "GPT-2").[\\[15]](#cite_note-15) The library was originally called "pytorch\\-pretrained\\-bert"[\\[16]](#cite_note-16) which was then renamed to "pytorch\\-transformers" and finally "transformers."

A [javascript](/wiki/JavaScript "JavaScript") version (transformers.js[\\[17]](#cite_note-17)) have also been developed, allowing to run models directly in the browser.

### Hugging Face Hub

\\[[edit](/w/index.php?title=Hugging_Face&action=edit§ion=4 "Edit section: Hugging Face Hub")]
The Hugging Face Hub is a platform (centralized [web service](/wiki/Web_service "Web service")) for hosting:[\\[18]](#cite_note-18)

* [Git](/wiki/Git "Git")\\-based [code repositories](/wiki/Repository_(version_control) "Repository (version control)"), including discussions and pull requests for projects.
* models, also with Git\\-based version control;
* datasets, mainly in text, images, and audio;
* web applications ("spaces" and "widgets"), intended for small\\-scale demos of machine learning applications.

There are numerous pre\\-trained models that support common tasks in different modalities, such as:

* [Natural Language Processing](/wiki/Natural_language_processing "Natural language processing"): text classification, named entity recognition, question answering, language modeling, summarization, translation, multiple choice, and text generation.
* [Computer Vision](/wiki/Computer_vision "Computer vision"): image classification, object detection, and segmentation.
* Audio: automatic speech recognition and audio classification.

### Other libraries

\\[[edit](/w/index.php?title=Hugging_Face&action=edit§ion=5 "Edit section: Other libraries")]
[![](//upload.wikimedia.org/wikipedia/commons/thumb/2/29/Gradio_example.png/220px-Gradio_example.png)](/wiki/File:Gradio_example.png)

Gradio UI Example

In addition to Transformers and the Hugging Face Hub, the Hugging Face ecosystem contains libraries for other tasks, such as [dataset processing](/wiki/Data_processing "Data processing") ("Datasets"), model evaluation ("Evaluate"), and machine learning demos ("Gradio").[\\[19]](#cite_note-19)

See also
--------

\\[[edit](/w/index.php?title=Hugging_Face&action=edit§ion=6 "Edit section: See also")]
* [OpenAI](/wiki/OpenAI "OpenAI")
* [Station F](/wiki/Station_F "Station F")

References
----------

\\[[edit](/w/index.php?title=Hugging_Face&action=edit§ion=7 "Edit section: References")]

1. **[^](#cite_ref-1)** ["Terms of Service – Hugging Face"](https://huggingface.co/terms-of-service). *huggingface.co*. Retrieved 2024\\-05\\-24.
2. ^ [***a***](#cite_ref-:0_2-0) [***b***](#cite_ref-:0_2-1) ["Hugging Face wants to become your artificial BFF"](https://techcrunch.com/2017/03/09/hugging-face-wants-to-become-your-artificial-bff/). *TechCrunch*. 9 March 2017\\. [Archived](https://web.archive.org/web/20220925012620/https://techcrunch.com/2017/03/09/hugging-face-wants-to-become-your-artificial-bff/) from the original on 2022\\-09\\-25. Retrieved 2023\\-09\\-17.
3. **[^](#cite_ref-3)** ["Hugging Face raises $40 million for its natural language processing library"](https://techcrunch.com/2021/03/11/hugging-face-raises-40-million-for-its-natural-language-processing-library). 11 March 2021\\. [Archived](https://web.archive.org/web/20230728113102/https://techcrunch.com/2021/03/11/hugging-face-raises-40-million-for-its-natural-language-processing-library/) from the original on 28 July 2023. Retrieved 5 August 2022.
4. **[^](#cite_ref-4)** ["Inside BigScience, the quest to build a powerful open language model"](https://venturebeat.com/2022/01/10/inside-bigscience-the-quest-to-build-a-powerful-open-language-model/). 10 January 2022\\. [Archived](https://web.archive.org/web/20220701073233/https://venturebeat.com/2022/01/10/inside-bigscience-the-quest-to-build-a-powerful-open-language-model/) from the original on 1 July 2022. Retrieved 5 August 2022.
5. **[^](#cite_ref-5)** ["BLOOM"](https://bigscience.huggingface.co/blog/bloom). *bigscience.huggingface.co*. [Archived](https://web.archive.org/web/20221114122342/https://bigscience.huggingface.co/blog/bloom) from the original on 2022\\-11\\-14. Retrieved 2022\\-08\\-20.
6. **[^](#cite_ref-6)** ["Inside a radical new project to democratize AI"](https://www.technologyreview.com/2022/07/12/1055817/inside-a-radical-new-project-to-democratize-ai/). *MIT Technology Review*. [Archived](https://web.archive.org/web/20221204184214/https://www.technologyreview.com/2022/07/12/1055817/inside-a-radical-new-project-to-democratize-ai/) from the original on 2022\\-12\\-04. Retrieved 2023\\-08\\-25.
7. **[^](#cite_ref-7)** Nataraj, Poornima (2021\\-12\\-23\\). ["Hugging Face Acquires Gradio, A Customizable UI Components Library For Python"](https://analyticsindiamag.com/hugging-face-acquires-gradio-a-customizable-ui-components-library-for-python/). *Analytics India Magazine*. Retrieved 2024\\-01\\-26.
8. **[^](#cite_ref-8)** Cai, Kenrick. ["The $2 Billion Emoji: Hugging Face Wants To Be Launchpad For A Machine Learning Revolution"](https://www.forbes.com/sites/kenrickcai/2022/05/09/the-2-billion-emoji-hugging-face-wants-to-be-launchpad-for-a-machine-learning-revolution/). *Forbes*. [Archived](https://web.archive.org/web/20221103121236/https://www.forbes.com/sites/kenrickcai/2022/05/09/the-2-billion-emoji-hugging-face-wants-to-be-launchpad-for-a-machine-learning-revolution/) from the original on 2022\\-11\\-03. Retrieved 2022\\-08\\-20.
9. **[^](#cite_ref-9)** ["Introducing the Private Hub: A New Way to Build With Machine Learning"](https://huggingface.co/blog/introducing-private-hub). *huggingface.co*. [Archived](https://web.archive.org/web/20221114122333/https://huggingface.co/blog/introducing-private-hub) from the original on 2022\\-11\\-14. Retrieved 2022\\-08\\-20.
10. **[^](#cite_ref-10)** Bass, Dina (2023\\-02\\-21\\). ["Amazon's Cloud Unit Partners With Startup Hugging Face as AI Deals Heat Up"](https://www.bloomberg.com/news/articles/2023-02-21/amazon-s-aws-joins-with-ai-startup-hugging-face-as-chatgpt-competition-heats-up). *[Bloomberg News](/wiki/Bloomberg_News "Bloomberg News")*. [Archived](https://web.archive.org/web/20230522030130/https://www.bloomberg.com/news/articles/2023-02-21/amazon-s-aws-joins-with-ai-startup-hugging-face-as-chatgpt-competition-heats-up) from the original on 2023\\-05\\-22. Retrieved 2023\\-02\\-22.
11. **[^](#cite_ref-11)** Nellis, Stephen (2023\\-02\\-21\\). ["Amazon Web Services pairs with Hugging Face to target AI developers"](https://www.reuters.com/technology/amazon-web-services-pairs-with-hugging-face-target-ai-developers-2023-02-21/). *Reuters*. [Archived](https://web.archive.org/web/20230530091325/https://www.reuters.com/technology/amazon-web-services-pairs-with-hugging-face-target-ai-developers-2023-02-21/) from the original on 2023\\-05\\-30. Retrieved 2023\\-02\\-22.
12. **[^](#cite_ref-12)** ["AWS and Hugging Face collaborate to make generative AI more accessible and cost efficient \\| AWS Machine Learning Blog"](https://aws.amazon.com/blogs/machine-learning/aws-and-hugging-face-collaborate-to-make-generative-ai-more-accessible-and-cost-efficient/). *aws.amazon.com*. 2023\\-02\\-21\\. [Archived](https://web.archive.org/web/20230825202343/https://aws.amazon.com/blogs/machine-learning/aws-and-hugging-face-collaborate-to-make-generative-ai-more-accessible-and-cost-efficient/) from the original on 2023\\-08\\-25. Retrieved 2023\\-08\\-25.
13. **[^](#cite_ref-13)** Leswing, Kif (2023\\-08\\-24\\). ["Google, Amazon, Nvidia and other tech giants invest in AI startup Hugging Face, sending its valuation to $4\\.5 billion"](https://www.cnbc.com/2023/08/24/google-amazon-nvidia-amd-other-tech-giants-invest-in-hugging-face.html). *CNBC*. [Archived](https://web.archive.org/web/20230824141538/https://www.cnbc.com/2023/08/24/google-amazon-nvidia-amd-other-tech-giants-invest-in-hugging-face.html) from the original on 2023\\-08\\-24. Retrieved 2023\\-08\\-24.
14. **[^](#cite_ref-14)** ["META Collaboration Launches AI Accelerator for European Startups"](https://finance.yahoo.com/news/meta-collaboration-launches-ai-accelerator-151500146.html). *Yahoo Finance*. 2024\\-06\\-25. Retrieved 2024\\-07\\-11.
15. **[^](#cite_ref-15)** ["🤗 Transformers"](https://huggingface.co/docs/transformers/index). *huggingface.co*. [Archived](https://web.archive.org/web/20230927023923/https://huggingface.co/docs/transformers/index) from the original on 2023\\-09\\-27. Retrieved 2022\\-08\\-20.
16. **[^](#cite_ref-16)** ["First release"](https://github.com/huggingface/transformers/releases/tag/v0.1.2). *GitHub*. Nov 17, 2018\\. [Archived](https://web.archive.org/web/20230430011038/https://github.com/huggingface/transformers/releases/tag/v0.1.2) from the original on 30 April 2023. Retrieved 28 March 2023.
17. **[^](#cite_ref-17)** ["xenova/transformers.js"](https://github.com/xenova/transformers.js). *GitHub*.
18. **[^](#cite_ref-18)** ["Hugging Face Hub documentation"](https://huggingface.co/docs/hub/index). *huggingface.co*. [Archived](https://web.archive.org/web/20230920185949/https://huggingface.co/docs/hub/index) from the original on 2023\\-09\\-20. Retrieved 2022\\-08\\-20.
19. **[^](#cite_ref-19)** ["Hugging Face \\- Documentation"](https://huggingface.co/docs). *huggingface.co*. [Archived](https://web.archive.org/web/20230930074626/https://huggingface.co/docs) from the original on 2023\\-09\\-30. Retrieved 2023\\-02\\-18.

| * [v](/wiki/Template:Differentiable_computing "Template:Differentiable computing") * [t](/wiki/Template_talk:Differentiable_computing "Template talk:Differentiable computing") * [e](/wiki/Special:EditPage/Template:Differentiable_computing "Special:EditPage/Template:Differentiable computing") Differentiable computing | |
| --- | --- |
| [General](/wiki/Differentiable_function "Differentiable function") | * **[Differentiable programming](/wiki/Differentiable_programming "Differentiable programming")** * [Information geometry](/wiki/Information_geometry "Information geometry") * [Statistical manifold](/wiki/Statistical_manifold "Statistical manifold") * [Automatic differentiation](/wiki/Automatic_differentiation "Automatic differentiation") * [Neuromorphic engineering](/wiki/Neuromorphic_engineering "Neuromorphic engineering") * [Pattern recognition](/wiki/Pattern_recognition "Pattern recognition") * [Tensor calculus](/wiki/Tensor_calculus "Tensor calculus") * [Computational learning theory](/wiki/Computational_learning_theory "Computational learning theory") * [Inductive bias](/wiki/Inductive_bias "Inductive bias") |
| Concepts | * [Gradient descent](/wiki/Gradient_descent "Gradient descent") 	+ [SGD](/wiki/Stochastic_gradient_descent "Stochastic gradient descent") * [Clustering](/wiki/Cluster_analysis "Cluster analysis") * [Regression](/wiki/Regression_analysis "Regression analysis") 	+ [Overfitting](/wiki/Overfitting "Overfitting") * [Hallucination](/wiki/Hallucination_(artificial_intelligence) "Hallucination (artificial intelligence)") * [Adversary](/wiki/Adversarial_machine_learning "Adversarial machine learning") * [Attention](/wiki/Attention_(machine_learning) "Attention (machine learning)") * [Convolution](/wiki/Convolution "Convolution") * [Loss functions](/wiki/Loss_functions_for_classification "Loss functions for classification") * [Backpropagation](/wiki/Backpropagation "Backpropagation") * [Batchnorm](/wiki/Batch_normalization "Batch normalization") * [Activation](/wiki/Activation_function "Activation function") 	+ [Softmax](/wiki/Softmax_function "Softmax function") 	+ [Sigmoid](/wiki/Sigmoid_function "Sigmoid function") 	+ [Rectifier](/wiki/Rectifier_(neural_networks) "Rectifier (neural networks)") * [Regularization](/wiki/Regularization_(mathematics) "Regularization (mathematics)") * [Datasets](/wiki/Training,_validation,_and_test_sets "Training, validation, and test sets") 	+ [Augmentation](/wiki/Data_augmentation "Data augmentation") * [Diffusion](/wiki/Diffusion_process "Diffusion process") * [Autoregression](/wiki/Autoregressive_model "Autoregressive model") |
| Applications | * [Machine learning](/wiki/Machine_learning "Machine learning") 	+ [In\\-context learning](/wiki/Prompt_engineering#In-context_learning "Prompt engineering") * [Artificial neural network](/wiki/Artificial_neural_network "Artificial neural network") 	+ [Deep learning](/wiki/Deep_learning "Deep learning") * [Scientific computing](/wiki/Computational_science "Computational science") * [Artificial Intelligence](/wiki/Artificial_intelligence "Artificial intelligence") * [Language model](/wiki/Language_model "Language model") 	+ [Large language model](/wiki/Large_language_model "Large language model") |
| Hardware | * [IPU](/wiki/Graphcore "Graphcore") * [TPU](/wiki/Tensor_Processing_Unit "Tensor Processing Unit") * [VPU](/wiki/Vision_processing_unit "Vision processing unit") * [Memristor](/wiki/Memristor "Memristor") * [SpiNNaker](/wiki/SpiNNaker "SpiNNaker") |
| Software libraries | * [TensorFlow](/wiki/TensorFlow "TensorFlow") * [PyTorch](/wiki/PyTorch "PyTorch") * [Keras](/wiki/Keras "Keras") * [Theano](/wiki/Theano_(software) "Theano (software)") * [JAX](/wiki/Google_JAX "Google JAX") * [Flux.jl](/wiki/Flux_(machine-learning_framework) "Flux (machine-learning framework)") * [MindSpore](/wiki/MindSpore "MindSpore") |
| Implementations | | Audio–visual | * [AlexNet](/wiki/AlexNet "AlexNet") * [WaveNet](/wiki/WaveNet "WaveNet") * [Human image synthesis](/wiki/Human_image_synthesis "Human image synthesis") * [HWR](/wiki/Handwriting_recognition "Handwriting recognition") * [OCR](/wiki/Optical_character_recognition "Optical character recognition") * [Speech synthesis](/wiki/Deep_learning_speech_synthesis "Deep learning speech synthesis") * [Speech recognition](/wiki/Speech_recognition "Speech recognition") * [Facial recognition](/wiki/Facial_recognition_system "Facial recognition system") * [AlphaFold](/wiki/AlphaFold "AlphaFold") * [Text\\-to\\-image models](/wiki/Text-to-image_model "Text-to-image model") 	+ [DALL\\-E](/wiki/DALL-E "DALL-E") 	+ [Midjourney](/wiki/Midjourney "Midjourney") 	+ [Stable Diffusion](/wiki/Stable_Diffusion "Stable Diffusion") * [Text\\-to\\-video models](/wiki/Text-to-video_model "Text-to-video model") 	+ [Sora](/wiki/Sora_(text-to-video_model) "Sora (text-to-video model)") 	+ [VideoPoet](/wiki/VideoPoet "VideoPoet") * [Whisper](/wiki/Whisper_(speech_recognition_system) "Whisper (speech recognition system)") | | --- | --- | | Verbal | * [Word2vec](/wiki/Word2vec "Word2vec") * [Seq2seq](/wiki/Seq2seq "Seq2seq") * [BERT](/wiki/BERT_(language_model) "BERT (language model)") * [Gemini](/wiki/Gemini_(language_model) "Gemini (language model)") * [LaMDA](/wiki/LaMDA "LaMDA") 	+ [Bard](/wiki/Bard_(chatbot) "Bard (chatbot)") * [NMT](/wiki/Neural_machine_translation "Neural machine translation") * [Project Debater](/wiki/Project_Debater "Project Debater") * [IBM Watson](/wiki/IBM_Watson "IBM Watson") * [IBM Watsonx](/wiki/IBM_Watsonx "IBM Watsonx") * [Granite](/wiki/IBM_Granite "IBM Granite") * [GPT\\-1](/wiki/GPT-1 "GPT-1") * [GPT\\-2](/wiki/GPT-2 "GPT-2") * [GPT\\-3](/wiki/GPT-3 "GPT-3") * [GPT\\-4](/wiki/GPT-4 "GPT-4") * [ChatGPT](/wiki/ChatGPT "ChatGPT") * [GPT\\-J](/wiki/GPT-J "GPT-J") * [Chinchilla AI](/wiki/Chinchilla_AI "Chinchilla AI") * [PaLM](/wiki/PaLM "PaLM") * [BLOOM](/wiki/BLOOM_(language_model) "BLOOM (language model)") * [LLaMA](/wiki/LLaMA "LLaMA") * [PanGu\\-Σ](/wiki/Huawei_PanGu "Huawei PanGu") | | Decisional | * [AlphaGo](/wiki/AlphaGo "AlphaGo") * [AlphaZero](/wiki/AlphaZero "AlphaZero") * [Q\\-learning](/wiki/Q-learning "Q-learning") * [SARSA](/wiki/State%E2%80%93action%E2%80%93reward%E2%80%93state%E2%80%93action "State–action–reward–state–action") * [OpenAI Five](/wiki/OpenAI_Five "OpenAI Five") * [Self\\-driving car](/wiki/Self-driving_car "Self-driving car") * [MuZero](/wiki/MuZero "MuZero") * [Action selection](/wiki/Action_selection "Action selection") 	+ [Auto\\-GPT](/wiki/Auto-GPT "Auto-GPT") * [Robot control](/wiki/Robot_control "Robot control") | |
| People | * [Yoshua Bengio](/wiki/Yoshua_Bengio "Yoshua Bengio") * [Alex Graves](/wiki/Alex_Graves_(computer_scientist) "Alex Graves (computer scientist)") * [Ian Goodfellow](/wiki/Ian_Goodfellow "Ian Goodfellow") * [Stephen Grossberg](/wiki/Stephen_Grossberg "Stephen Grossberg") * [Demis Hassabis](/wiki/Demis_Hassabis "Demis Hassabis") * [Geoffrey Hinton](/wiki/Geoffrey_Hinton "Geoffrey Hinton") * [Yann LeCun](/wiki/Yann_LeCun "Yann LeCun") * [Fei\\-Fei Li](/wiki/Fei-Fei_Li "Fei-Fei Li") * [Andrew Ng](/wiki/Andrew_Ng "Andrew Ng") * [Jürgen Schmidhuber](/wiki/J%C3%BCrgen_Schmidhuber "Jürgen Schmidhuber") * [David Silver](/wiki/David_Silver_(computer_scientist) "David Silver (computer scientist)") * [Ilya Sutskever](/wiki/Ilya_Sutskever "Ilya Sutskever") |
| Organizations | * [Anthropic](/wiki/Anthropic "Anthropic") * [EleutherAI](/wiki/EleutherAI "EleutherAI") * [Google DeepMind](/wiki/Google_DeepMind "Google DeepMind") * Hugging Face * [OpenAI](/wiki/OpenAI "OpenAI") * [Meta AI](/wiki/Meta_AI "Meta AI") * [Mila](/wiki/Mila_(research_institute) "Mila (research institute)") * [MIT CSAIL](/wiki/MIT_Computer_Science_and_Artificial_Intelligence_Laboratory "MIT Computer Science and Artificial Intelligence Laboratory") * [Huawei](/wiki/Huawei "Huawei") |
| Architectures | * [Neural Turing machine](/wiki/Neural_Turing_machine "Neural Turing machine") * [Differentiable neural computer](/wiki/Differentiable_neural_computer "Differentiable neural computer") * [Transformer](/wiki/Transformer_(machine_learning_model) "Transformer (machine learning model)") * [Recurrent neural network (RNN)](/wiki/Recurrent_neural_network "Recurrent neural network") * [Long short\\-term memory (LSTM)](/wiki/Long_short-term_memory "Long short-term memory") * [Gated recurrent unit (GRU)](/wiki/Gated_recurrent_unit "Gated recurrent unit") * [Echo state network](/wiki/Echo_state_network "Echo state network") * [Multilayer perceptron (MLP)](/wiki/Multilayer_perceptron "Multilayer perceptron") * [Convolutional neural network](/wiki/Convolutional_neural_network "Convolutional neural network") * [Residual neural network](/wiki/Residual_neural_network "Residual neural network") * [Mamba](/wiki/Mamba_(deep_learning) "Mamba (deep learning)") * [Autoencoder](/wiki/Autoencoder "Autoencoder") * [Variational autoencoder (VAE)](/wiki/Variational_autoencoder "Variational autoencoder") * [Generative adversarial network (GAN)](/wiki/Generative_adversarial_network "Generative adversarial network") * [Graph neural network](/wiki/Graph_neural_network "Graph neural network") |
| * Portals 	+ [Computer programming](/wiki/Portal:Computer_programming "Portal:Computer programming") 	+ [Technology](/wiki/Portal:Technology "Portal:Technology") * Categories 	+ [Artificial neural networks](/wiki/Category:Artificial_neural_networks "Category:Artificial neural networks") 	+ [Machine learning](/wiki/Category:Machine_learning "Category:Machine learning") | |

[Portal](/wiki/Wikipedia:Contents/Portals "Wikipedia:Contents/Portals"):* ![](//upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Industry5.svg/19px-Industry5.svg.png) [Companies](/wiki/Portal:Companies "Portal:Companies")

![](https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1)
Retrieved from "[https://en.wikipedia.org/w/index.php?title\\=Hugging\\_Face\\&oldid\\=1238858455](https://en.wikipedia.org/w/index.php?title=Hugging_Face&oldid=1238858455)"
[Categories](/wiki/Help:Category "Help:Category"): * [Machine learning](/wiki/Category:Machine_learning "Category:Machine learning")
* [Open\\-source artificial intelligence](/wiki/Category:Open-source_artificial_intelligence "Category:Open-source artificial intelligence")
* [Privately held companies based in New York City](/wiki/Category:Privately_held_companies_based_in_New_York_City "Category:Privately held companies based in New York City")
* [American companies established in 2016](/wiki/Category:American_companies_established_in_2016 "Category:American companies established in 2016")
* [2016 establishments in New York City](/wiki/Category:2016_establishments_in_New_York_City "Category:2016 establishments in New York City")
Hidden categories: * [Articles with short description](/wiki/Category:Articles_with_short_description "Category:Articles with short description")
* [Short description is different from Wikidata](/wiki/Category:Short_description_is_different_from_Wikidata "Category:Short description is different from Wikidata")
* [Articles lacking reliable references from February 2023](/wiki/Category:Articles_lacking_reliable_references_from_February_2023 "Category:Articles lacking reliable references from February 2023")
* [All articles lacking reliable references](/wiki/Category:All_articles_lacking_reliable_references "Category:All articles lacking reliable references")

* This page was last edited on 6 August 2024, at 01:57 (UTC).
* Text is available under the [Creative Commons Attribution\\-ShareAlike License 4\\.0](//en.wikipedia.org/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License);
additional terms may apply. By using this site, you agree to the [Terms of Use](//foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use) and [Privacy Policy](//foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy). Wikipedia® is a registered trademark of the [Wikimedia Foundation, Inc.](//wikimediafoundation.org/), a non\\-profit organization.

* [Privacy policy](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy)
* [About Wikipedia](/wiki/Wikipedia:About)
* [Disclaimers](/wiki/Wikipedia:General_disclaimer)
* [Contact Wikipedia](//en.wikipedia.org/wiki/Wikipedia:Contact_us)
* [Code of Conduct](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct)
* [Developers](https://developer.wikimedia.org)
* [Statistics](https://stats.wikimedia.org/#/en.wikipedia.org)
* [Cookie statement](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement)
* [Mobile view](//en.m.wikipedia.org/w/index.php?title=Hugging_Face&mobileaction=toggle_view_mobile)

* [![Wikimedia Foundation](/static/images/footer/wikimedia-button.svg)](https://wikimediafoundation.org/)
* [![Powered by MediaWiki](/w/resources/assets/poweredby_mediawiki.svg)](https://www.mediawiki.org/)

*
`,Ue,R,Ie,x,li="Now that we have all the tools <code>search</code> and <code>visit_webpage</code>, we can use them to create the web agent.",Ae,E,ri="Which configuration to choose for this agent?",ve,P,ci="<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>ReactJsonAgent</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_iterations</code> to 10.</li>",je,Z,Se,N,gi="We then wrap this agent into a <code>ManagedAgent</code> that will make it callable by its manager agent.",Fe,D,He,$,wi="Finally we create a manager agent, and upon initialization we pass our managed agent to it in its <code>managed_agents</code> argument.",Be,V,pi="Since this agent is the one tasked with the planning and thinking, advanced reasoning will be beneficial, so a <code>ReactCodeAgent</code> will be the best choice.",We,Q,di="Also, we want to ask a question that involves the current year: so let us add <code>additional_authorized_imports=[&quot;time&quot;, &quot;datetime&quot;]</code>",Ge,q,Le,Y,ui="That’s all! Now let’s run our system! We select a question that requires some calculation and",Re,z,xe,X,hi="Our agents managed to efficiently collaborate towards solving the task! ✅",Ee,O,mi="💡 You can easily extend this to more agents: one does the code execution, one the web search, one handles file loadings…",Pe,K,Mi="🤔💭 One could even think of doing more complex, tree-like hierarchies, with one CEO agent handling multiple middle managers, each with several reports.",Ze,ee,yi="We could even add more intermediate layers of management, each with multiple daily meetings, lots of agile stuff with scrum masters, and each new component adds enough friction to ensure the tasks never get done… Ehm wait, no, let’s stick with our simple structure.",Ne,ie,De,ne,$e;return M=new Ai({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/multiagent_web_assistant.ipynb"}]}}),y=new Ve({props:{title:"Have several agents collaborate in a multi-agent hierarchy 🤖🤝🤖",local:"have-several-agents-collaborate-in-a-multi-agent-hierarchy-",headingTag:"h1"}}),_=new m({props:{code:"JTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTJCLS0tLS0tLS0tLS0tLS0tLSUyQiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyME1hbmFnZXIlMjBhZ2VudCUyMCUyMCU3QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyQi0tLS0tLS0tLS0tLS0tLS0lMkIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlN0MlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBfX19fX19fX19fX19fX18lN0NfX19fX19fX19fX19fXyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUwQSUyMCUyMENvZGUlMjBpbnRlcnByZXRlciUyMCUyMCUyMCUyQi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tJTJCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwdG9vbCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyME1hbmFnZWQlMjBhZ2VudCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyQi0tLS0tLS0tLS0tLS0tLS0tLSUyQiUyMCUyMCUyMCUyMCUyMCUyMCU3QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMFdlYiUyMFNlYXJjaCUyMGFnZW50JTIwJTdDJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTIwJTIwJTIwJTIwJTIwJTIwJTJCLS0tLS0tLS0tLS0tLS0tLS0tJTJCJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTIwJTIwV2ViJTIwU2VhcmNoJTIwdG9vbCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU3QyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFZpc2l0JTIwd2VicGFnZSUyMHRvb2wlMjAlN0MlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMkItLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSUyQg==",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">         Managed agent          </span>|
                     |<span class="hljs-string">      +------------------+      </span>|
                     |<span class="hljs-string">      </span>|<span class="hljs-string"> Web Search agent </span>|<span class="hljs-string">      </span>|
                     |<span class="hljs-string">      +------------------+      </span>|
                     |<span class="hljs-string">         </span>|<span class="hljs-string">            </span>|<span class="hljs-string">         </span>|
                     |<span class="hljs-string">  Web Search tool     </span>|<span class="hljs-string">         </span>|
                     |<span class="hljs-string">             Visit webpage tool </span>|
                     +--------------------------------+`,wrap:!1}}),I=new m({props:{code:"IXBpcCUyMGluc3RhbGwlMjBtYXJrZG93bmlmeSUyMGR1Y2tkdWNrZ28tc2VhcmNoJTIwJTIyZ2l0JTJCaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGaHVnZ2luZ2ZhY2UlMkZ0cmFuc2Zvcm1lcnMuZ2l0JTIzZWdnJTNEdHJhbnNmb3JtZXJzJTVCYWdlbnRzJTVEJTIyJTIwcHl0aG9uLWRvdGVudg==",highlighted:'!pip install markdownify duckduckgo-search <span class="hljs-string">&quot;git+https://github.com/huggingface/transformers.git#egg=transformers[agents]&quot;</span> python-dotenv',wrap:!1}}),A=new m({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGxvZ2luJTBBZnJvbSUyMGRvdGVudiUyMGltcG9ydCUyMGxvYWRfZG90ZW52JTBBaW1wb3J0JTIwb3MlMEElMEFsb2FkX2RvdGVudigpJTBBJTBBbG9naW4ob3MuZ2V0ZW52KCUyMkhVR0dJTkdGQUNFSFVCX0FQSV9UT0tFTiUyMikpJTBBJTBBbW9kZWwlMjAlM0QlMjAlMjJtZXRhLWxsYW1hJTJGTWV0YS1MbGFtYS0zLjEtNzBCLUluc3RydWN0JTIy",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> login
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> dotenv <span class="hljs-keyword">import</span> load_dotenv
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> os

<span class="hljs-meta">&gt;&gt;&gt; </span>load_dotenv()

<span class="hljs-meta">&gt;&gt;&gt; </span>login(os.getenv(<span class="hljs-string">&quot;HUGGINGFACEHUB_API_TOKEN&quot;</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>model = <span class="hljs-string">&quot;meta-llama/Meta-Llama-3.1-70B-Instruct&quot;</span>`,wrap:!1}}),j=new Ve({props:{title:"🔍 Create a web search tool",local:"-create-a-web-search-tool",headingTag:"h3"}}),B=new m({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRvb2wlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBtYXJrZG93bmlmeSUyMGltcG9ydCUyMG1hcmtkb3duaWZ5JTIwYXMlMjBtZCUwQWZyb20lMjByZXF1ZXN0cy5leGNlcHRpb25zJTIwaW1wb3J0JTIwUmVxdWVzdEV4Y2VwdGlvbiUwQWltcG9ydCUyMHJlJTBBJTBBJTBBY2xhc3MlMjBWaXNpdFdlYnBhZ2VUb29sKFRvb2wpJTNBJTBBJTIwJTIwJTIwJTIwbmFtZSUyMCUzRCUyMCUyMnZpc2l0X3dlYnBhZ2UlMjIlMEElMjAlMjAlMjAlMjBkZXNjcmlwdGlvbiUyMCUzRCUyMCUyMlZpc2l0cyUyMGElMjB3ZWJwYWdlJTIwYXQlMjB0aGUlMjBnaXZlbiUyMHVybCUyMGFuZCUyMHJldHVybnMlMjBpdHMlMjBjb250ZW50JTIwYXMlMjBhJTIwbWFya2Rvd24lMjBzdHJpbmcuJTIyJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTIwJTNEJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydXJsJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydHlwZSUyMiUzQSUyMCUyMnRleHQlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJkZXNjcmlwdGlvbiUyMiUzQSUyMCUyMlRoZSUyMHVybCUyMG9mJTIwdGhlJTIwd2VicGFnZSUyMHRvJTIwdmlzaXQuJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwb3V0cHV0X3R5cGUlMjAlM0QlMjAlMjJ0ZXh0JTIyJTBBJTBBJTIwJTIwJTIwJTIwZGVmJTIwZm9yd2FyZChzZWxmJTJDJTIwdXJsJTNBJTIwc3RyKSUyMC0lM0UlMjBzdHIlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB0cnklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBTZW5kJTIwYSUyMEdFVCUyMHJlcXVlc3QlMjB0byUyMHRoZSUyMFVSTCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJlc3BvbnNlJTIwJTNEJTIwcmVxdWVzdHMuZ2V0KHVybCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXNwb25zZS5yYWlzZV9mb3Jfc3RhdHVzKCklMjAlMjAlMjMlMjBSYWlzZSUyMGFuJTIwZXhjZXB0aW9uJTIwZm9yJTIwYmFkJTIwc3RhdHVzJTIwY29kZXMlMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBDb252ZXJ0JTIwdGhlJTIwSFRNTCUyMGNvbnRlbnQlMjB0byUyME1hcmtkb3duJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbWFya2Rvd25fY29udGVudCUyMCUzRCUyMG1kKHJlc3BvbnNlLnRleHQpLnN0cmlwKCklMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBSZW1vdmUlMjBtdWx0aXBsZSUyMGxpbmUlMjBicmVha3MlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtYXJrZG93bl9jb250ZW50JTIwJTNEJTIwcmUuc3ViKHIlMjIlNUNuJTdCMyUyQyU3RCUyMiUyQyUyMCUyMiU1Q24lNUNuJTIyJTJDJTIwbWFya2Rvd25fY29udGVudCklMEElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBtYXJrZG93bl9jb250ZW50JTBBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZXhjZXB0JTIwUmVxdWVzdEV4Y2VwdGlvbiUyMGFzJTIwZSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMGYlMjJFcnJvciUyMGZldGNoaW5nJTIwdGhlJTIwd2VicGFnZSUzQSUyMCU3QnN0cihlKSU3RCUyMiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGV4Y2VwdCUyMEV4Y2VwdGlvbiUyMGFzJTIwZSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMGYlMjJBbiUyMHVuZXhwZWN0ZWQlMjBlcnJvciUyMG9jY3VycmVkJTNBJTIwJTdCc3RyKGUpJTdEJTIy",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Tool
<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">as</span> md
<span class="hljs-keyword">from</span> requests.exceptions <span class="hljs-keyword">import</span> RequestException
<span class="hljs-keyword">import</span> re


<span class="hljs-keyword">class</span> <span class="hljs-title class_">VisitWebpageTool</span>(<span class="hljs-title class_ inherited__">Tool</span>):
    name = <span class="hljs-string">&quot;visit_webpage&quot;</span>
    description = <span class="hljs-string">&quot;Visits a webpage at the given url and returns its content as a markdown string.&quot;</span>
    inputs = {
        <span class="hljs-string">&quot;url&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;text&quot;</span>,
            <span class="hljs-string">&quot;description&quot;</span>: <span class="hljs-string">&quot;The url of the webpage to visit.&quot;</span>,
        }
    }
    output_type = <span class="hljs-string">&quot;text&quot;</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, url: <span class="hljs-built_in">str</span></span>) -&gt; <span class="hljs-built_in">str</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 = md(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}}),G=new m({props:{code:"dmlzaXRfcGFnZV90b29sJTIwJTNEJTIwVmlzaXRXZWJwYWdlVG9vbCgpJTBBJTBBcHJpbnQodmlzaXRfcGFnZV90b29sKCUyMmh0dHBzJTNBJTJGJTJGZW4ud2lraXBlZGlhLm9yZyUyRndpa2klMkZIdWdnaW5nX0ZhY2UlMjIpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>visit_page_tool = VisitWebpageTool()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(visit_page_tool(<span class="hljs-string">&quot;https://en.wikipedia.org/wiki/Hugging_Face&quot;</span>))`,wrap:!1}}),R=new Ve({props:{title:"Build our multi-agent system 🤖🤝🤖",local:"build-our-multi-agent-system-",headingTag:"h2"}}),Z=new m({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5hZ2VudHMlMjBpbXBvcnQlMjAoJTBBJTIwJTIwJTIwJTIwUmVhY3RDb2RlQWdlbnQlMkMlMEElMjAlMjAlMjAlMjBSZWFjdEpzb25BZ2VudCUyQyUwQSUyMCUyMCUyMCUyMEhmQXBpRW5naW5lJTJDJTBBJTIwJTIwJTIwJTIwTWFuYWdlZEFnZW50JTJDJTBBKSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMuYWdlbnRzLnNlYXJjaCUyMGltcG9ydCUyMER1Y2tEdWNrR29TZWFyY2hUb29sJTBBJTBBbGxtX2VuZ2luZSUyMCUzRCUyMEhmQXBpRW5naW5lKG1vZGVsKSUwQSUwQXdlYl9hZ2VudCUyMCUzRCUyMFJlYWN0SnNvbkFnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCRHVja0R1Y2tHb1NlYXJjaFRvb2woKSUyQyUyMFZpc2l0V2VicGFnZVRvb2woKSU1RCUyQyUwQSUyMCUyMCUyMCUyMGxsbV9lbmdpbmUlM0RsbG1fZW5naW5lJTJDJTBBJTIwJTIwJTIwJTIwbWF4X2l0ZXJhdGlvbnMlM0QxMCUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> transformers.agents <span class="hljs-keyword">import</span> (
    ReactCodeAgent,
    ReactJsonAgent,
    HfApiEngine,
    ManagedAgent,
)
<span class="hljs-keyword">from</span> transformers.agents.search <span class="hljs-keyword">import</span> DuckDuckGoSearchTool

llm_engine = HfApiEngine(model)

web_agent = ReactJsonAgent(
    tools=[DuckDuckGoSearchTool(), VisitWebpageTool()],
    llm_engine=llm_engine,
    max_iterations=<span class="hljs-number">10</span>,
)`,wrap:!1}}),D=new m({props:{code:"bWFuYWdlZF93ZWJfYWdlbnQlMjAlM0QlMjBNYW5hZ2VkQWdlbnQoJTBBJTIwJTIwJTIwJTIwYWdlbnQlM0R3ZWJfYWdlbnQlMkMlMEElMjAlMjAlMjAlMjBuYW1lJTNEJTIyc2VhcmNoX2FnZW50JTIyJTJDJTBBJTIwJTIwJTIwJTIwZGVzY3JpcHRpb24lM0QlMjJSdW5zJTIwd2ViJTIwc2VhcmNoZXMlMjBmb3IlMjB5b3UuJTIwR2l2ZSUyMGl0JTIweW91ciUyMHF1ZXJ5JTIwYXMlMjBhbiUyMGFyZ3VtZW50LiUyMiUyQyUwQSk=",highlighted:`managed_web_agent = ManagedAgent(
    agent=web_agent,
    name=<span class="hljs-string">&quot;search_agent&quot;</span>,
    description=<span class="hljs-string">&quot;Runs web searches for you. Give it your query as an argument.&quot;</span>,
)`,wrap:!1}}),q=new m({props:{code:"bWFuYWdlcl9hZ2VudCUyMCUzRCUyMFJlYWN0Q29kZUFnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCJTVEJTJDJTBBJTIwJTIwJTIwJTIwbGxtX2VuZ2luZSUzRGxsbV9lbmdpbmUlMkMlMEElMjAlMjAlMjAlMjBtYW5hZ2VkX2FnZW50cyUzRCU1Qm1hbmFnZWRfd2ViX2FnZW50JTVEJTJDJTBBJTIwJTIwJTIwJTIwYWRkaXRpb25hbF9hdXRob3JpemVkX2ltcG9ydHMlM0QlNUIlMjJ0aW1lJTIyJTJDJTIwJTIyZGF0ZXRpbWUlMjIlNUQlMkMlMEEp",highlighted:`manager_agent = ReactCodeAgent(
    tools=[],
    llm_engine=llm_engine,
    managed_agents=[managed_web_agent],
    additional_authorized_imports=[<span class="hljs-string">&quot;time&quot;</span>, <span class="hljs-string">&quot;datetime&quot;</span>],
)`,wrap:!1}}),z=new m({props:{code:"bWFuYWdlcl9hZ2VudC5ydW4oJTIySG93JTIwbWFueSUyMHllYXJzJTIwYWdvJTIwd2FzJTIwU3RyaXBlJTIwZm91bmRlZCUzRiUyMik=",highlighted:'manager_agent.run(<span class="hljs-string">&quot;How many years ago was Stripe founded?&quot;</span>)',wrap:!1}}),ie=new vi({props:{source:"https://github.com/huggingface/cookbook/blob/main/notebooks/en/multiagent_web_assistant.md"}}),{c(){h=s("meta"),ae=a(),te=s("p"),oe=a(),c(M.$$.fragment),se=a(),c(y.$$.fragment),le=a(),k=s("p"),k.innerHTML=qe,re=a(),T=s("blockquote"),T.innerHTML=Ye,ce=a(),f=s("p"),f.innerHTML=ze,ge=a(),C=s("p"),C.innerHTML=Xe,we=a(),c(_.$$.fragment),pe=a(),b=s("p"),b.textContent=Oe,de=a(),J=s("p"),J.innerHTML=Ke,ue=a(),U=s("p"),U.textContent=ei,he=a(),c(I.$$.fragment),me=a(),c(A.$$.fragment),Me=a(),v=s("pre"),v.textContent=ii,ye=a(),c(j.$$.fragment),ke=a(),S=s("p"),S.innerHTML=ti,Te=a(),F=s("p"),F.innerHTML=ni,fe=a(),H=s("p"),H.innerHTML=ai,Ce=a(),c(B.$$.fragment),_e=a(),W=s("p"),W.textContent=oi,be=a(),c(G.$$.fragment),Je=a(),L=s("pre"),L.textContent=si,Ue=a(),c(R.$$.fragment),Ie=a(),x=s("p"),x.innerHTML=li,Ae=a(),E=s("p"),E.textContent=ri,ve=a(),P=s("ul"),P.innerHTML=ci,je=a(),c(Z.$$.fragment),Se=a(),N=s("p"),N.innerHTML=gi,Fe=a(),c(D.$$.fragment),He=a(),$=s("p"),$.innerHTML=wi,Be=a(),V=s("p"),V.innerHTML=pi,We=a(),Q=s("p"),Q.innerHTML=di,Ge=a(),c(q.$$.fragment),Le=a(),Y=s("p"),Y.textContent=ui,Re=a(),c(z.$$.fragment),xe=a(),X=s("p"),X.textContent=hi,Ee=a(),O=s("p"),O.textContent=mi,Pe=a(),K=s("p"),K.textContent=Mi,Ze=a(),ee=s("p"),ee.textContent=yi,Ne=a(),c(ie.$$.fragment),De=a(),ne=s("p"),this.h()},l(e){const i=Ui("svelte-u9bgzb",document.head);h=l(i,"META",{name:!0,content:!0}),i.forEach(t),ae=o(e),te=l(e,"P",{}),ki(te).forEach(t),oe=o(e),g(M.$$.fragment,e),se=o(e),g(y.$$.fragment,e),le=o(e),k=l(e,"P",{"data-svelte-h":!0}),r(k)!=="svelte-1xlqnsv"&&(k.innerHTML=qe),re=o(e),T=l(e,"BLOCKQUOTE",{"data-svelte-h":!0}),r(T)!=="svelte-uy67xy"&&(T.innerHTML=Ye),ce=o(e),f=l(e,"P",{"data-svelte-h":!0}),r(f)!=="svelte-45abwn"&&(f.innerHTML=ze),ge=o(e),C=l(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-1se9mth"&&(C.innerHTML=Xe),we=o(e),g(_.$$.fragment,e),pe=o(e),b=l(e,"P",{"data-svelte-h":!0}),r(b)!=="svelte-1occiln"&&(b.textContent=Oe),de=o(e),J=l(e,"P",{"data-svelte-h":!0}),r(J)!=="svelte-uvprla"&&(J.innerHTML=Ke),ue=o(e),U=l(e,"P",{"data-svelte-h":!0}),r(U)!=="svelte-ofrdjq"&&(U.textContent=ei),he=o(e),g(I.$$.fragment,e),me=o(e),g(A.$$.fragment,e),Me=o(e),v=l(e,"PRE",{"data-svelte-h":!0}),r(v)!=="svelte-13lw4nh"&&(v.textContent=ii),ye=o(e),g(j.$$.fragment,e),ke=o(e),S=l(e,"P",{"data-svelte-h":!0}),r(S)!=="svelte-1ya2chk"&&(S.innerHTML=ti),Te=o(e),F=l(e,"P",{"data-svelte-h":!0}),r(F)!=="svelte-n7spa8"&&(F.innerHTML=ni),fe=o(e),H=l(e,"P",{"data-svelte-h":!0}),r(H)!=="svelte-1ms2uj2"&&(H.innerHTML=ai),Ce=o(e),g(B.$$.fragment,e),_e=o(e),W=l(e,"P",{"data-svelte-h":!0}),r(W)!=="svelte-hbvg5t"&&(W.textContent=oi),be=o(e),g(G.$$.fragment,e),Je=o(e),L=l(e,"PRE",{"data-svelte-h":!0}),r(L)!=="svelte-8fvg7e"&&(L.textContent=si),Ue=o(e),g(R.$$.fragment,e),Ie=o(e),x=l(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-5768lo"&&(x.innerHTML=li),Ae=o(e),E=l(e,"P",{"data-svelte-h":!0}),r(E)!=="svelte-noa5rw"&&(E.textContent=ri),ve=o(e),P=l(e,"UL",{"data-svelte-h":!0}),r(P)!=="svelte-4uouvt"&&(P.innerHTML=ci),je=o(e),g(Z.$$.fragment,e),Se=o(e),N=l(e,"P",{"data-svelte-h":!0}),r(N)!=="svelte-1by3x3d"&&(N.innerHTML=gi),Fe=o(e),g(D.$$.fragment,e),He=o(e),$=l(e,"P",{"data-svelte-h":!0}),r($)!=="svelte-12kldg5"&&($.innerHTML=wi),Be=o(e),V=l(e,"P",{"data-svelte-h":!0}),r(V)!=="svelte-julrcm"&&(V.innerHTML=pi),We=o(e),Q=l(e,"P",{"data-svelte-h":!0}),r(Q)!=="svelte-hvhtn0"&&(Q.innerHTML=di),Ge=o(e),g(q.$$.fragment,e),Le=o(e),Y=l(e,"P",{"data-svelte-h":!0}),r(Y)!=="svelte-1gu46sl"&&(Y.textContent=ui),Re=o(e),g(z.$$.fragment,e),xe=o(e),X=l(e,"P",{"data-svelte-h":!0}),r(X)!=="svelte-ollz3q"&&(X.textContent=hi),Ee=o(e),O=l(e,"P",{"data-svelte-h":!0}),r(O)!=="svelte-1v517hq"&&(O.textContent=mi),Pe=o(e),K=l(e,"P",{"data-svelte-h":!0}),r(K)!=="svelte-58qi1z"&&(K.textContent=Mi),Ze=o(e),ee=l(e,"P",{"data-svelte-h":!0}),r(ee)!=="svelte-9myor3"&&(ee.textContent=yi),Ne=o(e),g(ie.$$.fragment,e),De=o(e),ne=l(e,"P",{}),ki(ne).forEach(t),this.h()},h(){Ti(h,"name","hf:doc:metadata"),Ti(h,"content",Si)},m(e,i){Ii(document.head,h),n(e,ae,i),n(e,te,i),n(e,oe,i),w(M,e,i),n(e,se,i),w(y,e,i),n(e,le,i),n(e,k,i),n(e,re,i),n(e,T,i),n(e,ce,i),n(e,f,i),n(e,ge,i),n(e,C,i),n(e,we,i),w(_,e,i),n(e,pe,i),n(e,b,i),n(e,de,i),n(e,J,i),n(e,ue,i),n(e,U,i),n(e,he,i),w(I,e,i),n(e,me,i),w(A,e,i),n(e,Me,i),n(e,v,i),n(e,ye,i),w(j,e,i),n(e,ke,i),n(e,S,i),n(e,Te,i),n(e,F,i),n(e,fe,i),n(e,H,i),n(e,Ce,i),w(B,e,i),n(e,_e,i),n(e,W,i),n(e,be,i),w(G,e,i),n(e,Je,i),n(e,L,i),n(e,Ue,i),w(R,e,i),n(e,Ie,i),n(e,x,i),n(e,Ae,i),n(e,E,i),n(e,ve,i),n(e,P,i),n(e,je,i),w(Z,e,i),n(e,Se,i),n(e,N,i),n(e,Fe,i),w(D,e,i),n(e,He,i),n(e,$,i),n(e,Be,i),n(e,V,i),n(e,We,i),n(e,Q,i),n(e,Ge,i),w(q,e,i),n(e,Le,i),n(e,Y,i),n(e,Re,i),w(z,e,i),n(e,xe,i),n(e,X,i),n(e,Ee,i),n(e,O,i),n(e,Pe,i),n(e,K,i),n(e,Ze,i),n(e,ee,i),n(e,Ne,i),w(ie,e,i),n(e,De,i),n(e,ne,i),$e=!0},p:Ci,i(e){$e||(p(M.$$.fragment,e),p(y.$$.fragment,e),p(_.$$.fragment,e),p(I.$$.fragment,e),p(A.$$.fragment,e),p(j.$$.fragment,e),p(B.$$.fragment,e),p(G.$$.fragment,e),p(R.$$.fragment,e),p(Z.$$.fragment,e),p(D.$$.fragment,e),p(q.$$.fragment,e),p(z.$$.fragment,e),p(ie.$$.fragment,e),$e=!0)},o(e){d(M.$$.fragment,e),d(y.$$.fragment,e),d(_.$$.fragment,e),d(I.$$.fragment,e),d(A.$$.fragment,e),d(j.$$.fragment,e),d(B.$$.fragment,e),d(G.$$.fragment,e),d(R.$$.fragment,e),d(Z.$$.fragment,e),d(D.$$.fragment,e),d(q.$$.fragment,e),d(z.$$.fragment,e),d(ie.$$.fragment,e),$e=!1},d(e){e&&(t(ae),t(te),t(oe),t(se),t(le),t(k),t(re),t(T),t(ce),t(f),t(ge),t(C),t(we),t(pe),t(b),t(de),t(J),t(ue),t(U),t(he),t(me),t(Me),t(v),t(ye),t(ke),t(S),t(Te),t(F),t(fe),t(H),t(Ce),t(_e),t(W),t(be),t(Je),t(L),t(Ue),t(Ie),t(x),t(Ae),t(E),t(ve),t(P),t(je),t(Se),t(N),t(Fe),t(He),t($),t(Be),t(V),t(We),t(Q),t(Ge),t(Le),t(Y),t(Re),t(xe),t(X),t(Ee),t(O),t(Pe),t(K),t(Ze),t(ee),t(Ne),t(De),t(ne)),t(h),u(M,e),u(y,e),u(_,e),u(I,e),u(A,e),u(j,e),u(B,e),u(G,e),u(R,e),u(Z,e),u(D,e),u(q,e),u(z,e),u(ie,e)}}}const Si='{"title":"Have several agents collaborate in a multi-agent hierarchy 🤖🤝🤖","local":"have-several-agents-collaborate-in-a-multi-agent-hierarchy-","sections":[{"title":"🔍 Create a web search tool","local":"-create-a-web-search-tool","sections":[],"depth":3},{"title":"Build our multi-agent system 🤖🤝🤖","local":"build-our-multi-agent-system-","sections":[],"depth":2}],"depth":1}';function Fi(Qe){return _i(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Li extends bi{constructor(h){super(),Ji(this,h,Fi,ji,fi,{})}}export{Li as component};
