Install
openclaw skills install dialogflow-cx-conversationsManage conversations and sessions in Google Dialogflow CX via REST API. Use for testing intents, handling user interactions, and managing conversation state....
openclaw skills install dialogflow-cx-conversationsManage conversations and sessions in Google Dialogflow CX via REST API for testing and interaction handling.
gcloud CLI authenticated OR bearer tokengcloud auth application-default login
TOKEN=$(gcloud auth print-access-token)
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
TOKEN=$(gcloud auth application-default print-access-token)
https://dialogflow.googleapis.com/v3beta1
Regional endpoints available:
https://{region}-dialogflow.googleapis.com (e.g., us-central1, europe-west1)curl -X POST \
"https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/sessions/${SESSION_ID}:detectIntent" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"queryInput": {
"text": {
"text": "Hello"
},
"languageCode": "en"
}
}'
curl -X POST \
"https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/sessions/${SESSION_ID}:matchIntent" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"queryInput": {
"text": {
"text": "Hello"
},
"languageCode": "en"
}
}'
curl -X POST \
"https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/testCases" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Greeting Test",
"testCaseConversationTurns": [
{
"userInput": {
"input": {
"text": {
"text": "Hi"
}
}
},
"virtualAgentOutput": {
"textResponses": [
{
"text": ["Hello!"]
}
]
}
}
]
}'
| Resource | Description |
|---|---|
| Sessions | Conversation instances with state |
| Detect Intent | Process user input and get responses |
| Test Cases | Automated conversation testing |
For detailed API reference:
scripts/conversations.py — CLI wrapper for conversation operationspython scripts/conversations.py detect-intent --agent AGENT_NAME --text "Hello"
python scripts/conversations.py match-intent --agent AGENT_NAME --text "Hello"