---
title: "License to Call: Introducing Transformers Agents 2.0"
description: "Transformers Agents 2.0 adds two iterative ReAct-style agents, ReactCodeAgent and ReactJsonAgent, which loop through thought, action and observation, alongside the existing single-shot CodeAgent."
url: "https://swe.quest/articles/license-to-call-introducing-transformers-agents-2-0-dad436258e67a17b"
canonical: "https://huggingface.co/blog/agents"
source: "Hugging Face"
published: "2024-05-13"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 15
tags: ["ai-agents","llms","rag","python"]
---

# License to Call: Introducing Transformers Agents 2.0

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-05-13, 15 min read, Announcement. Original: [https://huggingface.co/blog/agents](https://huggingface.co/blog/agents)

## Summary

Transformers Agents 2.0 adds two iterative ReAct-style agents, ReactCodeAgent and ReactJsonAgent, which loop through thought, action and observation, alongside the existing single-shot CodeAgent. The framework is built from a few transparent pieces: Tool classes whose attributes generate the prompt's usage manual, reusable pre-instantiated Toolboxes, and a pluggable LLM engine. Worked examples include a self-correcting RAG agent that chooses its own source filters over a FAISS index, and a multi-agent setup that wraps a web-surfer agent as a tool. A Llama-3-70B-Instruct agent built this way outperforms GPT-4-based agents on the GAIA leaderboard; the functionality has since moved to the smolagents library.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- LLM prompting basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- RAG basics ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))

## Keywords

Transformers Agents, Hugging Face Transformers, ReAct, GAIA, Llama 3, smolagents, LangChain, FAISS

## Related posts

- [Our Transformers Code Agent beats the GAIA benchmark 🏅](https://swe.quest/articles/our-transformers-code-agent-beats-the-gaia-benchmark-6fa8664c9f76e83d.md): Hugging Face · 2024-07-01 · Medium · 12 min read · AI agents, Evaluation, LLMs, Sandboxing & isolation
  A ReactCodeAgent built with Transformers Agents and GPT-4o scored 44.2% on the GAIA validation set, ranking first, and 33.3% on the test set, ranking second overall with the best Level 3 score.
- [Introducing smolagents: simple agents that write actions in code.](https://swe.quest/articles/introducing-smolagents-simple-agents-that-write-actions-in-code-081cf3257f37300e.md): Hugging Face · 2024-12-31 · Medium · 11 min read · AI agents, LLMs, Python, Open source
  smolagents is a minimal Python library from Hugging Face for building LLM agents, with first-class support for code agents that write their actions as Python code instead of JSON tool calls.
- [Open-source LLMs as LangChain Agents](https://swe.quest/articles/open-source-llms-as-langchain-agents-e2163a289958a319.md): Hugging Face · 2024-01-24 · Medium · 10 min read · AI agents, LLMs, Evaluation, Python
  Open-source LLMs can now serve as reasoning engines for tool-using ReAct agents, with Mixtral-8x7B outperforming GPT-3.5 out of the box on a mixed benchmark drawn from HotpotQA, GSM8K and GAIA, graded by GPT-4-as-a-judge.
- [Open-source DeepResearch – Freeing our search agents](https://swe.quest/articles/open-source-deepresearch-freeing-our-search-agents-72a8cc1624888c05.md): Hugging Face · 2025-02-04 · Medium · 17 min read · AI agents, LLMs, Evaluation, Open source
  Hugging Face reproduced OpenAI's Deep Research agent in about 24 hours using the open smolagents framework and reached 55.15% on the GAIA validation set, up from roughly 46% for the previous open state of the art (Magentic-One).
- [CodeAgents + Structure: A Better Way to Execute Actions](https://swe.quest/articles/codeagents-structure-a-better-way-to-execute-actions-5f9ad7c5f62e107c.md): Hugging Face · 2025-05-28 · Medium · 8 min read · AI agents, LLMs, Evaluation, Python
  Forcing code-writing agents to emit their reasoning and Python code as a structured JSON blob (thoughts + code) beats both markdown-parsed CodeAgents and JSON tool-calling agents by 2-7 percentage points on GAIA, MATH, SimpleQA and Frames for capable models.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
