Query the Google Analytics 4 public dataset using AILANG — with contract-verified SQL generation, capability budgets, and ADC authentication.
The React dev UI — contract-verified SQL generation with live BigQuery results
Clone the repo and run the BigQuery demo with your GCP credentials:
The demo queries the public GA4 ecommerce dataset on BigQuery. Your GCP project is auto-detected from gcloud config and used for job billing only — the dataset itself is public.
Serve all AILANG modules as a REST API with auto-generated OpenAPI, MCP, and A2A endpoints — zero code changes required:
Every export func becomes a POST endpoint. All protocol endpoints are auto-generated from the same AILANG source.
ReDoc — auto-generated from AILANG’s Hindley-Milner type signatures
| Protocol | Endpoint | Description |
|---|---|---|
| MCP | POST /mcp/ | MCP Streamable HTTP (tools/list, tools/call) |
| A2A | POST /a2a/ | Agent-to-Agent JSON-RPC task execution |
| A2A | GET /.well-known/agent.json | A2A Agent Card (37 skills) |
| REST | POST /api/{module}/{func} | Direct function invocation |
Add AILANG as an MCP server in Claude Desktop, Cursor, or any MCP client:
Use --mcp for stdio transport (Claude Desktop) or --mcp-http for HTTP transport (remote clients). All 37 exported functions appear as MCP tools with auto-generated JSON Schema from AILANG types.
| Function | Description | Args |
|---|---|---|
| topEventsQuery | Top events by count | limit: int |
| eventCountsByDateQuery | Event counts for date range | start, end: string |
| eventTrendQuery | Single event trend over time | eventName: string |
| topProductsByRevenueQuery | Top products by revenue | limit: int |
| revenueByCategoryQuery | Revenue by product category | — |
| purchaseFunnelQuery | View → cart → checkout → purchase | — |
| topCategoriesByViewsQuery | Top categories by page views | limit: int |
| deviceBreakdownQuery | Users by device type | — |
| geoDistributionQuery | Users by country | limit: int |
| browserBreakdownQuery | Users by browser | — |
| sessionMetricsQuery | Users, events, sessions, purchases | — |
| dailySummaryQuery | Daily summary with key metrics | start, end: string |
You need AILANG installed and GCP credentials configured:
Dataset: bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*
Source: github.com/sunholo-data/ailang-demos/tree/main/ecommerce