Dialogflow Cx Nlu

v1.0.0

Manage intents and entity types in Google Dialogflow CX via REST API. Use for creating, updating, and managing natural language understanding components. Sup...

0· 299·0 current·0 all-time
byYash Kavaiya@yash-kavaiya
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The name/description match the provided code and docs: the SKILL.md and scripts/nlu.py implement listing, creating, updating, and deleting intents and entity types via Dialogflow CX APIs. Requesting Google Cloud credentials (gcloud access token or service account) is appropriate for this functionality. However, the registry metadata lists no required environment variables or primary credential even though the runtime instructions explicitly rely on Google authentication (gcloud token or GOOGLE_APPLICATION_CREDENTIALS).
Instruction Scope
SKILL.md gives concrete curl examples and a CLI usage for scripts/nlu.py that operate only against Dialogflow endpoints and local credential mechanisms (gcloud / service account file). The instructions do not ask the agent to read unrelated system files, send data to third-party endpoints, or perform other out-of-scope actions.
Install Mechanism
There is no install spec (instruction-only), and the included Python script simply recommends installing published packages (google-cloud-dialogflow-cx, google-auth) via pip. No remote downloads from untrusted URLs or archive extraction are present.
Credentials
The runtime legitimately requires Google Cloud credentials (gcloud access token or a service account JSON referenced by GOOGLE_APPLICATION_CREDENTIALS). Those credential requirements are proportional to the skill's purpose, but the skill metadata does not declare any required env vars or a primary credential—this mismatch could cause users to miss the fact that they must provide sensitive Google credentials and the required IAM permissions.
Persistence & Privilege
The skill does not request always: true, does not persist or modify other skills or system-wide settings, and has no install-time privileged operations. It runs as a user-invocable CLI and/or via the provided clients using the caller's Google credentials.
Assessment
This skill appears to do what it says — manage Dialogflow CX resources — and the included Python script uses the official google-cloud client libraries. Before installing or running it: 1) Be prepared to provide Google Cloud credentials (gcloud-authenticated access token or a service-account JSON) and grant the service account appropriate Dialogflow IAM roles only (least privilege). 2) Note the registry metadata does not declare these required credentials, so don't assume it will configure or request them automatically. 3) Inspect and run the script in a controlled environment (not with broad or production credentials) the first time to confirm behavior. 4) Ensure you trust the skill source before giving it access to any service-account JSON or long-lived tokens.

Like a lobster shell, security has layers — review code before you run it.

latestvk976xr1tk49kbp3e6fe8tm7915823sk6
299downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Dialogflow CX NLU

Manage intents and entity types in Google Dialogflow CX via REST API for natural language understanding.

Prerequisites

  • Google Cloud project with Dialogflow CX API enabled
  • Service account or OAuth credentials with Dialogflow API access
  • gcloud CLI authenticated OR bearer token

Authentication

Option 1: gcloud CLI (recommended)

gcloud auth application-default login
TOKEN=$(gcloud auth print-access-token)

Option 2: Service Account

export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
TOKEN=$(gcloud auth application-default print-access-token)

API Base URL

https://dialogflow.googleapis.com/v3beta1

Regional endpoints available:

  • https://{region}-dialogflow.googleapis.com (e.g., us-central1, europe-west1)

Common Operations

List Intents

curl -X GET \
  "https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/intents" \
  -H "Authorization: Bearer ${TOKEN}"

Create Intent

curl -X POST \
  "https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/intents" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "Book Flight",
    "trainingPhrases": [
      {
        "parts": [{"text": "I want to book a flight"}],
        "repeatCount": 1
      }
    ]
  }'

List Entity Types

curl -X GET \
  "https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/entityTypes" \
  -H "Authorization: Bearer ${TOKEN}"

Create Entity Type

curl -X POST \
  "https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/entityTypes" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "Cities",
    "kind": "KIND_LIST",
    "entities": [
      {"value": "New York"},
      {"value": "Los Angeles"}
    ]
  }'

Key Resources

ResourceDescription
IntentsClassify user utterances and extract parameters
Entity TypesDefine structured data extraction patterns

Quick Reference

For detailed API reference:

Scripts

  • scripts/nlu.py — CLI wrapper for intents and entity types operations

Usage

python scripts/nlu.py list-intents --agent AGENT_NAME
python scripts/nlu.py create-intent --agent AGENT_NAME --intent "Book Flight" --phrases "book a flight,I want to fly"
python scripts/nlu.py list-entities --agent AGENT_NAME
python scripts/nlu.py create-entity --agent AGENT_NAME --name "Cities" --values "New York,Los Angeles"

Tips

  • Use training phrases that cover various ways users might express the intent
  • Entity types can be system (built-in) or custom
  • Use KIND_MAP for entities with synonyms, KIND_LIST for simple lists

Comments

Loading comments...