smolagents is a compact open-source library (Apache-2.0) from Hugging Face for agents that think in code. The CodeAgent writes its actions as Python snippets; a ToolCallingAgent using JSON or text tool calls is also available. The library is model- and tool-agnostic: local models via transformers or Ollama, Hugging Face inference providers and many others through LiteLLM, and tools from MCP servers, LangChain or the Hub. For generated code, the project recommends a sandbox such as E2B, Blaxel, Modal or Docker; its built-in local executor is not a security sandbox.
Hugging Face, Inc. is a US company (Delaware) headquartered in New York; its EU main establishment, Hugging Face SAS, is in Paris and supervised by the CNIL. The library runs on your own infrastructure and, with local models, can work without external calls. For Hub services, the privacy policy lists hosting with providers such as AWS, MongoDB Atlas and Google Cloud in the United States and with OVHcloud in France. The policy refers to the GDPR.