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

Subscribe to Updates

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

What's Hot

Benchmarking large-scale language models for healthcare

June 8, 2025

Oracle plans to trade $400 billion Nvidia chips for AI facilities in Texas

June 8, 2025

Research papers provide a roadmap for AI advancements in Nigeria

June 7, 2025
Facebook X (Twitter) Instagram
Versa AI hubVersa AI hub
Monday, June 9
Facebook X (Twitter) Instagram
Login
  • AI Ethics
  • AI Legislation
  • Business
  • Cybersecurity
  • Media and Entertainment
  • Content Creation
  • Art Generation
  • Research
  • Tools
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

Research papers provide a roadmap for AI advancements in Nigeria

June 7, 2025
Research

Thinking that AI models will collapse in the face of complex problems, Apple researchers say

June 7, 2025
Research

JMU Education Professor was awarded for AI Research

June 3, 2025
Add A Comment
Leave A Reply Cancel Reply

Top Posts

Deepseek’s latest AI model is a “big step back” for free speech

May 31, 20255 Views

Doudna Supercomputer to Strengthen AI and Genomics Research

May 30, 20255 Views

From California to Kentucky: Tracking the rise of state AI laws in 2025 | White & Case LLP

May 29, 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

Deepseek’s latest AI model is a “big step back” for free speech

May 31, 20255 Views

Doudna Supercomputer to Strengthen AI and Genomics Research

May 30, 20255 Views

From California to Kentucky: Tracking the rise of state AI laws in 2025 | White & Case LLP

May 29, 20255 Views
Don't Miss

Benchmarking large-scale language models for healthcare

June 8, 2025

Oracle plans to trade $400 billion Nvidia chips for AI facilities in Texas

June 8, 2025

Research papers provide a roadmap for AI advancements in Nigeria

June 7, 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?