agentleFS
Hugging FaceKnown publisherhuggingface/smolagents/docs/source/zh/reference/agents.md

smolagents / reference

AGENTS.md30k starsChanged 16 months agoApache-2.0View on GitHub

Smolagents 是一个实验性的 API,可能会随时发生变化。由于 API 或底层模型可能发生变化,代理返回的结果也可能有所不同。 要了解有关智能体和工具的更多信息,请务必阅读入门指南。本页面包含基础类的 API 文档。 我们的智能体继承自 [MultiStepAgent],这意味着它们可以执行多步操作,每一步包含一个思考(thought),然后是一个工具调用和执行。请阅读概念指南以了解更多信息。 我们提供两种类型的代理,它们基于主要的 [Agent] 类: - [CodeAgent] 是默认代理,它以 Python 代码编写工具调用。 - [ToolCallingAgent] 以 JSON 编写工具调用。 两者在初始化时都需要提供参数 model 和工具列表 tools。 [[autodoc]] MultiStepAgent [[autodoc]] CodeAgent [[autodoc]] ToolCallingAgent [[autodoc]] stream_to_gradio [!TIP] 您必须安装 gradio 才能使用 UI。如果尚未安装,请运行 pip install 'smolagents[gradio]'。 [[autodoc]] GradioUI [[autodoc]] smolagents.agents.PromptTemplates [[autodoc]] smolagents.agents.PlanningPromptTemplate [[autodoc]] smolagents.agents.ManagedAgentPromptTemplate [[autodoc]] smolagents.agents.FinalAnswerPromptTemplate

  • Installs packages

Trending

More talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 3 mentionsMay 2026: 7 mentionsJun 2026: 3 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 2 mentionsOct 2026: 5 mentionsNov 2026: 4 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the huggingface/smolagents repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about huggingface/smolagents

The biggest 5 of 69 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 69

Talked about on GitHub, Bluesky and Hacker News (69 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 17

12 more on Bluesky

On Hacker News · 2

The file

Files
agents.md

Agents(智能体)

<Tip warning={true}>

Smolagents 是一个实验性的 API,可能会随时发生变化。由于 API 或底层模型可能发生变化,代理返回的结果也可能有所不同。

</Tip>

要了解有关智能体和工具的更多信息,请务必阅读入门指南。本页面包含基础类的 API 文档。

智能体(Agents)

我们的智能体继承自 [MultiStepAgent],这意味着它们可以执行多步操作,每一步包含一个思考(thought),然后是一个工具调用和执行。请阅读概念指南以了解更多信息。

我们提供两种类型的代理,它们基于主要的 [Agent] 类:

  • [CodeAgent] 是默认代理,它以 Python 代码编写工具调用。
  • [ToolCallingAgent] 以 JSON 编写工具调用。

两者在初始化时都需要提供参数 model 和工具列表 tools。

智能体类

[[autodoc]] MultiStepAgent

[[autodoc]] CodeAgent

[[autodoc]] ToolCallingAgent

stream_to_gradio

[[autodoc]] stream_to_gradio

GradioUI

[!TIP] 您必须安装 gradio 才能使用 UI。如果尚未安装,请运行 pip install 'smolagents[gradio]'。

[[autodoc]] GradioUI

提示(Prompts)

[[autodoc]] smolagents.agents.PromptTemplates

[[autodoc]] smolagents.agents.PlanningPromptTemplate

[[autodoc]] smolagents.agents.ManagedAgentPromptTemplate

[[autodoc]] smolagents.agents.FinalAnswerPromptTemplate

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.