# smolagents

**Creator:** Hugging Face  |  **Category:** tool-use  |  **Status:** stable

## Description

Open-source Python library from Hugging Face designed to make it extremely easy to build and run agents in a few lines of code. First-class support for CodeAgent (actions written as Python code) and ToolCallingAgent (JSON tool calls). Model-agnostic and modality-agnostic.

## Key Features

- CodeAgent (actions as Python code)
- ToolCallingAgent (JSON tool calls)
- Sandboxed execution via Modal/Blaxel/E2B/Docker
- Hub integrations (Gradio Spaces)
- Model-agnostic (HF Inference, OpenAI, Anthropic, LiteLLM, Transformers, Ollama)
- Vision/video/audio inputs
- MCP/LangChain tool support
- CLI tools (smolagent, webagent)

## Resources

- [Website](https://huggingface.co/docs/smolagents)
- [Specification](https://huggingface.co/docs/smolagents/index)
- [GitHub](https://github.com/huggingface/smolagents)

---
*Source: agentprotocols.app — /protocol/smolagents*