From bac717b200f8e1d0794d5dee18f2b09f6bcdabe3 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 12:09:38 +0200 Subject: [PATCH 1/8] tiny-agents docs --- docs/_toctree.yml | 7 ++++++- packages/tiny-agents/README.md | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/_toctree.yml b/docs/_toctree.yml index 7b8008de96..cb2ed83481 100644 --- a/docs/_toctree.yml +++ b/docs/_toctree.yml @@ -18,7 +18,12 @@ isExpanded: true sections: - local: mcp-client/README - title: Simple MCP Client and smol Agent built on top of Inference Client + title: Simple MCP Client built on top of Inference Client +- title: "@huggingface/tiny-agents" + isExpanded: true + sections: + - local: tiny-agents/README + title: A lightweight MCP-powered Agent built on top of Inference Client - title: "@huggingface/agent" isExpanded: true sections: diff --git a/packages/tiny-agents/README.md b/packages/tiny-agents/README.md index 487cb48023..18df69597b 100644 --- a/packages/tiny-agents/README.md +++ b/packages/tiny-agents/README.md @@ -29,6 +29,8 @@ Available Commands: serve Run the Agent as an OpenAI-compatible HTTP server ``` +You can load agents directly from the Hugging Face Hub [tiny-agents](https://huggingface.co/datasets/tiny-agents/tiny-agents) Dataset, or specify a path to your own local agent configuration. + ## Define your own agent The simplest way to create your own agent is to create a folder containing an `agent.json` file: @@ -86,7 +88,7 @@ npx @huggingface/tiny-agents run ./my-agent Voilà! 🔥 > [!NOTE] -> Note: you can open a PR in the huggingface.js repo to share your agent with the community, just upload it inside the `src/agents/` directory. +> Note: You can contribute your agent to the community by opening a Pull Request in the [tiny-agents](https://huggingface.co/datasets/tiny-agents/tiny-agents) Hugging Face dataset. ### Advanced: Programmatic Usage From 20849d63b0e859650eded8318a0d15501f584de4 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 12:17:54 +0200 Subject: [PATCH 2/8] fix --- .github/workflows/documentation.yml | 1 + .github/workflows/pr-documentation.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index aa20cfda62..0b97a526e6 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -12,6 +12,7 @@ on: - "packages/hub/README.md" - "packages/inference/README.md" - "packages/agents/README.md" + - "packages/tiny-agents/README.md" - ".github/workflows/documentation.yml" jobs: diff --git a/.github/workflows/pr-documentation.yml b/.github/workflows/pr-documentation.yml index 69d73b689d..9910b8b411 100644 --- a/.github/workflows/pr-documentation.yml +++ b/.github/workflows/pr-documentation.yml @@ -9,6 +9,7 @@ on: - "packages/doc-internal/**" - "packages/inference/README.md" - "packages/agents/README.md" + - "packages/tiny-agents/README.md" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} From f09982f2e8756c2880a3e3286eb8ca46fe31be7e Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 12:19:37 +0200 Subject: [PATCH 3/8] copy tiny-agents docs --- packages/doc-internal/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/doc-internal/package.json b/packages/doc-internal/package.json index e5fee81ed1..71c4fb547a 100644 --- a/packages/doc-internal/package.json +++ b/packages/doc-internal/package.json @@ -15,6 +15,7 @@ "doc-agents": "typedoc --tsconfig ../agents/tsconfig.json --githubPages false --plugin typedoc-plugin-markdown --out ../../docs/agents --hideBreadcrumbs --hideInPageTOC --sourceLinkTemplate https://github.com/huggingface/huggingface.js/blob/main/{path}#L{line} ../agents/src/index.ts", "doc-gguf": "mkdir -p ../../docs/gguf && cp ../../packages/gguf/README.md ../../docs/gguf/README.md", "doc-mcp-client": "mkdir -p ../../docs/mcp-client && cp ../../packages/mcp-client/README.md ../../docs/mcp-client/README.md", + "doc-tiny-agents": "mkdir -p ../../docs/tiny-agents && cp ../../packages/tiny-agents/README.md ../../docs/tiny-agents/README.md", "doc-space-header": "mkdir -p ../../docs/space-header && cp ../../packages/space-header/README.md ../../docs/space-header/README.md", "update-toc": "tsx update-toc.ts", "fix-cdn-versions": "tsx fix-cdn-versions.ts", From d424683eecf706408f4cefa294fd97d9e3db7147 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 12:20:29 +0200 Subject: [PATCH 4/8] fix script --- packages/doc-internal/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/doc-internal/package.json b/packages/doc-internal/package.json index 71c4fb547a..24029c5e0b 100644 --- a/packages/doc-internal/package.json +++ b/packages/doc-internal/package.json @@ -5,7 +5,7 @@ "description": "Package to generate doc for other @huggingface packages", "private": true, "scripts": { - "start": "pnpm run fix-cdn-versions && pnpm run doc-hub && pnpm run doc-inference && pnpm run doc-agents && pnpm run doc-space-header && pnpm run doc-gguf && pnpm run doc-mcp-client && cp ../../README.md ../../docs/index.md && pnpm run update-toc && pnpm run fix-md-links && pnpm run fix-md-headinghashlinks", + "start": "pnpm run fix-cdn-versions && pnpm run doc-hub && pnpm run doc-inference && pnpm run doc-agents && pnpm run doc-space-header && pnpm run doc-gguf && pnpm run doc-mcp-client && pnpm run doc-tiny-agents && cp ../../README.md ../../docs/index.md && pnpm run update-toc && pnpm run fix-md-links && pnpm run fix-md-headinghashlinks", "lint": "eslint --quiet --fix --ext .cjs,.ts .", "lint:check": "eslint --ext .cjs,.ts .", "format": "prettier --write .", From b146667f5dbb6c5543bf89bc882c7de9b6133f5e Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 12:24:41 +0200 Subject: [PATCH 5/8] nit --- packages/tiny-agents/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/tiny-agents/README.md b/packages/tiny-agents/README.md index 18df69597b..091ec5323a 100644 --- a/packages/tiny-agents/README.md +++ b/packages/tiny-agents/README.md @@ -87,8 +87,11 @@ npx @huggingface/tiny-agents run ./my-agent Voilà! 🔥 -> [!NOTE] -> Note: You can contribute your agent to the community by opening a Pull Request in the [tiny-agents](https://huggingface.co/datasets/tiny-agents/tiny-agents) Hugging Face dataset. + + +Note: You can contribute your agent to the community by opening a Pull Request in the [tiny-agents](https://huggingface.co/datasets/tiny-agents/tiny-agents) Hugging Face dataset. + + ### Advanced: Programmatic Usage From 1d4fe45ee912e9a0053d3dab478f96e25471789e Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 14:26:00 +0200 Subject: [PATCH 6/8] update note --- packages/tiny-agents/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/tiny-agents/README.md b/packages/tiny-agents/README.md index 9747436b9a..d82d6d9cfe 100644 --- a/packages/tiny-agents/README.md +++ b/packages/tiny-agents/README.md @@ -96,11 +96,8 @@ Browse our curated collection of Tiny Agents at https://huggingface.co/datasets/ npx @huggingface/tiny-agents run "julien-c/flux-schnell-generator" ``` - - -Note: You can contribute your agent to the community by opening a Pull Request in the [tiny-agents](https://huggingface.co/datasets/tiny-agents/tiny-agents) Hugging Face dataset. - - +> [!NOTE] +> Want to share your own agent with the community? Submit a PR to the [Tiny Agents](https://huggingface.co/datasets/tiny-agents/tiny-agents/discussions) repository on the Hub. Your submission must include an `agent.json` file, and you can optionally add a `PROMPT.md` file. To help others understand your agent's capabilities, consider including an `EXAMPLES.md` file with sample prompts and use cases. ## Advanced: Programmatic Usage From 77cc499cbf12dfd3988ca0a724287a40b0dda090 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 16:08:59 +0200 Subject: [PATCH 7/8] remove huggingface/agents from ToC --- docs/_toctree.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/_toctree.yml b/docs/_toctree.yml index cb2ed83481..833be5cc0f 100644 --- a/docs/_toctree.yml +++ b/docs/_toctree.yml @@ -24,13 +24,6 @@ sections: - local: tiny-agents/README title: A lightweight MCP-powered Agent built on top of Inference Client -- title: "@huggingface/agent" - isExpanded: true - sections: - - local: agents/README - title: Use Agents to run multi-modal workflows from a natural language API - - local: agents/modules - title: API Reference - title: "@huggingface/space-header" isExpanded: true sections: From f655e605038e0fe5169b7ef0023b8fcfd5e2e220 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Tue, 27 May 2025 16:12:51 +0200 Subject: [PATCH 8/8] better --- .github/workflows/documentation.yml | 1 - .github/workflows/pr-documentation.yml | 1 - packages/doc-internal/package.json | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 0b97a526e6..4a8eaf0f34 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -11,7 +11,6 @@ on: - "README.md" - "packages/hub/README.md" - "packages/inference/README.md" - - "packages/agents/README.md" - "packages/tiny-agents/README.md" - ".github/workflows/documentation.yml" diff --git a/.github/workflows/pr-documentation.yml b/.github/workflows/pr-documentation.yml index 9910b8b411..49f06d6c72 100644 --- a/.github/workflows/pr-documentation.yml +++ b/.github/workflows/pr-documentation.yml @@ -8,7 +8,6 @@ on: - "packages/hub/README.md" - "packages/doc-internal/**" - "packages/inference/README.md" - - "packages/agents/README.md" - "packages/tiny-agents/README.md" concurrency: diff --git a/packages/doc-internal/package.json b/packages/doc-internal/package.json index 24029c5e0b..429afcc6e7 100644 --- a/packages/doc-internal/package.json +++ b/packages/doc-internal/package.json @@ -5,14 +5,13 @@ "description": "Package to generate doc for other @huggingface packages", "private": true, "scripts": { - "start": "pnpm run fix-cdn-versions && pnpm run doc-hub && pnpm run doc-inference && pnpm run doc-agents && pnpm run doc-space-header && pnpm run doc-gguf && pnpm run doc-mcp-client && pnpm run doc-tiny-agents && cp ../../README.md ../../docs/index.md && pnpm run update-toc && pnpm run fix-md-links && pnpm run fix-md-headinghashlinks", + "start": "pnpm run fix-cdn-versions && pnpm run doc-hub && pnpm run doc-inference && pnpm run doc-space-header && pnpm run doc-gguf && pnpm run doc-mcp-client && pnpm run doc-tiny-agents && cp ../../README.md ../../docs/index.md && pnpm run update-toc && pnpm run fix-md-links && pnpm run fix-md-headinghashlinks", "lint": "eslint --quiet --fix --ext .cjs,.ts .", "lint:check": "eslint --ext .cjs,.ts .", "format": "prettier --write .", "format:check": "prettier --check .", "doc-hub": "typedoc --tsconfig ../hub/tsconfig.json --githubPages false --plugin typedoc-plugin-markdown --out ../../docs/hub --hideBreadcrumbs --hideInPageTOC --sourceLinkTemplate https://github.com/huggingface/huggingface.js/blob/main/{path}#L{line} ../hub/index.ts", "doc-inference": "typedoc --tsconfig ../inference/tsconfig.json --githubPages false --plugin typedoc-plugin-markdown --out ../../docs/inference --hideBreadcrumbs --hideInPageTOC --sourceLinkTemplate https://github.com/huggingface/huggingface.js/blob/main/{path}#L{line} ../inference/src/index.ts", - "doc-agents": "typedoc --tsconfig ../agents/tsconfig.json --githubPages false --plugin typedoc-plugin-markdown --out ../../docs/agents --hideBreadcrumbs --hideInPageTOC --sourceLinkTemplate https://github.com/huggingface/huggingface.js/blob/main/{path}#L{line} ../agents/src/index.ts", "doc-gguf": "mkdir -p ../../docs/gguf && cp ../../packages/gguf/README.md ../../docs/gguf/README.md", "doc-mcp-client": "mkdir -p ../../docs/mcp-client && cp ../../packages/mcp-client/README.md ../../docs/mcp-client/README.md", "doc-tiny-agents": "mkdir -p ../../docs/tiny-agents && cp ../../packages/tiny-agents/README.md ../../docs/tiny-agents/README.md",