ask·the·logsagent

Talk to the logs. AI agent using Google Agents Development Kit (ADK) and Gemini to query BigQuery datasets via natural language across the entire Glomar sensor ecosystem.

Cognitive Synthesis Over Fused Sensor Telemetry

ask-the-logs represents the cognitive peak of the Glomar stack. When paired with the 11 sensor pipelines—from USB scanner serial hits to LoRa mesh packets and Mirkwood cross-channel joins—it swaps domain-specific system prompts into Gemini at session start, converting plain English queries directly into valid BigQuery Standard SQL.

01 · query execution pipeline

Every query routes through Google ADK's LlmAgent with BigQuery toolsets. The agent retains full conversational context across follow-ups and supports dynamic source swapping:

ANALYST QUERY "Show P25 calls within 5m of an ADS-B surveillance orbit" GOOGLE ADK + GEMINI Injects domain prompt from sources.py Encodes schema & JSON_VALUE rules BIGQUERY EXEC Runs Standard SQL Partition & cluster pruning STREAMED SSE SYNTHESIS (/api/query) • Formats data into clear narrative tables and timelines • Highlights epistemic cautions (is_evidence: false) • Retains multi-turn conversation memory for follow-ups
Figure 1: Cognitive translation pipeline from natural language to BigQuery Standard SQL.

02 · two-tier lakehouse schema design

ask-the-logs maps the Glomar ecosystem into two distinct architectural tiers:

TIER 1: NATIVE PER-SOURCE TABLES • scanner.hits — BCD325 GLG 13-field CSV • meshnarc.packets — Protobuf LoRa telemetry • p25_control.events — TSBK/TDULC CC decodes • adsb.transponders — Mode-S DF17 frames • lte_sigint.lte_captures — DCI / IMSI • sip_cdr.calls — Pocket-Dial VoIP CDRs High fidelity · Source-specific fields TIER 2: MIRKWOOD UNIFIED TABLE Table: mirkwood.emission_events • SHA-256 device_fingerprint • channel_type: P25 | MESH | BLE | WIFI | LTE • ST_DISTANCE geospatial correlation • JSON_VALUE metadata & tags array Cross-channel joins · Spatiotemporal fusion
Figure 2: Two-tier data warehouse topology separating native sensor streams from unified correlation.

03 · supported log sources catalog

Source Key Display Name Origin Repo Dataset
mirkwood Mirkwood — All Sources (Cross-Channel) deanon-demo mirkwood
scanner_rf BCD325P2 Scanner RF Hits bcd325-dashboard / splunk-addon scanner
adsb ADS-B Aviation Transponders synthetic sentinel-node-demo adsb
meshtastic Meshtastic LoRa Mesh meshtap meshnarc
p25_control P25 Control Channel Messages p25-trunk-logger p25_control
ble_scan BLE Device Sightings mockingbird-scrivener ble_scan
wifi_wardrive WiFi & BT Wardriving wigle-wardriver / rfparty wardrive
wifi_attacks 802.11 Deauth Alerts deauth-detector wifi_attacks
lora_sweep LoRa RF Parameter Sweeps lora-rf-toolkit lora_rf
sip_voip SIP Call Detail Records pocket-dial sip_cdr
lte_cellular LTE / IMSI-Catcher Alerts synthetic Rayhunter / deanon-demo lte_sigint

04 · interactive query simulator

Select an example query below to inspect how ask-the-logs injects domain prompt schema rules and constructs BigQuery SQL:

SELECT SAMPLE ANALYST QUERY:
Ready. Select a query to view agent SQL generation and analytical synthesis...

05 · synthetic boundaries & cost controls

To prevent operational abuse and uncontrolled compute spend:

Frequently asked questions

What is ask-the-logs?

A natural-language interface to BigQuery. You ask a question in plain English. A Google Agent Development Kit agent with Gemini turns it into SQL, runs it, and explains the result.

What do I need to run it?

Python dependencies from requirements.txt, a Google API key, an OAuth 2.0 web client ID, and BigQuery permissions on your datasets. The .env.example file explains where to get each one. Start the server with uvicorn on port 8000 and open it in a browser.

Does it cost anything to use?

Query cost depends on how much data each query scans. The README advises adding a time filter on partitioned tables to keep costs down.

Can I add my own dataset?

Yes. Each source is one entry in sources.py, with a domain prompt that describes its schema and vocabulary, a suggested dataset, and example questions. The agent loads that prompt at session start.

Is the sample data real?

Some of it isn't. The README says which sources are synthetic, and that real captures from some tools need their own hardware.