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.

Advertisement

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.

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.

 

Get your daily dose of tech news, reviews, and insights, in under 80 characters on Gadgets 360 Turbo. Connect with fellow tech lovers on our Forum. Follow us on X, Facebook, WhatsApp, Threads and Google News for instant updates. Catch all the action on our YouTube channel.

Advertisement

Related Stories

Popular Mobile Brands
  1. Here's How Much the Vivo S2 Could Cost in India: See Expected Features
  2. Honor X6e Launched With 7,500mAh Battery
  3. Redmi K100 Series Phone Visits Geekbench With This Flagship Snapdragon SoC
  4. Pixel 11 Pro Gets New 'Ask More of Your Phone' Teaser Ahead of Launch
  5. JBL Bar 1000MK2 Review: More Than Just an Audio System
  6. Redmi Turbo 6 Max Render Leaks Ahead of Launch
  7. OpenAI's Rogue Agent Said to Have Compromised a Customer at a Second Tech Firm
  8. Android 17 Beta Rolls Out to Motorola Edge 60 Pro With These Features
  9. WhatsApp Testing Home Screen Voice Message Widget for Android Users: Report
  1. Google Pixel 11 Pro Teased Again Ahead of August 12 Launch; Pixel Glow Design Shown
  2. Redmi Turbo 6 Max Render Leaks Ahead of Launch: Expected Specifications
  3. Gemini Can Now Read, Summarise, and Draft Replies to Comments in Google Docs 
  4. Paytm Introduces Split Bills for Shared Group Expenses on Its App
  5. India's Telecom User Base Rises in June, Airtel Tops Subscriber Additions: TRAI
  6. Crypto Hacks Top $1 Billion in H1 2026 as Ethereum and Solana Lead Losses: Report
  7. 1inch Introduces Aqua to Unite DeFi Liquidity on 13 Chains
  8. Wuchang: Fallen Feathers Sequel Announced by 505 Games With Original Creator's New Studio Involved
  9. WhatsApp Reportedly Testing Home Screen Voice Message Widget for Android Users
  10. Samsung Galaxy S26 FE Charging Speed Upgrade Seems Unlikely as Phone Reportedly Appears on a Certification Site
Download Our Apps
Available in Hindi
© Copyright Red Pixels Ventures Limited 2026. All rights reserved.