You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hub/agents.md
+42-41Lines changed: 42 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,49 +24,10 @@ This feature is experimental ⚗️ and will continue to evolve.
24
24
25
25
</Tip>
26
26
27
-
## smolagents
28
-
29
-
[smolagents](https://github.com/huggingface/smolagents) is a lightweight library to cover all agentic use cases, from code-writing agents to computer use, in few lines of code. It is model agnostic, supporting local models served with Hugging Face Transformers, as well as models offered with [Inference Providers](../inference-providers/index.md), and proprietary model providers.
30
-
31
-
It offers a unique kind of agent :`CodeAgent`, an agent that writes its actions in Python code.
32
-
It also supports the standard agent that writes actions in JSON blobs as most other agentic frameworks do, called `ToolCallingAgent`.
33
-
To learn more about write actions in code vs JSON, check out our [new short course on DeepLearning.AI](https://www.deeplearning.ai/short-courses/building-code-agents-with-hugging-face-smolagents/).
34
-
35
-
If you want to avoid defining agents yourself, the easiest way to start an agent is through the CLI, using the `smolagent` command.
36
-
37
-
```bash
38
-
smolagent "Plan a trip to Tokyo, Kyoto and Osaka between Mar 28 and Apr 7." \
39
-
--model-type "InferenceClientModel" \
40
-
--model-id "Qwen/Qwen2.5-Coder-32B-Instruct" \
41
-
--imports "pandas numpy" \
42
-
--tools "web_search"
43
-
```
44
-
45
-
Agents can be pushed to Hugging Face Hub as Spaces. Check out all the cool agents people have built [here](https://huggingface.co/spaces?filter=smolagents&sort=likes).
46
-
47
-
smolagents also supports MCP servers as tools, as follows:
48
-
49
-
```python
50
-
# pip install --upgrade smolagents mcp
51
-
from smolagents import MCPClient, CodeAgent
52
-
from mcp import StdioServerParameters
53
-
import os
54
-
55
-
server_parameters = StdioServerParameters(
56
-
command="uvx", # Using uvx ensures dependencies are available
agent.run("Please find the latest research on COVID-19 treatment.")
64
-
```
65
-
66
-
Learn more [in the documentation](https://huggingface.co/docs/smolagents/tutorials/tools#use-mcp-tools-with-mcpclient-directly).
67
-
68
27
## tiny-agents (JS and Python)
69
28
29
+
NEW: tiny-agents now supports [AGENTS.md](https://agents.md/) standard. 🥳
30
+
70
31
`tiny-agents` is a lightweight toolkit for running and building MCP-powered agents on top of the Hugging Face Inference Client + Model Context Protocol (MCP). It is available as a JS package `@huggingface/tiny-agents` and in the `huggingface_hub` Python package.
71
32
72
33
@@ -234,3 +195,43 @@ Lastly, add this to the settings of the MCP Client of your choice (e.g. Cursor).
234
195
235
196
This is very powerful because it lets the LLM use any Gradio application as a tool. You can find thousands of them on [Spaces](https://huggingface.co/spaces). Learn more [here](https://www.gradio.app/guides/building-mcp-server-with-gradio).
236
197
198
+
## smolagents
199
+
200
+
[smolagents](https://github.com/huggingface/smolagents) is a lightweight library to cover all agentic use cases, from code-writing agents to computer use, in few lines of code. It is model agnostic, supporting local models served with Hugging Face Transformers, as well as models offered with [Inference Providers](../inference-providers/index.md), and proprietary model providers.
201
+
202
+
It offers a unique kind of agent :`CodeAgent`, an agent that writes its actions in Python code.
203
+
It also supports the standard agent that writes actions in JSON blobs as most other agentic frameworks do, called `ToolCallingAgent`.
204
+
To learn more about write actions in code vs JSON, check out our [new short course on DeepLearning.AI](https://www.deeplearning.ai/short-courses/building-code-agents-with-hugging-face-smolagents/).
205
+
206
+
If you want to avoid defining agents yourself, the easiest way to start an agent is through the CLI, using the `smolagent` command.
207
+
208
+
```bash
209
+
smolagent "Plan a trip to Tokyo, Kyoto and Osaka between Mar 28 and Apr 7." \
210
+
--model-type "InferenceClientModel" \
211
+
--model-id "Qwen/Qwen2.5-Coder-32B-Instruct" \
212
+
--imports "pandas numpy" \
213
+
--tools "web_search"
214
+
```
215
+
216
+
Agents can be pushed to Hugging Face Hub as Spaces. Check out all the cool agents people have built [here](https://huggingface.co/spaces?filter=smolagents&sort=likes).
217
+
218
+
smolagents also supports MCP servers as tools, as follows:
219
+
220
+
```python
221
+
# pip install --upgrade smolagents mcp
222
+
from smolagents import MCPClient, CodeAgent
223
+
from mcp import StdioServerParameters
224
+
import os
225
+
226
+
server_parameters = StdioServerParameters(
227
+
command="uvx", # Using uvx ensures dependencies are available
0 commit comments