Hugging Face Introduces Smolagents Library to Build AI Agents With Open-Source LLMs

Hugging Face’s smolagents come with pre-written logic with roughly 1,000 lines of code.

Advertisement
Written by Akash Dutta, Edited by Siddharth Suvarna | Updated: 3 January 2025 15:51 IST
Highlights
  • Smolagents can be used to make simple agents
  • These simple agents write actions in code instead of writing code
  • Developers can share tools built for these AI agents on Hugging Face

To build an AI agent with smolagents, developers can either use open LLMs or pick select cloud LLMs

Photo Credit: Hugging Face

Hugging Face introduced a new code library last week to enable developers to easily build artificial intelligence (AI) agents. Dubbed smolagents, the tool defines the basic logic for general purpose simple AI agents that can perform actions by executing them in code. Smolagent can be connected with any open-source large language model (LLM) or a select number of cloud-based LLMs. Developers can also build tools to connect the external output part of the agent. These tools can also be shared on the platform to let other developers access and use them.

Hugging Face Introduces Smolagents Library for AI Agents

In a blog post, the AI and machine learning (ML) platform announced the new tool that is aimed at making it easier for developers to use agentic capabilities. The library comes with roughly 1,000 lines of code that dictate the basic functionality of an AI agent. Developers can attach it with an LLM and any tools to collect external data or execute an action. By just focusing on these two elements, the platform claims that developers will find it easier to make new agents and use them in their projects and applications.

Smolagents is built with simple agents in mind. This means they can perform any task, but likely will not be a great fit for multi-step or multi-agent functions. Hugging Face stated that it can write actions in code (as in execute actions) but it cannot be used to write said code. The platform also allows developers to execute the AI agent in sandboxed environments via E2B to test reliability and tweak the output.

Advertisement

The agent library also supports standard ToolCallingAgent which writes actions in JSON or text blobs. Additionally, once a developer builds a tool for the agent, they can also share it with the community. Users can pick any open model hosted on the platform via a free inference application programming interface (API) or pick from a list of more than 100 different cloud-based models.

Advertisement

Coming to the tool, Hugging Face recommends making a function with type hints on inputs and outputs as well as descriptions for inputs. Highlighting a use case, the platform showcased code for an AI agent that can get travel times from Google Maps and plan travel itineraries for users.

 

For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.

Advertisement

Related Stories

Popular Mobile Brands
  1. iQOO 15 Confirmed to Launch in India on This Date
  2. iPhone 17 Review
  3. Battlefield 6's Free-to-Play Battle Royale Mode Launches October 28
  4. Oppo Find X9 Series Launching Today: All You Need to Know
  5. Moto X70 Air Launch Teased for India: Price, Specifications Expected
  6. You Can Now Use Claude Chatbot Within Microsoft Excel
  7. Apple's iPhone 20 to Feature Solid-State Buttons in 2027, Tipster Claims
  8. Vivo X300 Series May Launch in India With Zeiss Telephoto Extender Kits
  9. Wobble Will Launch Its First Smartphone in India on This Date
  1. Anthropic Releases Microsoft Excel Support in Claude, Adds New Agentic Skills for Financial Tasks
  2. OpenAI Explains How It Assesses Mental Health Concerns of ChatGPT Users, Sparks Backlash
  3. Redmi Turbo 5 Tipped to Launch With 7,500mAh Battery, 6.5-Inch 1.5K LTPS Display
  4. Oppo Find X9 Series India Launch Teased Hours Ahead of Global Debut; Exchange Offers, Other Benefits Revealed
  5. iQOO Neo 11 Confirmed to Launch With Snapdragon 8 Elite SoC, 8K VC Cooling Solution
  6. Wobble Announces Launch Date for First Smartphone in India: Expected Specifications, Features
  7. Lava Teases Upcoming Smartphone Launch in India; Lava Agni 4 Likely to Make Its Debut Soon
  8. Apple's iPhone 20 to Feature All Solid-State Haptic Buttons in 2027, Tipster Claims
  9. Samsung Galaxy Z Fold 8 Said to Feature Larger Battery, Reintroduce S-Pen Support
  10. Battlefield Redsec, Battlefield 6's Free-to-Play Battle Royale Mode, Arrives October 28
Gadgets 360 is available in
Download Our Apps
Available in Hindi
© Copyright Red Pixels Ventures Limited 2025. All rights reserved.