canonical: https://jentic.com/apis/googleapis.com/dialogflow

# Google Dialogflow API

Google Dialogflow is a conversational AI platform for building chatbots, voice bots, and IVR experiences. The CX (v3) API exposes agents, flows, pages, intents, entity types, webhooks, and test cases so teams can author, version, and continuously evaluate sophisticated multi-turn conversations programmatically. It powers contact-center automation, virtual agents, and voice assistants integrated with telephony providers and websites.

## For AI agents

Build, test, and operate conversational AI agents - flows, intents, entities, and test cases - for chatbots and voice bots.

## Scope

Does not handle large language model fine-tuning, raw audio streaming, or contact-center routing - use for Dialogflow CX conversational agent authoring and testing only.

## Capabilities

- Author Dialogflow CX agents with structured flows and pages
- Define intents and entity types for natural language understanding
- Run conversational test cases and calculate intent coverage
- Configure webhooks for fulfillment from external services
- Deploy agents across environments (draft, staging, production)
- Compare agent versions to surface regression risks before deploy

## Use cases

### Programmatic Agent Authoring

Engineering teams use the CX API to define agents in code rather than the console - versioning flows, pages, and intents in Git. The agents.create endpoint provisions the shell, then flows.create, pages.create, and intents.create populate the conversational graph. CI pipelines push agent updates and run testCases:calculateCoverage before merging.

Example prompt: Create a Dialogflow CX agent named SupportBot in location us-central1, then create one flow named Triage with two pages and three intents.

### Continuous Conversation Testing

Run regression tests against a Dialogflow agent before each deploy. Use environments:runContinuousTest to execute every test case against the latest version, and testCases:calculateCoverage to verify intents and transitions are exercised. Gating deploys on coverage thresholds prevents conversation regressions.

Example prompt: Run continuous tests on environment staging for agent SupportBot, then calculate intent coverage and fail the build if coverage is below 0.8.

### Version Comparison Before Deploy

Before promoting a new flow version, call versions:compareVersions to surface what changed in the conversational graph. Reviewers see added or removed intents, transition changes, and response differences side-by-side. The compare output drives change-management approvals.

Example prompt: Compare version 5 against version 4 of flow Triage in agent SupportBot and return a summary of added or modified intents.

### Agent-Driven Conversation QA

Through Jentic, an AI agent can search for the runContinuousTest operation, kick it off against a target environment, and summarise failing test cases for a human reviewer. The agent operates with scoped Dialogflow OAuth credentials managed in your Jentic One instance.

Example prompt: Use Jentic to search 'run Dialogflow continuous tests', load the schema, and execute environments:runContinuousTest for environment staging, then list failed test case names.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v3/{+name} | Get a Dialogflow resource (agent, flow, page, intent) by name |
| POST | /v3/{+agent}/testCases:calculateCoverage | Calculate test case coverage for an agent |
| POST | /v3/{+environment}:runContinuousTest | Run continuous test cases against an environment |
| POST | /v3/{+environment}:deployFlow | Deploy a flow version to an environment |
| POST | /v3/{+baseVersion}:compareVersions | Compare two versions of a flow |

## Key resources

- **agents** — Create, list, and manage Dialogflow CX agents
- **flows** — Define top-level conversational flows within an agent
- **pages** — Configure dialog states and transitions inside flows
- **intents** — Manage NLU intents and training phrases
- **entityTypes** — Define entity types for parameter extraction
- **testCases** — Author and execute conversation regression tests
- **environments** — Promote agent versions across draft, staging, and production

## Why Jentic

- **Setup:** Wiring the Dialogflow API by hand means standing up Google OAuth2 with the right scopes, targeting dialogflow.googleapis.com, and building the resource-path calls yourself for CX agents, environments, and test cases. Through Jentic you install once, import the Dialogflow API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** Dialogflow puts the resource name in the URL path (/v3/{+agent}, /v3/{+environment}), so a rule can pin your agent to one agent or environment: it can run continuous tests and calculate coverage there and nothing else. You choose the operations it may call, so state-changing ones like deployFlow are not included unless you add them.
- **Credential handling:** Your Google OAuth credential for Dialogflow is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run Dialogflow CX regression tests' or 'compare agent versions', and Jentic returns the matching Dialogflow operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Cloud Speech-to-Text API** — Transcribe audio that feeds into Dialogflow intent detection
- **Cloud Translation API** — Translate user input or bot responses to support multilingual agents
- **Discovery Engine API** — Vertex AI Search and conversation grounded in your data - newer than Dialogflow

## FAQ

### What authentication does the Dialogflow API use?

OAuth 2.0 with the cloud-platform and dialogflow scopes. Through Jentic, OAuth tokens are scoped per agent run and stored encrypted in your Jentic One instance, so service-account JSON keys never enter the agent runtime.

### Can I run regression tests on a Dialogflow agent via the API?

Yes. The environments:runContinuousTest endpoint executes all test cases against an agent environment, and testCases:calculateCoverage returns intent and transition coverage so you can gate CI on threshold.

### What are the rate limits for the Dialogflow API?

Dialogflow CX enforces per-project quotas: design-time edit operations are limited to 60 per minute per agent, runtime detect-intent calls scale with quota request. Check current quotas in the Google Cloud Console under APIs and Services.

### How do I compare two Dialogflow versions through Jentic?

Search 'compare Dialogflow versions', load the schema for v3:compareVersions, then execute it with the base and target version names. Jentic returns the diff payload.

### Does Dialogflow API v3 support voice and telephony?

Yes. CX agents can be wired to Google Cloud Telephony or third-party SIP providers, with speech recognition and text-to-speech configured per flow. The API manages the agent definition; runtime audio is handled at the integration layer.

### Is the Dialogflow API free?

Dialogflow CX has a paid pricing model based on requests per session-minute, with separate rates for text and audio. Dialogflow ES (v2) is generally cheaper but less capable. Check current pricing in the Google Cloud Console.

### Can I limit what my agent is allowed to do with the Dialogflow API?

Yes. Because Dialogflow puts the resource name in the URL path (/v3/{+agent} and /v3/{+environment}), your self-hosted Jentic One instance lets you write rules that pin the agent to a single agent or environment, so it can run continuous tests and calculate test coverage there and nothing else. You decide which operations it may call, so state-changing calls like deployFlow are not included unless you explicitly add them. Because Jentic One is self-hosted, your own rules and stored OAuth credential govern every operation the agent runs.
