First-party app
Hugging Face

Hugging Face

Search the Hugging Face Hub for models, datasets and Spaces, read repository files and dataset rows, manage repositories, and run chat inference through the router.

stable AI & Machine LearningDeveloper Tools

About

Hugging Face ships in the w6w first-party pack. It declares 14 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.huggingface
Version
0.1.1
Author
w6w
Licence
MIT
Categories
AI & Machine Learning · Developer Tools

Overview

Hugging Face is the largest hub for machine learning models, datasets, and Spaces, and this app searches all three, reads a repository’s files and a dataset’s rows without downloading anything, and runs chat inference through Hugging Face’s own router. It is built for workflows that need to discover a model or dataset, check what a repository actually contains, or call an already-deployed model — rather than for training or hosting one.

Repository management is covered too: creating and deleting models, datasets, and Spaces, defaulting new ones to private since a repository created by an automation is rarely meant to be public. Because the searchable Hub and the callable inference catalogue are different things — most models on the Hub were never deployed for inference — a separate action lists only the models actually available to call, so a workflow can check before it commits to one. Token permissions are also surfaced directly, since a fine-grained token’s limits otherwise look like an intermittent fault rather than what they are.

Build with Hugging Face

Three routes to the same 14 actions. The Workflow tab is generated from Hugging Face's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Run a chat completion

chat-complete

Chat inference through the router, in OpenAI's request and response shape. The router DISPATCHES to a provider — the same model can behave differently depending on which.

Get a dataset

dataset-get

One dataset's card and configuration. `cardData.license` is the field worth reading first — nothing enforces it at download time.

Read dataset rows

dataset-rows

Read rows straight out of a dataset without downloading it. `config` and `split` are the author's own names — `dataset-get` reports them, and guessing `train` is often wrong.

Search datasets

dataset-search

Find datasets on the Hub. Tags carry the licence, language and task, and all of a tag list must match — a long one usually returns nothing.

Read a repository file

file-download

Read a file's contents — configuration and small data, not weights. A GATED repository fails here even though its metadata reads fine, and no token can accept a gate.

List callable models

inference-model-list

What the router can actually run — a few hundred, against the Hub's hundreds of thousands. Check here before wiring a model in; a Hub search result is very unlikely to be callable.

Get a model

model-get

One model's card, config and file list. A renamed id redirects and this reports it — the only sign that a stored id is historical.

Search models

model-search

Find models on the Hub. `pipelineTag` narrows by TASK, which is usually what separates the model you want from a hundred fine-tunes of it.

Create a repository

repo-create

Create a model, dataset or Space repository. This defaults to PRIVATE, unlike the Hub — a repository an automation creates is rarely meant to be public.

Delete a repository

repo-delete

Permanently remove a repository and all its revisions. There is no undo, and anything already downloaded or forked is unaffected.

List a repository's files

repo-files

What a repository actually contains. Real sizes are in `lfs.size` — a large file's `size` is the size of its LFS POINTER, about 130 bytes, and summing those looks plausible.

Get a Space

space-get

One Space's configuration and runtime. `runtime.stage` says whether it is RUNNING or merely SLEEPING — free-tier Spaces sleep when idle and wake slowly.

Search Spaces

space-search

Find Spaces — hosted applications. They sort by likes rather than downloads, because nobody downloads a running app.

Get the current identity

whoami

Who this token is and what it may do. A fine-grained token that omits a repository returns 403 on it alone, which reads as an intermittent fault — this says otherwise.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Hugging Face's real ids.

{
  "manifestVersion": "2",
  "name": "huggingface-example",
  "steps": [
    {
      "id": "chat-complete",
      "uses": {
        "app": "io.w6w.huggingface",
        "action": "chat-complete",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "model": "<model>",
        "messages": "<messages>"
      }
    }
  ]
}

Here are some of the things you can do

  • Run a chat completion

    perform
    chat-complete
  • Get a dataset

    read
    dataset-get
  • Read dataset rows

    read
    dataset-rows
  • Search datasets

    search
    dataset-search
  • Read a repository file

    read
    file-download

+9 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Hugging Face, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Hugging Face. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "chat-complete",
  payload: {
    model: "<value>",
    messages: "<value>",
    // provider: "<value>",
    // temperature: "<value>",
    // maxTokens: "<value>",
    // extra: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action chat-complete --payload '{"model":"<value>","messages":"<value>"}'

Give an AI agent Hugging Face — without giving it Hugging Face's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.huggingface#chat-complete",
    "input": {
      "model": "<model>",
      "messages": "<messages>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Hugging Face connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Hugging Face's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Hugging Face itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Hugging Face declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Hugging Face service status

Hugging Face's own status. It does NOT cover the third-party inference providers the router dispatches to, so a green board is not a promise that a completion will work.

quota

Hub request headroom

Remaining Hub requests in the current window, from the RFC-draft `ratelimit` header rather than `X-RateLimit-*`. It says nothing about the inference providers.