smolagents logo

smolagents

smolagents is an open-source Python library developed by Hugging Face that enables developers to build and run powerful AI agents with minimal code. The library provides two primary agent paradigms: CodeAgent, which writes actions as Python code snippets for maximum expressiveness and composability, and ToolCallingAgent, which uses structured JSON for reliable and safe tool interactions. smolagents is model-agnostic, supporting Hugging Face Inference Providers, local Transformers, Ollama, LiteLLM (100+ LLMs), Azure OpenAI, Amazon Bedrock, and MLX models. Hub integration allows teams to share and load agents and tools as Gradio Spaces, and multi-agent orchestration enables hierarchical systems where manager agents coordinate specialized sub-agents.

1 APIs 0 Features
AI AgentsMulti-AgentPythonCode GenerationLLMHugging FaceOpen SourceMachine Learning

APIs

smolagents Python Library

The core smolagents Python library providing CodeAgent and ToolCallingAgent classes for building AI agents that write Python code or structured JSON to call tools and orchestrat...

Semantic Vocabularies

Smolagents Context

3 classes · 13 properties

JSON-LD

Resources

🔗
Website
Website
🔗
Documentation
Documentation
👥
GitHubOrganization
GitHubOrganization
👥
GitHubRepository
GitHubRepository
📰
Blog
Blog
📄
Changelog
Changelog
🔗
PyPI
PyPI
💰
Pricing
Pricing
🟢
StatusPage
StatusPage
🔗
X
X
🔗
LinkedIn
LinkedIn
🔗
Plans
Plans
🔗
RateLimits
RateLimits
🔗
FinOps
FinOps
📰
BlogRSS
BlogRSS
📰
Blogs
Blogs
🔗
JSONLDContext
JSONLDContext

Sources

apis.yml Raw ↑
aid: smolagents
name: smolagents
description: >
  smolagents is an open-source Python library developed by Hugging Face that enables developers
  to build and run powerful AI agents with minimal code. The library provides two primary agent
  paradigms: CodeAgent, which writes actions as Python code snippets for maximum expressiveness
  and composability, and ToolCallingAgent, which uses structured JSON for reliable and safe tool
  interactions. smolagents is model-agnostic, supporting Hugging Face Inference Providers,
  local Transformers, Ollama, LiteLLM (100+ LLMs), Azure OpenAI, Amazon Bedrock, and MLX
  models. Hub integration allows teams to share and load agents and tools as Gradio Spaces, and
  multi-agent orchestration enables hierarchical systems where manager agents coordinate
  specialized sub-agents.
type: Index
image: https://kinlane-productions.s3.amazonaws.com/apis-json/apis-json-logo.jpg
tags:
  - AI Agents
  - Multi-Agent
  - Python
  - Code Generation
  - LLM
  - Hugging Face
  - Open Source
  - Machine Learning
url: https://raw.githubusercontent.com/api-evangelist/smolagents/refs/heads/main/apis.yml
created: '2026-06-12'
modified: '2026-06-12'
specificationVersion: '0.19'
apis:
  - aid: smolagents:smolagents-python-library
    name: smolagents Python Library
    description: >
      The core smolagents Python library providing CodeAgent and ToolCallingAgent classes
      for building AI agents that write Python code or structured JSON to call tools and
      orchestrate multi-agent systems. Integrates with Hugging Face Hub Inference Providers,
      LiteLLM, Transformers, Azure OpenAI, Amazon Bedrock, and local models via Ollama.
    humanURL: https://huggingface.co/docs/smolagents/en/index
    baseURL: https://huggingface.co
    tags:
      - Agents
      - Python
      - Code Agents
      - Tool Calling
      - Multi-Agent
    properties:
      - type: Documentation
        url: https://huggingface.co/docs/smolagents/en/index
      - type: GuidedTour
        url: https://huggingface.co/docs/smolagents/en/guided_tour
      - type: APIReference
        url: https://huggingface.co/docs/smolagents/reference/agents
      - type: PyPI
        url: https://pypi.org/project/smolagents/
      - type: GitHubRepository
        url: https://github.com/huggingface/smolagents
common:
  - type: Website
    url: https://huggingface.co/smolagents
  - type: Documentation
    url: https://huggingface.co/docs/smolagents/en/index
  - type: GitHubOrganization
    url: https://github.com/huggingface
  - type: GitHubRepository
    url: https://github.com/huggingface/smolagents
  - type: Blog
    url: https://huggingface.co/blog/smolagents
  - type: Changelog
    url: https://github.com/huggingface/smolagents/releases
  - type: PyPI
    url: https://pypi.org/project/smolagents/
  - type: Pricing
    url: https://huggingface.co/pricing
  - type: StatusPage
    url: https://status.huggingface.co
  - type: X
    url: https://x.com/huggingface
  - type: LinkedIn
    url: https://www.linkedin.com/company/huggingface
  - type: Plans
    url: https://raw.githubusercontent.com/api-evangelist/smolagents/refs/heads/main/plans/smolagents-plans-pricing.yml
  - type: RateLimits
    url: https://raw.githubusercontent.com/api-evangelist/smolagents/refs/heads/main/rate-limits/smolagents-rate-limits.yml
  - type: FinOps
    url: https://raw.githubusercontent.com/api-evangelist/smolagents/refs/heads/main/finops/smolagents-finops.yml
  - type: BlogRSS
    url: https://huggingface.co/blog/feed.xml
  - type: Blogs
    url: https://raw.githubusercontent.com/api-evangelist/smolagents/refs/heads/main/blogs/blogs.json
  - type: JSONLDContext
    url: https://raw.githubusercontent.com/api-evangelist/smolagents/refs/heads/main/json-ld/smolagents-context.jsonld
maintainers:
  - FN: Kin Lane
    email: [email protected]