Close Menu
Versa AI hub
  • AI Ethics
  • AI Legislation
  • Business
  • Cybersecurity
  • Media and Entertainment
  • Content Creation
  • Art Generation
  • Research
  • Tools
  • Resources

Subscribe to Updates

Subscribe to our newsletter and stay updated with the latest news and exclusive offers.

What's Hot

Accelerating stable diffusion XL inference using JAX on cloud cloud TPU V5E

September 15, 2025

Meta amends AI chatbot policy amid child safety concerns

September 14, 2025

Accelerate over 130,000 hugged face models with the ONNX runtime

September 14, 2025
Facebook X (Twitter) Instagram
Versa AI hubVersa AI hub
Monday, September 15
Facebook X (Twitter) Instagram
Login
  • AI Ethics
  • AI Legislation
  • Business
  • Cybersecurity
  • Media and Entertainment
  • Content Creation
  • Art Generation
  • Research
  • Tools
  • Resources
Versa AI hub
Home»Research»Step-by-step guide to building an AI research assistant embracing a hugging face smorajan: Automate web search and article summary using LLM-driven autonomous agents
Research

Step-by-step guide to building an AI research assistant embracing a hugging face smorajan: Automate web search and article summary using LLM-driven autonomous agents

By March 4, 2025No Comments3 Mins Read
Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
Share
Facebook Twitter LinkedIn Pinterest Email

Hugging Face’s Smolagents framework provides a lightweight and efficient way to build AI agents that leverage tools such as web search and code execution. This tutorial shows you how to build an AI-driven research assistant that can search the web autonomously and use Smolagents to summarise articles. This implementation runs seamlessly, requires minimal setup and introduces the power of AI agents in automating real tasks such as research, abstraction, and information retrieval.

! Pip Install Smolagents BeautifulSoup4

First, install Smolagents BeautifulSoup4. This allows AI agents to use tools such as web search and code execution, as well as BeautifulSoup4, a Python library for parsing HTML and extracting text from web pages.

Import the OS from getPass GetPass# safely type getPass# and save api token os.environ(“huggingfacehub_api_token”) = getPass(“hugging face api token:”)

Now you can safely enter and save the hugging face api token as an environment variable. Use GetPass() to prompt users to enter a token without displaying it for security reasons. The token is stored in os.environ (“Huggingfacehub_api_token”) and allows authenticated access to hugging Face’s inference API to run AI models.

Smolagents Import Codeagent, Duckduckgosearchtool, Hfapimodel #hf_tokenDirect Model=hfapimodel() #duffedtool(duckduckgosearchtool() #(duckduckgosearchtool()) #define tools=(duckduckgosearchtool()) #define agent=codeagent=codeagent=model=model=model=model=(” “BS4”))

Next, initialize the AI-powered agent using the Smolagents framework. Set up hfapimodel() to load a hugging face API-based language model and automatically detect and authenticate stored API tokens. The agent is equipped with a duckduckgosearchtool() to perform web searches. CodeAgent() is also instantiated into tool access and approved imports such as BS4 for requests to create web requests and parsing HTML content.

#Example query to agent: query=”Summary the main points of Wikipedia article about hugging face(company)” #query result=agent.run(query)print(“\n”, results))

Finally, we’ll query the AI ​​agent and ask you to summarise the key points of the Wikipedia article about Hugging Face. The agent.run(query) command performs a web search on the agent, retrieves the relevant content, and generates an overview using the language model. Finally, the print() function displays the agent’s final answer and briefly summarises the requested topic.

Sample output

Following this tutorial, I successfully built an AI-driven research assistant using embracing face smoradients that allow me to autonomously search the web and summarize articles. This implementation highlights the power of AI agents in automating research tasks, making it easier to efficiently retrieve and process large amounts of information. Beyond web search and summaries, Smolagents can extend to a variety of real-world applications, including automated coding assistants, personal task managers, and AI-driven chatbots.

Here is the Colab notebook for the above project. Also, don’t forget to follow us on Twitter and join our Telegram Channel and LinkedIn groups. Don’t forget to join the 80k+ ml subreddit.

Committed read-lg lg ai Research releases Nexus: an advanced system that integrates agent AI systems and data compliance standards to address legal concerns in AI datasets

Asif Razzaq is CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, ASIF is committed to leveraging the possibilities of artificial intelligence for social benefits. His latest efforts are the launch of MarkTechPost, an artificial intelligence media platform. This is distinguished by its detailed coverage of machine learning and deep learning news, and is easy to understand by a technically sound and wide audience. The platform has over 2 million views each month, indicating its popularity among viewers.

Commended open source AI platform recommended: “Intelagent is an open source multi-agent framework for evaluating complex conversational AI systems” (promotion)

author avatar
See Full Bio
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleOregon House passes a bill to limit the title of “Nurse” to humans.
Next Article Construction of multimodal AI for Ray-Ban Metagrass

Related Posts

Research

New AI research clarifies the origins of Papua New Guineans

July 22, 2025
Research

AI helps prevent medical errors in real clinics

July 22, 2025
Research

No one is surprised, and a new study says that AI overview causes a significant drop in search clicks

July 22, 2025
Add A Comment

Comments are closed.

Top Posts

How Vancouver retailers leverage AI to stay competitive

November 22, 20246 Views

New You Studio will be opened in the competitive Southern Florida market for the production function, AI, and post -production service.

January 28, 20255 Views

Plans to ‘unleash AI’ across the UK revealed

January 12, 20255 Views
Stay In Touch
  • YouTube
  • TikTok
  • Twitter
  • Instagram
  • Threads
Latest Reviews

Subscribe to Updates

Subscribe to our newsletter and stay updated with the latest news and exclusive offers.

Most Popular

How Vancouver retailers leverage AI to stay competitive

November 22, 20246 Views

New You Studio will be opened in the competitive Southern Florida market for the production function, AI, and post -production service.

January 28, 20255 Views

Plans to ‘unleash AI’ across the UK revealed

January 12, 20255 Views
Don't Miss

Accelerating stable diffusion XL inference using JAX on cloud cloud TPU V5E

September 15, 2025

Meta amends AI chatbot policy amid child safety concerns

September 14, 2025

Accelerate over 130,000 hugged face models with the ONNX runtime

September 14, 2025
Service Area
X (Twitter) Instagram YouTube TikTok Threads RSS
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
© 2025 Versa AI Hub. All Rights Reserved.

Type above and press Enter to search. Press Esc to cancel.

Sign In or Register

Welcome Back!

Login to your account below.

Lost password?