<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control-1zub9k8ue" -->

---
title: A Multi-Agent SQL Assistant You Can Trust with...
description: A comprehensive guide to building a multi-agent SQL assistant using CrewAI and Streamlit. The system features three specialized agents: a query generator that...
canonical: https://daily.dev/posts/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control-1zub9k8ue
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A Multi-Agent SQL Assistant You Can Trust with Human-in-Loop Checkpoint & LLM Cost Control | daily.dev
og:description: A comprehensive guide to building a multi-agent SQL assistant using CrewAI and Streamlit. The system features three specialized agents: a query generator that...
og:url: https://daily.dev/posts/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control-1zub9k8ue
og:image: https://api.daily.dev/og/posts/1zuB9k8Ue.png
og:image:alt: A Multi-Agent SQL Assistant You Can Trust with Human-in-Loop Checkpoint & LLM Cost Control
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A Multi-Agent SQL Assistant You Can Trust with Human-in-Loop Checkpoint & LLM Cost Control

**[Towards Data Science](https://daily.dev/sources/tds)** · 20 min read · 1 upvotes · 0 comments

## Summary

A comprehensive guide to building a multi-agent SQL assistant using CrewAI and Streamlit. The system features three specialized agents: a query generator that converts natural language to SQL, a reviewer that optimizes queries, and a compliance checker that ensures data safety. Key features include human-in-the-loop checkpoints for user control, real-time LLM cost tracking, and safety measures to prevent PII exposure. The tutorial covers agent architecture, task definitions using YAML configurations, database schema integration, and a complete Streamlit interface implementation with practical examples and cost analysis.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://towardsdatascience.com/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control/>

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#llm](https://daily.dev/tags/llm), [#sql](https://daily.dev/tags/sql)

[View this post on daily.dev](https://daily.dev/posts/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control-1zub9k8ue)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A Multi-Agent SQL Assistant You Can Trust with Human-in-Loop Checkpoint \u0026 LLM Cost Control","url":"https://daily.dev/posts/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control-1zub9k8ue","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control-1zub9k8ue"},"datePublished":"2025-06-18T19:09:01.231Z","dateModified":"2026-03-15T08:43:15.269Z","description":"A comprehensive guide to building a multi-agent SQL assistant using CrewAI and Streamlit. The system features three specialized agents: a query generator that...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/307c18cf83fd5139978098996b55c8c1?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/307c18cf83fd5139978098996b55c8c1?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"Towards Data Science","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Towards Data Science","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/tds","url":"https://daily.dev/sources/tds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/a-multi-agent-sql-assistant-you-can-trust-with-human-in-loop-checkpoint-llm-cost-control-1zub9k8ue","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,llm,sql","timeRequired":"PT20M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Towards Data Science","item":"https://daily.dev/sources/tds"},{"@type":"ListItem","position":3,"name":"A Multi-Agent SQL Assistant You Can Trust with Human-in-Loop Checkpoint \u0026 LLM Cost Control"}]}
```

