agent-sdk active

Agents by Hugging Face

License: Apache-2.0 Language: Python
IDE Web

About

As LLMs gained tool-use competence, Hugging Face added an agents module to Transformers so models could chain its ecosystem of tools — text downloaders, speech-to-text, image generation, and community tools from the Hub — inside a reasoning loop. ReactAgent follows the think-act-observe pattern with JSON tool calls; CodeAgent instead has the model emit Python code that runs in a restricted interpreter with access limited to the toolbox and safe built-ins, which lets one generation invoke several tools. Custom tools plug in via the agent.tool decorator or load_tool from the Hub. The API was later deprecated and removed from Transformers in favor of the dedicated smolagents library, which carries the same CodeAgent and tool-calling design forward. Its main audience today is people reading older codebases and papers built on the Transformers agents API.