---
title: "How we built an AI agent you can trust with your production tables"
description: "ClickHouse Cloud's Schema Advisor, now in Private Preview, splits schema changes into three parts."
url: "https://swe.quest/articles/how-we-built-an-ai-agent-you-can-trust-with-your-production-tables-dac29fe4df9c3adc"
canonical: "https://clickhouse.com/blog/how-we-built-an-ai-agent-you-can-trust-with-your-production-tables"
source: "ClickHouse"
published: "2026-11-30"
difficulty: "easy"
kind: "Announcement"
reading_minutes: 7
tags: ["schema-migrations","ai-agents","analytics","llms"]
---

# How we built an AI agent you can trust with your production tables

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-11-30, 7 min read, Announcement. Original: [https://clickhouse.com/blog/how-we-built-an-ai-agent-you-can-trust-with-your-production-tables](https://clickhouse.com/blog/how-we-built-an-ai-agent-you-can-trust-with-your-production-tables)

## Summary

ClickHouse Cloud's Schema Advisor, now in Private Preview, splits schema changes into three parts. Deterministic tests over query logs produce the recommendations, an LLM drafts the migration plan, and a Temporal durable workflow executes templated SQL, so the AI never runs statements against production. Impact analysis replays a table's most frequent queries against a sampled baseline and a candidate table, either in place or in an ephemeral service restored from backup, and compares query time, rows scanned and data read. Rebuild-type changes such as ORDER BY or primary key edits use create-migrate-audit plus EXCHANGE TABLES for zero downtime, but are not yet supported for large, continuously ingesting tables or tables with materialized views.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- ClickHouse ORDER BY and primary keys ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- schema migrations ([easy posts on Schema migrations](https://swe.quest/tags/schema-migrations.md?difficulty=easy))

## Keywords

ClickHouse Cloud, Schema Advisor, Temporal, Langfuse, Amazon Bedrock, EXCHANGE TABLES

## Related posts

- [clickhouse.build: An agentic CLI to accelerate Postgres apps with ClickHouse](https://swe.quest/articles/clickhouse-build-an-agentic-cli-to-accelerate-postgres-apps-with-clickhouse-a4f92c15e2d9b3be.md): ClickHouse · 2025-12-02 · Medium · 9 min read · AI agents, Analytics & OLAP, PostgreSQL, TypeScript, AI for coding
  clickhouse.build is an open source agentic CLI that adds ClickHouse to Postgres-backed TypeScript apps for analytical queries while leaving transactional work in Postgres.
- [AI doesn’t always generate perfect ClickHouse schemas (yet)](https://swe.quest/articles/ai-doesn-t-always-generate-perfect-clickhouse-schemas-yet-fd8dcf025b9d0fa8.md): ClickHouse · 2026-03-13 · Medium · 10 min read · Analytics & OLAP, Databases, LLMs, Performance engineering
  LLM-generated ClickHouse schemas tend to over-optimize from day one with custom partitioning, per-column codecs, projections and materialized views that can hurt at production scale.
- [Manage your ClickHouse Schema-as-Code using Atlas](https://swe.quest/articles/manage-your-clickhouse-schema-as-code-using-atlas-070df0988d803e6b.md): ClickHouse · 2024-03-12 · Medium · 5 min read · Schema migrations, Analytics & OLAP, Infrastructure as code, Developer tools
  Atlas, an open-core Database Schema-as-Code tool, now supports ClickHouse, letting engineers declare the desired schema in a SQL file and have the tool inspect the live database, diff it, and generate the DDL migration plan automatically.
- [An API to Track Database Schema Changes](https://swe.quest/articles/an-api-to-track-database-schema-changes-48247d0f7925f89f.md): Neon · 2025-01-09 · Medium · 4 min read · PostgreSQL, Schema migrations, API design, CI/CD, AI agents
  Neon's Schema Diff feature now has a \`compare\_schema\` API endpoint, available on all plans, that takes two Neon branch IDs and returns a unified diff of their Postgres schemas.
- [How Suprema Gaming made its data platform agent-ready with ClickHouse Cloud](https://swe.quest/articles/how-suprema-gaming-made-its-data-platform-agent-ready-with-clickhouse-cloud-456ba316ef057ccc.md): ClickHouse · 2026-08-25 · Medium · 11 min read · Analytics & OLAP, Data pipelines, AI agents, Games
  Suprema Gaming moved its analytics warehouse from Snowflake to ClickHouse Cloud so that AI agents could query fresh, governed data directly.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
