Aglitics
Self-contained data agents that load their dataset at startup and answer queries in-process. No external data infrastructure needed.
I watched a talk at the ClickHouse Bangalore Meetup (video here) where someone described dashboards at a large US bank taking 8-9 minutes to load. The SLA was 3 seconds. They’d tried everything on the infrastructure side and it wasn’t helping.
The problem was the architecture. Every time the agent ran a query, it was making network calls to a vector store, a memory service, and a data warehouse. Multiple round trips on every request, latency adding up.
Their fix was simple: stop doing that. Load the data into the container at startup. Run all queries in-process with chDB (embedded ClickHouse). Latency dropped to 33-100ms.
Aglitics is my implementation of that pattern, with a proper multi-turn memory layer and Cloud Run as the serverless host so you pay per request rather than keeping infrastructure running all the time.
How it works
On startup the container loads its dataset from object storage into chDB. From that point, all queries run in-process. When a user asks a question in natural language, the agent converts it to ClickHouse SQL using chDB’s native text_to_sql, executes it, and returns an NL response. The exchange gets saved back to memory for multi-turn context.
User query
-> recent context from short-term memory (chDB)
-> NL -> ClickHouse SQL
-> chDB executes in-process
-> NL response
-> save to memory
Cloud Run handles the infrastructure side: scale to zero when idle, one warm container to avoid cold starts on the first request of the day.
Stack
Agno as the agent framework (2µs instantiation, MCP support built in), chDB as the in-process SQL engine, Google Cloud Run as the host.
Where it’s at
Core NL-to-SQL loop works locally. Next up: multi-turn memory persistence, a production Cloud Run deployment, and connector coverage for loading from common data sources.
I wrote up the pattern in more detail in this blog post.
If you want to help
If you’ve worked with Cloud Run, chDB, or serverless data infrastructure, I’d be glad to have another set of hands on this. Reach out.