bigquery-conversational-agent-builder

Architects and validates BigQuery Conversational Analytics Data Agents with property graph grounding and A2A federation.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill bigquery-conversational-agent-builder-ricardolui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bigquery-conversational-agent-builder
Source: https://github.com/ricardolui/gcp-custom-agent-skills/tree/main/bigquery-conversational-agent-builder
Command: npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill bigquery-conversational-agent-builder-ricardolui

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building BigQuery Conversational Analytics Data Agents involves complex API payloads, property graph grounding rules, Enterprise reservation requirements, and OAuth federation with Gemini Enterprise, where misconfigurations cause cryptic 400 errors and hallucinated queries. ## Core Features & Use Cases - Graph-First Agent Provisioning: Auto-discovers BigQuery Property Graphs via INFORMATION_SCHEMA, enforces topological profiling rules, and binds them as datasourceReferences with AGG measure semantics. - Golden Queries Pipeline: Generates up to 10 verified query archetypes (rankings, time series, multi-hop traversals) with BigQuery dry-run validation and Gemini-based auto-healing of compiler errors. - A2A Federation & Validation: Registers agents in Gemini Enterprise Discovery Engine with strict 1:1 OAuth 2.0 authorizations, and validates payloads offline using the included Python validator script. - Use Case: A data engineer needs to expose a procurement property graph as a conversational agent in Gemini Enterprise; this skill guides reservation pre-flight checks, agent creation, golden query verification, and Discovery Engine registration end to end. ## Quick Start Ask the agent to create a BigQuery Conversational Data Agent grounded on your dataset's property graph, generate and dry-run validate ten golden queries, then register it in Gemini Enterprise with a dedicated OAuth authorization.

Frequently Asked Questions about bigquery-conversational-agent-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a BigQuery Conversational Analytics Data Agent?

Create a Data Agent by POSTing to geminidataanalytics.googleapis.com with a publishedContext containing datasourceReferences, a systemInstruction, and exampleQueries. Prefer propertyGraphReferences over tableReferences, and include the label published_context set to true.

How do I ground a conversational agent on a BigQuery Property Graph?

Query INFORMATION_SCHEMA.PROPERTY_GRAPHS in your dataset to discover existing graphs, then bind them via datasourceReferences.bq.propertyGraphReferences. Golden queries should use GRAPH_EXPAND with AGG(measure_name) to prevent fan-out overcounting across N:M edge joins.

Why does agent creation fail with a 400 error when using propertyGraphReferences?

BigQuery requires an active Enterprise or Enterprise Plus reservation assignment to compile GRAPH_TABLE queries, which the API dry-runs internally during validation. Create an Enterprise reservation with bq mk and assign QUERY jobs to it before registering the graph.

How do I register a BigQuery data agent in Gemini Enterprise Discovery Engine?

Register the agent under the default_assistant agents collection with state ENABLED, sharingConfig scope ALL_USERS, and an a2aAgentDefinition containing the JSON agent card. Each agent needs its own dedicated OAuth 2.0 authorization resource referenced by numeric project number.

Why does Discovery Engine reject my authorization resource?

Discovery Engine enforces a strict 1:1 relationship between agents and authorization resources, so sharing one authorization across agents returns a FAILED_PRECONDITION error. Generate a unique authorization ID per agent and use the numeric project number in the resource path.

What are the limitations of BigQuery conversational agents?

The API is strictly read-only, blocking DDL and DML, and queries execute under the end user's IAM identity rather than the agent's. Agents support a maximum of 10 golden queries, and deleted agents enter a 30-day soft-deletion period requiring a new unique agent ID.