A lightweight, open-source library by Hugging Face for building AI agents with minimal code, supporting various language models and secure code execution.
smolagents is a streamlined, open-source library developed by Hugging Face that enables developers to create powerful AI agents with just a few lines of code. The library emphasizes simplicity, containing approximately a thousand lines of code, and offers first-class support for Code Agents—agents that write their actions in Python code. smolagents is compatible with a wide range of language models, including those from OpenAI, Anthropic, and models hosted on the Hugging Face Hub. To ensure secure code execution, it provides options for running code in sandboxed environments via E2B. The library also integrates with the Hugging Face Hub, allowing users to share and load tools seamlessly.
We use cookies to enhance your experience. By continuing to use this site, you agree to our use of cookies. Learn more