What if you could run AI agents directly from SQL?
Blog post from Chalk
Chalk demonstrated at ClickHouse Developer AI Night how SQL can orchestrate AI model calls, custom Python functions, HTTP requests, and sandboxed agent execution within a single query pipeline, reducing the need to move data between separate processing systems. In a security-scanning example, a SQL query selected Python repositories from ClickHouse, launched isolated sandboxes, ran agents to investigate possible vulnerabilities, and returned findings such as a potential `os.system` command-injection issue directly to the query. Chalk operates as a federated query engine that connects to sources including ClickHouse, Snowflake, and PostgreSQL while pushing down filters and column selection where possible, and it can incorporate Python functions into query plans. Its runtime manages secure, concurrent execution and provides an end-to-end trace spanning SQL queries, functions, sandboxes, agent activity, and model calls. The approach is presented as applicable to large-scale enrichment, fraud investigation, document extraction, and agent evaluation workflows, combining SQL’s data access capabilities with Python and AI-based computation in an observable execution layer.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| AI Agents | 6 | 4,018 | 791 | 204 | -43% |
| Agent Evaluations | 1 | 66 | 31 | 20 | -61% |
| Observability | 1 | 1,442 | 317 | 120 | -53% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.