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
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,14 @@ To learn more about write actions in code vs JSON, check out our [new short cour
12
12
13
13
If you want to avoid defining agents yourself, the easiest way to start an agent is through the CLI, using the `smolagent` command.
14
14
15
-
```python
15
+
```
16
16
smolagent "Plan a trip to Tokyo, Kyoto and Osaka between Mar 28 and Apr 7." --model-type "InferenceClientModel" --model-id "Qwen/Qwen2.5-Coder-32B-Instruct" --imports "pandas numpy" --tools "web_search"
17
17
```
18
18
19
19
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).
20
20
21
21
smolagents also support MCP servers as tools, as follows:
22
+
22
23
```python
23
24
from smolagents import MCPClient, CodeAgent
24
25
from mcp import StdioServerParameters
@@ -62,7 +63,6 @@ You can build an MCP server in just a few lines of Python with Gradio. If you ha
62
63
To make a Gradio application an MCP server, simply pass in `mcp_server=True` when launching your demo like follows.
0 commit comments