Agentic coding with ClickHouse. One person, one data stack, one full-stack application
A ClickHouse Solutions Architect with no frontend or backend background built ClickShop, a full-stack retail analytics demo, in a couple of days using Cursor. The stack uses Next.js on Vercel with per-persona workspaces, PostgreSQL for transactions synced to ClickHouse via ClickPipes CDC, and a Bronze/Silver/Gold medallion layout built on materialized views. On top sit 18 LibreChat agents, plus two observability layers: Langfuse for LLM tracing and cost, and ClickStack over OpenTelemetry for infrastructure. Open source components, Cursor skills and MCP database connectors reduce AI guesswork, though iteration, review and token costs remain significant.
Related posts
- clickhouse.build: An agentic CLI to accelerate Postgres apps with ClickHouse
ClickHouse mediumAdept
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. A scanner agent finds analytical queries in raw SQL, Prisma or Drizzle code. A data migrator then generates ClickPipes Postgres CDC API calls to sync the needed tables. A code migrator, checked by a QA sub-agent against reference codebases, rewrites queries behind a strategy pattern toggled by a USE_CLICKHOUSE feature flag. The workflow keeps a human in the loop to approve each change and aims to produce a backwards-compatible proof of concept in under an hour.
- Building an agentic app with ClickHouse MCP and CopilotKit
ClickHouse mediumAdept
A natural-language analytics dashboard for UK property prices can be built by combining an LLM (Claude Sonnet 3.7), the ClickHouse MCP Server and CopilotKit in a Next.js app. The LLM turns a prompt into SQL, CopilotKit's MCP client runs it against ClickHouse over SSE, and the model then calls a `generateChart` action defined with `useCopilotAction` to render the result via ECharts. The walkthrough covers swapping in the Anthropic adapter, running the MCP server with fastmcp, and sharing chart state with `useCopilotReadable`. It recommends a read-only ClickHouse user with restricted databases, quotas and a limited settings profile so the model cannot reach data or run queries beyond what is intended.
- How Fetch built its flexible agentic analytics tool on ClickHouse Cloud
ClickHouse easyNovice
Fetch built FAST, a conversational BI agent that lets non-technical sales teams query receipt purchase data in plain language, on ClickHouse Cloud ingesting 150 billion rows (6.5 TB compressed) a day. Ad hoc queries such as same-receipt basket intersections scan hundreds of millions of rows in under a second, and median agent response time is 1.9 seconds across about 500 daily queries. The team picked ClickHouse for its ad hoc query speed, compute isolation between concurrent queries and simple scaling. A nightly pipeline copies data from Snowflake to S3, loads it via ClickPipes into a new versioned wide table, then repoints a view at it. That keeps LLM-generated queries stable and makes rollback trivial, at the cost of skipping incremental loads.
- Agentic infrastructure with clickhousectl: a distributed ClickStack across three continents
ClickHouse mediumAdept
A coding agent using the clickhousectl CLI stood up three ClickHouse Cloud services in us-east-1, eu-west-1 and ap-northeast-1, each ingesting OpenTelemetry logs, traces and metrics locally, with a federated global view in Europe for the ClickStack UI. The global view combines remoteSecure() table pointers to the remote regions with a Merge engine table over local and remote tables, so data stays resident in its region and is fetched only at query time. The agent scripted provisioning by parsing JSON output with jq and polling service status, then added SQL-based and native ClickStack alerts. The broader argument is that a scriptable CLI with clean JSON output suits agent-driven infrastructure better than a web console.
- How Suprema Gaming made its data platform agent-ready with ClickHouse Cloud
ClickHouse mediumAdept
Suprema Gaming moved its analytics warehouse from Snowflake to ClickHouse Cloud so that AI agents could query fresh, governed data directly. Ingestion now uses ClickPipes CDC and Debezium/Kafka in place of S3/Snowpipe batches, and dbt deployed via GitHub Actions defines layered transformations with no external orchestrator. Data freshness went from four hours to a p95 lag of about one minute, mart reads got 27x faster, and warehouse spend fell roughly 62%. Metrics were validated to the cent through an agent-assisted loop that captures each rule as a dbt test, and a fleet of 10 specialized agents with version-controlled skills, traced in Langfuse, serves business users.