Skip to content

Hugging Face

Hugging Face

Hugging Face is the leading open source machine learning platform where teams build, train, and deploy language models, vision models, datasets, and AI applications. With the integration in SquadOS, your agents can run inference via OpenAI-compatible chat completion, generate text embeddings, search and explore models and datasets from the Hub, create repositories, manage discussions, and track the latest scientific papers from the AI community.

This tool uses API key (API_KEY) or OAuth 2.0 (OAUTH2) to connect.

You will need the following fields:

FieldRequiredDescription
api_keyYesHugging Face User Access Token, obtained from Settings → Access Tokens in your account.
  1. Go to huggingface.co and log in (or create an account).
  2. Click your avatar in the top-right corner and go to Settings.
  3. In the side menu, click Access Tokens.
  4. Click New token, choose a descriptive name, and select the Write scope (required to create repositories and commits) or Read (read-only).
  5. Click Generate token and copy the displayed value — this is your api_key.
  1. Go to Tools in the side menu (/admin/tools).
  2. Open the Available tab and search for Hugging Face.
  3. Click the card to open the details modal and hit Connect.
  4. You’re taken to the secure connection page hosted by Composio, where you enter the access token obtained above (or authorize via OAuth 2.0).
  5. Once done, you’re sent back to SquadOS with the account connected and the tool available for your agents. (Connection-flow details in Organization Tools.)

HUGGING_FACE_GENERATE_CHAT_COMPLETION

Tool to generate a response given a list of messages in a conversational context. Supports both conversational Language Models (LLMs) and Vision-Language Models (VLMs). Compatible with OpenAI SDK.

NameTypeRequiredDescription
modelstringYesThe model ID to use for chat completion. Format: namespace/model or namespace/model:provider. Examples: meta-llama/Llama-3.2-3B-Instruct, Qwen/Qwen2.5-7B-Instruct-1M.
messagesarrayYesA list of messages comprising the conversation so far. Each message has a role (system, user, assistant, tool) and content.
temperaturenumberNoSampling temperature between 0 and 2. Higher values like 0.8 make output more random, lower values like 0.2 make it more focused and deterministic.
max_tokensintegerNoThe maximum number of tokens that can be generated. If not specified, the model generates until a natural stopping point.
streambooleanNoWhether to stream the response as Server-Sent Events. If true, tokens are returned as they are generated.
toolsarrayNoA list of tools the model may call. Currently, only functions are supported.
top_pnumberNoNucleus sampling parameter. The model considers tokens comprising the top_p probability mass.
response_formatstringNoResponse format: text (default), json_object for JSON mode, or json_schema for structured output.
seedintegerNoRandom seed for deterministic sampling.
stoparrayNoUp to 4 sequences where the API will stop generating further tokens.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GENERATE_EMBEDDINGS

Tool to convert text into vector embeddings for feature extraction, semantic search, and similarity tasks. Use when you need numerical representations of text for ML applications.

NameTypeRequiredDescription
inputsarrayYesArray of text strings to convert into embeddings. Each string will be processed and returned as a numerical vector representation.
modelstringNoThe Hugging Face model ID to use for generating embeddings. Must be a valid embedding model from the Hugging Face model hub.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_REPO

Tool to create a new repository (model, dataset, or Space) on Hugging Face Hub. Use when you need to initialize a new repository for uploading models, datasets, or deploying Spaces applications.

NameTypeRequiredDescription
namestringYesThe name of the repository to create. This will be the repository identifier within the namespace.
typestringNoThe type of repository to create: model, dataset, or space. Defaults to model.
privatebooleanNoWhether the repository should be private. If not specified, follows the default visibility setting.
organizationstringNoThe organization namespace to create the repository under. If not provided, the repository will be created under your personal namespace.
sdkstringNoSDK options for Spaces: gradio, streamlit, docker, or static.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GET_MODEL_INFO

Tool to retrieve detailed information about a Hugging Face model repository. Use when you need comprehensive metadata including downloads, likes, tags, configuration, files, and more.

NameTypeRequiredDescription
repostringYesThe repository name of the model. For example, bert-base-uncased in google-bert/bert-base-uncased.
namespacestringYesThe namespace (organization or user) that owns the model repository. For example, google-bert in google-bert/bert-base-uncased.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_LIST_DATASETS

Tool to list datasets on the Hugging Face Hub. Use when you need to discover or search for datasets. Supports filtering by author, search query, tags, and sorting by various properties.

NameTypeRequiredDescription
searchstringNoFilter based on substrings for dataset names and their usernames. Use this to search for datasets by keyword.
authorstringNoFilter datasets by an author or organization.
filterstringNoFilter based on tags. Use this to find datasets with specific tags like task types, languages, or licenses.
sortstringNoSorting property: lastModified, trending, likes, or downloads.
limitintegerNoLimit the number of datasets returned. Defaults to 100.
cursorstringNoPagination cursor for fetching the next page of results.
directionstringNoSort direction: asc or desc.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_SEARCH_DATASET

Tool to search text in a dataset split on Hugging Face. Searches in columns of type string, even if values are nested in a dictionary. Use when you need to find specific text or patterns within a dataset’s content.

NameTypeRequiredDescription
datasetstringYesName of the dataset to search. Use format owner/dataset-name for user datasets or just dataset-name for official datasets.
configstringYesName of the configuration/subset of the dataset to search.
splitstringYesName of the dataset split to search.
querystringYesText to search for in the dataset. Searches in all columns of type string, even if values are nested in a dictionary.
lengthintegerNoLength of the slice (number of rows to return). Maximum value is 100.
offsetintegerNoOffset of the slice for pagination. Defaults to 0.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GET_DATASET_FIRST_ROWS

Tool to get the first 100 rows of a dataset split along with column data types and features. Use when you need to preview or sample dataset content.

NameTypeRequiredDescription
datasetstringYesName of the dataset in format namespace/name. For example, cornell-movie-review-data/rotten_tomatoes or squad.
configstringYesName of the dataset configuration/subset. Use default for datasets without configurations.
splitstringYesName of the dataset split to retrieve rows from.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GET_DATASET_INFO

Tool to get general information about a dataset including description, citation, homepage, license, and features (column schemas). Use when you need to understand dataset structure, available splits, and metadata before working with the data.

NameTypeRequiredDescription
datasetstringYesName of the dataset to retrieve information for. Format: namespace/repo-name (e.g., rajpurkar/squad, ibm/duorc).
configstringNoName of the config/subset to retrieve information for. If not provided, returns info for the default configuration.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_FILTER_DATASET_ROWS

Tool to filter rows from a dataset on Hugging Face based on specified criteria. Use when you need to retrieve specific rows from a dataset based on column conditions.

NameTypeRequiredDescription
wherestringYesFilter condition as SQL expression (e.g., column = 'value').
splitstringYesName of the dataset split.
configstringYesName of the dataset configuration/subset.
datasetstringYesName of the dataset in format namespace/name.
lengthintegerNoMaximum number of rows to return.
offsetintegerNoNumber of rows to skip for pagination.
orderbystringNoColumn to order results by.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GET_SPACE_INFO

Tool to retrieve detailed information about a Hugging Face Space repository. Use when you need metadata, SDK type, hardware configuration, runtime status, or other information about a specific Space.

NameTypeRequiredDescription
repo_idstringYesSpace repository ID in the format author/space-name (e.g., Qwen/Qwen3-TTS, stabilityai/stable-diffusion).
revisionstringNoGit revision (branch, tag, or commit SHA) to retrieve information for. If not specified, defaults to the main branch.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_LIST_SPACES

Tool to list Spaces on the Hugging Face Hub with filtering options. Use when you need to discover or search for ML demo applications hosted on Hugging Face.

NameTypeRequiredDescription
searchstringNoFilter based on substrings for repos and their usernames.
authorstringNoFilter spaces by a specific author or organization name.
filterstringNoFilter based on tags (e.g., gradio, streamlit).
sortstringNoProperty to use when sorting results: lastModified, likes, trending, or created.
limitintegerNoMaximum number of spaces to return. Must be between 1 and 500.
directionstringNoDirection to sort results: 1 for ascending or -1 for descending.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_LIST_ENDPOINTS

Tool to list Hugging Face Inference Endpoints for a specific user or organization. Use when you need to retrieve endpoints, optionally filtered by tags or name.

NameTypeRequiredDescription
namespacestringYesUser or organization name to list endpoints for.
searchstringNoFilter endpoints by name substring.
tagsstringNoFilter endpoints by tags (comma-separated).
limitintegerNoMaximum number of endpoints to return per page. Defaults to 20.
cursorstringNoPagination cursor to fetch the next or previous page of results.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_SEARCH_PAPERS

Tool to perform hybrid semantic/full-text search on papers in Hugging Face. Use when you need to find research papers by keywords, topics, or authors.

NameTypeRequiredDescription
qstringNoSearch query string to find relevant papers. Use keywords, paper titles, or topics. Supports hybrid semantic and full-text search.
limitintegerNoMaximum number of papers to return. If not specified, the API will use its default limit.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GET_DAILY_PAPERS

Tool to retrieve daily papers from Hugging Face. Use when you need to fetch the latest AI/ML research papers shared on Hugging Face.

NameTypeRequiredDescription
datestringNoFilter papers by specific date (YYYY-MM-DD format).
sortstringNoSort option for daily papers: publishedAt or trending.
limitintegerNoMaximum number of papers to return per page. Defaults to 50.
monthstringNoFilter papers by specific month (YYYY-MM format).
submitterstringNoFilter papers by submitter username.
pintegerNoPage number for pagination (0-indexed). Defaults to 0.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_SEARCH_DOCS

Tool to search Hugging Face documentation across all products and libraries. Use when you need to find information about HF tools, models, datasets, or API usage.

NameTypeRequiredDescription
qstringYesSearch query string to find relevant documentation pages. Use keywords related to the topic you want to learn about.
limitintegerNoMaximum number of search results to return. Defaults to 10.
offsetintegerNoNumber of results to skip for pagination.
productstringNoHugging Face product to filter documentation search (e.g., hub, transformers, diffusers, datasets, gradio).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GET_TRENDING

Tool to retrieve trending repositories from Hugging Face. Use when you need to discover popular models, datasets, or spaces that are currently trending on the platform.

NameTypeRequiredDescription
typestringNoRepository type filter: all, dataset, model, or space.
limitintegerNoMaximum number of trending repositories to return. Defaults to 10.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_GET_WHOAMI

Tool to get information about the authenticated Hugging Face user including username, email, organizations, and token details. Use when you need to identify the current user from an access token or retrieve user profile information.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_DISCUSSIONS

Tool to create a new discussion on a Hugging Face repository (model, dataset, or Space). Use when you need to start a conversation, report an issue, or create a pull request discussion.

NameTypeRequiredDescription
repostringYesThe name of the repository where the discussion will be created.
namespacestringYesThe namespace (username or organization) that owns the repository.
repo_typestringYesThe type of repository: models, spaces, or datasets.
titlestringYesThe title of the discussion. Must be between 3 and 200 characters.
descriptionstringYesThe description/content of the discussion. Can contain markdown formatting. Maximum 65536 characters.
pull_requestbooleanNoWhether this discussion should be created as a pull request.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_DISCUSSIONS_COMMENT

Tool to create a new comment on a Hugging Face repository discussion. Use when you need to add comments or replies to discussions on models, datasets, or spaces.

NameTypeRequiredDescription
repostringYesThe repository name where the discussion exists. For example, gpt2 or my-dataset.
namespacestringYesThe namespace (username or organization) that owns the repository.
repo_typestringYesThe type of repository: models, spaces, or datasets.
numstringYesThe discussion number or ID to comment on.
commentstringYesThe comment text to post on the discussion. Must be between 1 and 65536 characters.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CHANGE_DISCUSSIONS_STATUS

Tool to change the status of a Hugging Face repository discussion. Use when you need to open or close discussions on models, datasets, or spaces.

NameTypeRequiredDescription
numstringYesThe discussion number or ID to change the status of.
repostringYesThe repository name where the discussion exists. For example, bert-base-uncased or my-dataset.
namespacestringYesThe namespace (username or organization) that owns the repository.
repo_typestringYesThe type of repository: models, spaces, or datasets.
statusstringYesThe new status: open to reopen or closed to close.
commentstringNoOptional comment to add when changing the status.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_LIST_DISCUSSIONS

Tool to list all discussions from a Hugging Face repository. Use when you need to retrieve open, closed, or pull request discussions from a model, dataset, or Space.

NameTypeRequiredDescription
repostringYesThe repository name.
namespacestringYesThe namespace (username or organization) that owns the repository.
repo_typestringYesThe type of repository: models, spaces, or datasets.
statusstringNoFilter by discussion status: open, closed, or all.
typestringNoFilter by type: discussion or pull_request.
pintegerNoPage number for pagination (0-indexed).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_COLLECTION

Tool to create a new collection on Hugging Face. Use when you need to organize and curate models, datasets, spaces, papers, or other collections into a named collection.

NameTypeRequiredDescription
namespacestringYesThe namespace (username or organization) under which to create the collection.
titlestringYesThe title of the collection. Must be between 1 and 60 characters.
descriptionstringNoOptional description for the collection. Maximum 150 characters.
privatebooleanNoIf not provided, the collection will be public.
itemobjectNoItem to be added to the collection upon creation.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_LIST_COLLECTIONS

Tool to list collections on the Hugging Face Hub. Use when you need to discover collections of models, datasets, spaces, or papers. Collections are curated groups of repositories organized by users.

NameTypeRequiredDescription
ownerstringNoFilter collections by owner username or organization.
itemstringNoFilter collections containing a specific item (format: type/namespace/repo).
sortstringNoSorting criteria for collections.
limitintegerNoMaximum number of collections to return.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_LIST_REPO_TREE

Tool to list files and directories in a Hugging Face Hub repository. Use when you need to explore the structure of a model, dataset, or Space repository.

NameTypeRequiredDescription
repostringYesThe repository name.
namespacestringYesThe namespace (username or organization) that owns the repository.
repo_typestringYesThe type of repository: models, spaces, or datasets.
pathstringNoSpecific path within the repository to list. If omitted, lists the root.
revstringNoGit revision (branch, tag, or commit hash). Defaults to the main branch.
recursivebooleanNoWhether to list files recursively in subdirectories.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_DATASETS_COMMIT

Tool to create a commit in a Hugging Face dataset repository. Use when you need to add, update, or delete files in a dataset. Supports both regular files and Large File Storage (LFS) for large binary files.

NameTypeRequiredDescription
repostringYesThe name of the dataset repository.
namespacestringYesThe namespace (username or organization) that owns the dataset.
branchstringYesThe branch where the commit will be created.
commit_messagestringYesThe commit message (maximum 500 characters).
operationsarrayYesList of file operations to perform. Each operation specifies the file path and content.
create_prbooleanNoWhether to create a pull request instead of committing directly.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_MODELS_COMMIT

Tool to create a commit in a Hugging Face model repository. Use when you need to add, update, or delete model files. Supports LFS for large files such as model weights.

NameTypeRequiredDescription
repostringYesThe name of the model repository.
namespacestringYesThe namespace (username or organization) that owns the model.
branchstringYesThe branch where the commit will be created.
commit_messagestringYesThe commit message (maximum 500 characters).
operationsarrayYesList of file operations to perform.
create_prbooleanNoWhether to create a pull request instead of committing directly.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_SPACES_COMMIT

Tool to create a commit in a Hugging Face Space repository. Use when you need to add, update, or delete Space files. Optionally supports creating a pull request instead of a direct commit.

NameTypeRequiredDescription
repostringYesThe name of the Space repository.
namespacestringYesThe namespace (username or organization) that owns the Space.
branchstringYesThe branch where the commit will be created.
commit_messagestringYesThe commit message (maximum 500 characters).
operationsarrayYesList of file operations to perform.
create_prbooleanNoWhether to create a pull request instead of committing directly.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_LIST_NOTIFICATIONS

Tool to list notifications for the authenticated Hugging Face user. Use when you need to monitor activity on followed repositories, discussions, and pull requests.

NameTypeRequiredDescription
typestringNoFilter by notification type.
statusstringNoFilter by notification status: read or unread.
pintegerNoPage number for pagination (0-indexed).
limitintegerNoMaximum number of notifications to return.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_CREATE_OR_UPDATE_SPACE_SECRET

Tool to create or update a secret in a Hugging Face Space. Use when you need to manage sensitive environment variables such as API keys and tokens used by the Space.

NameTypeRequiredDescription
repostringYesThe name of the Space repository.
namespacestringYesThe namespace (username or organization) that owns the Space.
keystringYesThe name of the secret (key).
valuestringYesThe value of the secret.
descriptionstringNoOptional description for the secret.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

HUGGING_FACE_REQUEST_ACCESS

Tool to send an access request for a gated repository on Hugging Face. Use when you need to request access to restricted models or datasets.

NameTypeRequiredDescription
repostringYesThe name of the repository to request access to.
namespacestringYesThe namespace (username or organization) that owns the repository.
repo_typestringYesThe type of repository: models, datasets, or spaces.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.