Skip to content

Commit ef2f900

Browse files
authored
docs(tinyagent): Add example with mcp. (#193)
1 parent bc77b63 commit ef2f900

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

docs/frameworks/tinyagent.md

+28
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,31 @@
33
As part of the bare bones library, we provide our own Python implementation based on [HuggingFace Tiny Agents](https://huggingface.co/blog/tiny-agents).
44

55
You can find it in [`any_agent.frameworks.tinyagent`](https://github.com/mozilla-ai/any-agent/blob/main/src/any_agent/frameworks/tinyagent.py).
6+
7+
## Examples
8+
9+
### Use MCP Tools
10+
11+
```python
12+
from any_agent import AnyAgent, AgentConfig
13+
from any_agent.config import MCPStdioParams
14+
15+
agent = AnyAgent.create(
16+
"tinyagent",
17+
AgentConfig(
18+
model_id="gpt-4.1-nano",
19+
instructions="You must use the available tools to find an answer",
20+
tools=[
21+
MCPStdioParams(
22+
command="uvx",
23+
args=["duckduckgo-mcp-server"]
24+
)
25+
]
26+
)
27+
)
28+
29+
result = agent.run(
30+
"Which Agent Framework is the best??"
31+
)
32+
print(result.final_output)
33+
```

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## Installation
1818

19-
You can install the bare bones library as follows (only the [`tinyagent`](./frameworks/tinyagent.md) framewrok will be available):
19+
You can install the bare bones library as follows (only [`TinyAgent`](./frameworks/tinyagent.md) will be available):
2020

2121
```bash
2222
pip install any-agent

0 commit comments

Comments
 (0)