File tree Expand file tree Collapse file tree 1 file changed +40
-4
lines changed
Expand file tree Collapse file tree 1 file changed +40
-4
lines changed Original file line number Diff line number Diff line change 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
810npm install @huggingface/tiny-agents
911# or
10- yarn add @huggingface/tiny-agents
11- # or
1212pnpm 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
3773import { Agent } from ' @huggingface/tiny-agents' ;
You can’t perform that action at this time.
0 commit comments