Skip to content

Commit b60cfed

Browse files
committed
README
1 parent 91c87a9 commit b60cfed

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

packages/tiny-agents/README.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# @huggingface/tiny-agents
22

3-
A lightweight, composable agent framework for AI applications built on Hugging Face's JS stack.
3+
![meme](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/tiny-agents/legos.png)
4+
5+
A squad of lightweight composable AI applications built on Hugging Face's Inference Client and MCP stack.
46

57
## Installation
68

79
```bash
810
npm install @huggingface/tiny-agents
911
# or
10-
yarn add @huggingface/tiny-agents
11-
# or
1212
pnpm add @huggingface/tiny-agents
1313
```
1414

@@ -30,8 +30,44 @@ Available Commands:
3030
serve Run the Agent as an OpenAI-compatible HTTP server
3131
```
3232

33+
## Define your own agent
34+
35+
The simplest way to create your own agent is to create a folder containing an `agent.json` file:
36+
37+
```bash
38+
mkdir my-agent
39+
touch my-agent/agent.json
40+
```
41+
42+
```json
43+
{
44+
"model": "Qwen/Qwen2.5-72B-Instruct", // model id
45+
"provider": "nebius", // or you can also use a local endpoint base url with `endpointUrl`
46+
"servers": [
47+
{
48+
"type": "stdio",
49+
"config": {
50+
"command": "npx",
51+
"args": ["@playwright/mcp@latest"]
52+
}
53+
}
54+
]
55+
}
56+
```
57+
58+
`servers` is a list of MCP servers (we support Stdio, SSE, and HTTP servers).
59+
60+
Optionally, you can add a `PROMPT.md` file to override the default Agent prompt.
61+
62+
Then just point tiny-agents to your local folder:
63+
64+
```bash
65+
npx @huggingface/tiny-agents run ./my-agent
66+
```
67+
68+
Voilà! 🔥
3369

34-
## Programmatic Usage
70+
### Advanced: Programmatic Usage
3571

3672
```typescript
3773
import { Agent } from '@huggingface/tiny-agents';

0 commit comments

Comments
 (0)