Skip to content

Commit 3d1ddf2

Browse files
authored
update doc to mention support for AGENTS.md (#1913)
1 parent 012432a commit 3d1ddf2

File tree

1 file changed

+42
-41
lines changed

1 file changed

+42
-41
lines changed

docs/hub/agents.md

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -24,49 +24,10 @@ This feature is experimental ⚗️ and will continue to evolve.
2424

2525
</Tip>
2626

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
57-
args=["--quiet", "[email protected]"],
58-
env={"UV_PYTHON": "3.12", **os.environ},
59-
)
60-
61-
with MCPClient(server_parameters) as tools:
62-
agent = CodeAgent(tools=tools, model=model, add_base_tools=True)
63-
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-
6827
## tiny-agents (JS and Python)
6928

29+
NEW: tiny-agents now supports [AGENTS.md](https://agents.md/) standard. 🥳
30+
7031
`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.
7132

7233

@@ -234,3 +195,43 @@ Lastly, add this to the settings of the MCP Client of your choice (e.g. Cursor).
234195

235196
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).
236197

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
228+
args=["--quiet", "[email protected]"],
229+
env={"UV_PYTHON": "3.12", **os.environ},
230+
)
231+
232+
with MCPClient(server_parameters) as tools:
233+
agent = CodeAgent(tools=tools, model=model, add_base_tools=True)
234+
agent.run("Please find the latest research on COVID-19 treatment.")
235+
```
236+
237+
Learn more [in the documentation](https://huggingface.co/docs/smolagents/tutorials/tools#use-mcp-tools-with-mcpclient-directly).

0 commit comments

Comments
 (0)