---
sourceDocument: Australia Enable AI
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/intelligent-experiences

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Enable AI

ft:clusterId :

    - platai

bundleId :

    - platai

workflow :

    - Platform


---

# Hugging Face

# AI Service Graph Connector for Hugging Face {#ariaid-title1}

Release version: Australia  
Updated April 30, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of AI Service Graph Connector for Hugging Face

The AI Service Graph Connector for Hugging Face enables ServiceNow customers to discover and import AI assets from their Hugging Face environments into ServiceNow Control Tower.
This integration catalogs AI systems, agents, models, prompts, and tools by analyzing Hugging Face Spaces, automating the collection of usage data for enhanced visibility and governance of AI operations.
Show full answer Show less  

## Key Features

* **Discovery of AI Assets:** Identifies AI systems, models, agents, tools, and prompt templates by analyzing Python code within Hugging Face Spaces using pattern matching.
* **Incremental Updates:** Processes only spaces modified since the last import, ensuring efficient and up-to-date discovery.
* **Data Integration:** Maps discovered AI assets into ServiceNow staging and target CMDB tables for comprehensive asset management.
* **Governance and Visibility:** Usage data is automatically collected and populated into ServiceNow Control Tower's value dashboard.
* **Supported ServiceNow Versions:** Australia and Zurich releases are supported.

## Prerequisites

* **ServiceNow Setup:** Assign required roles (snaidisc.discoveryadmin or sncmdbintutil.sgcadmin), update data source access permissions, and clear cache using background scripts during initial configuration.
* **Hugging Face Setup:** Have a Hugging Face account and generate API tokens for connection.

## Discovery Scope and Process

The connector discovers AI components from Hugging Face Spaces by:

* **Space Discovery:** Identifies Spaces based on organization membership or public visibility.
* **Code Analysis:** Downloads and analyzes Python files within each Space.
* **Pattern Matching:** Detects AI agents, models, tools, and prompt templates.
* **Relationship Mapping:** Links AI systems with their subcomponents (models, tools, prompts).

## Data Mapping and Target Tables

Discovered AI assets are imported through staging tables into the following key ServiceNow target tables:

* **AI Systems:** almaisystemdigitalasset
* **AI Models:** almaimodeldigitalasset
* **AI Prompts:** almaipromptdigitalasset
* **AI Tools:** snentaitool
* **Relationships between AI Systems and Components:** snentaisystemsubcomponentm2m

## Data Flow Architecture

The connector follows a structured data flow:

* **Data Source:** Calls Hugging Face APIs to identify relevant Spaces.
* **Staging Tables:** Raw discovery data is loaded for processing.
* **Transform Maps:** Data is validated and mapped to target schemas.
* **Target Tables:** Cleaned data is inserted into ServiceNow CMDB tables for use in governance and visibility.

## Additional Notes

Currently, the connector focuses on discovery of AI assets. Usage and execution tracking features may be introduced in future releases.  
The AI Service Graph Connector for Hugging Face enables you to discover and import AI assets from your Hugging Face environment into ServiceNow Control Tower.

The connector integrates with your Hugging Face account to catalog AI systems, agents, models, and prompts from Hugging Face Spaces. Usage data is automatically collected and populated into the Control Tower value dashboard, providing comprehensive visibility and governance of your AI operations.

## Download apps from the Store {#ai-service-graph-connector-for-hugging-face__section_wds_dhj_m3c}

Visit the ServiceNow store website to download the [AI Service Graph Connector for Hugging Face](https://store.servicenow.com/store/app/201bf3c397c04310f17933e11153af96) application.

## Supported ServiceNow versions {#ai-service-graph-connector-for-hugging-face__section_czc_fhj_m3c}

{#ai-service-graph-connector-for-hugging-face__table_iqv_hss_mjc__entry__2}

| Release | Status |
|-|-|
| Australia | Supported |
| Zurich | Supported |
[ ]

{#ai-service-graph-connector-for-hugging-face__table_iqv_hss_mjc}

## User Roles {#ai-service-graph-connector-for-hugging-face__section_c33_hhj_m3c}

You must have one of the following roles assigned.
{#ai-service-graph-connector-for-hugging-face__section_c33_hhj_m3c__entry__1}

| Required Roles |
|-|
| sn_ai_disc.discovery_admin |
| sn_cmdb_int_util.sgc_admin |
[ ]

## ServiceNow Prerequisites {#ai-service-graph-connector-for-hugging-face__section_xq1_gvt_ljc}

Complete the following setup steps once when configuring the connector for the first time.  
Note:  
Updating data source access and clear cache is a prerequisite that needs to be completed only once, when setting up a new instance for the first time.
Update Data Source Access:

The connector requires write permissions to the Data Source table to create data sources.  
To enable data source creation:

1. Select Global from the application picker.
2. Navigate to Application Access.
3. Select the Can create, Can update, and Can delete check boxes.
4. Select Update.
5. Switch to the connector application scope.
{#ai-service-graph-connector-for-hugging-face__ol_sgt_yts_mjc}

Clear the cached data for the Data Source and Tables.  
To clear the cache:

1. Navigate to System DefinitionBackground Scripts.
2. Enter the following script in the Run Script text box:

       GlideTableManager.invalidateTable('sys_data_source');
       GlideCacheManager.flushTable('sys_data_source');
       GlideTableManager.invalidateTable('sys_db_object');
       GlideCacheManager.flushTable('sys_db_object');

3. Select Run Script.  
   Note:  
   The script might take several minutes to complete. After completion, switch to the connector application scope.
{#ai-service-graph-connector-for-hugging-face__ol_hbc_mq2_wjc}

## Hugging Face Prerequisites {#ai-service-graph-connector-for-hugging-face__section_g45_syj_cjc}

Complete the following steps in your Hugging Face environment before creating a connection.  
* Hugging Face account (If you don't have a Hugging Face account, create one at https://huggingface.co).
* Generate API Tokens.
{#ai-service-graph-connector-for-hugging-face__ul_d4f_jzj_cjc}

## Discovery Scope {#ai-service-graph-connector-for-hugging-face__section_kr5_lzj_cjc}

The Hugging Face connector discovers AI components from Hugging Face Spaces by analyzing Python files using pattern matching. The following AI asset types are identified during discovery:

|-|-|
| Asset Type | Description |
| AI Agents/Systems | Applications and agent implementations identified in Space code. |
| AI Models | Language models, embeddings, and other ML models referenced in code. |
| AI Tools | Function definitions and tool implementations. |
| AI Prompts | Prompt templates and configuration strings. |
[ ]

The discovery process follows these stages:

* Space Discovery -- Identifies Hugging Face Spaces based on organization membership or public visibility.
* Code Analysis -- Downloads and analyzes Python files from each Space.
* Pattern Matching -- Identifies these components:
  * Agent implementations (for example, LangChain agents, custom frameworks).
  * Model references (for example, model_id parameters, API calls).
  * Tool definitions (for example, function decorators, tool classes).
  * Prompt templates (for example, PromptTemplate, string templates).
  {#ai-service-graph-connector-for-hugging-face__ul_e3l_rzr_djc}
* Relationship Mapping -- Links AI systems to their sub-components such as models, tools, and prompts.
* Incremental Updates -- Processes only Spaces modified since the last successful import.

Note:  
The connector performs incremental discovery, only processing spaces that have been modified since it's last successful import.

## Data Mapping {#ai-service-graph-connector-for-hugging-face__ai-service-graph-connector-for-hugging-face-data-sources}

The connector maps Hugging Face AI assets to ServiceNow staging tables and target CMDB tables for comprehensive asset management.
{#ai-service-graph-connector-for-hugging-face__ai-service-graph-connector-for-hugging-face-data-sources__entry__4}

| Data Source | Staging Table | Target Table | Description |
|-|-|-|-|
| SG-HuggingFace-Discovery | sn_ai_hf_disc_ai_discovery_staging | Parent data source | Discovers HuggingFace Spaces and feeds other staging tables |
| SG-HuggingFace-System | sn_ai_hf_disc_ai_system_staging | alm_ai_system_digital_asset | Imports AI systems and applications |
| SG-HuggingFace-Model | sn_ai_hf_disc_ai_model_staging | alm_ai_model_digital_asset | Imports AI models and embeddings |
| SG-HuggingFace-Prompt | sn_ai_hf_disc_ai_prompt_staging | alm_ai_prompt_digital_asset | Imports prompt templates |
| SG-HuggingFace-Tool | sn_ai_hf_disc_ai_tool_staging | sn_ent_ai_tool | Imports tool and function definitions |
| SG-HuggingFace-SubComponents M2M | sn_ai_hf_disc_ai_m2m_staging | sn_ent_ai_system_subcomponent_m2m | Imports relationships between AI systems and their components |
[ ]

## Target Tables {#ai-service-graph-connector-for-hugging-face__target-tables}

The Hugging Face connector populates the following target tables in ServiceNow.

Digital Asset Tables:

* alm_ai_system_digital_asset -- Stores AI System digital assets discovered from Hugging Face Spaces.
* alm_ai_model_digital_asset -- Stores AI Model digital assets including language models and embeddings.
* alm_ai_prompt_digital_asset -- Stores AI Prompt digital assets including prompt templates and configurations.

Entity Tables:

* sn_ent_ai_tool: Stores AI Tools including function definitions and tool implementations.
* sn_ent_ai_system_subcomponent_m2m: Stores many-to-many relationships between AI systems and their subcomponents (models, tools, prompts).

Note:  
The Hugging Face connector currently focuses on discovery of AI assets. Usage and execution tracking capabilities may be added in future versions.

## Data Flow Architecture {#ai-service-graph-connector-for-hugging-face__additional-information}

The Hugging Face connector follows this data flow:

|-|-|
| Stage | Description |
| Data Source | The connector calls Hugging Face APIs to discover Spaces based on organization or public visibility settings. |
| Staging Tables | Raw data is loaded into import set staging tables for processing. |
| Transform Maps | Data is transformed, validated, and mapped to target table schema. |
| Target Tables | Cleaned and structured data is inserted into the final destination tables in the ServiceNow CMDB. |
[ ]

*[\>]: and then


