Why it matters
This library empowers AI builders to integrate LLMs directly with their .NET applications' databases. By offering a safe and structured way to generate and execute SQL queries, AgentQL reduces the complexity and risk associated with AI-driven data access.

What changed

AgentQL is a newly released .NET library that facilitates the interaction between AI agents and Entity Framework Core (EF Core) databases. It achieves this by introspecting EF Core models to generate LLM-friendly schema descriptions and by providing a secure mechanism for executing SQL queries. The library acts as an intermediary, enabling Large Language Models (LLMs) to understand database structures and query them through function calling. AgentQL supports various AI providers, including OpenAI, Anthropic, and Ollama, and integrates with Microsoft.Extensions.AI for seamless function calling.

The core functionalities of AgentQL include:

  • Schema Introspection: It analyzes EF Core DbContext models, extracting details about tables, columns, data types, relationships, enums, and inheritance hierarchies to create descriptive text for LLMs.
  • Safe Query Execution: AgentQL executes SQL queries within transactions, offering configurable safety features such as row limits, command timeouts, and read-only enforcement. This prevents unintended data modifications and limits resource consumption.
  • LLM Tool Exposure: It exposes three essential tool functions—GetDatabaseSchema, ExecuteQuery, and ReportFailure—making them callable by compatible chat clients.

Installation is managed via NuGet packages, with Equibles.AgentQL.MicrosoftAI offering a full-stack solution including schema, query execution, and AI chat client integration. Alternatively, Equibles.AgentQL.EntityFrameworkCore can be used for schema introspection and query execution if developers prefer to manage their own AI client.

Why it matters for builders

For AI builders, AgentQL significantly lowers the barrier to entry for creating AI-powered applications that require direct database access. It abstracts away much of the complexity involved in translating natural language queries into safe, executable SQL. The library's focus on security, with features like statement whitelisting, read-only enforcement, and configurable limits on query size and results, is particularly valuable for production environments. This allows developers to confidently integrate LLMs into data-intensive workflows without compromising data integrity or security.

Practical impact

Developers can integrate AgentQL into their .NET applications by adding the relevant NuGet package and configuring the AddAgentQLChat service. The library automatically registers necessary components like ISchemaProvider, IQueryExecutor, AgentQLPlugin, and IChatClient for dependency injection. Configuration options allow fine-tuning of safety parameters, such as MaxRows, MaxColumns, MaxSqlLength, MaxBytes, ReadOnly, and CommandTimeout. The ReadOnly mode offers multiple layers of defense against write operations, including statement whitelisting and DBMS-level session restrictions where supported.

Furthermore, AgentQL includes a self-correction mechanism that automatically retries failed queries or prompts the LLM to fix them, up to a configurable number of attempts. This enhances the reliability of AI-driven data interactions. Builders can also customize the AI provider, API keys, model names, and other chat-related settings.

Caveats and source limits

This release is marked as a "fresh release" with version v0.2.1, indicating it is still in early development. While the library offers robust safety features, the documentation notes that SQL Server and Oracle do not fully support DBMS-level session read-only enforcement, relying more heavily on the statement whitelist and transaction rollback. The effectiveness of the read-only mode for these specific databases depends on the careful configuration of database principals with minimal privileges. The source does not provide independent benchmark results or performance metrics for the library's introspection or query execution capabilities. The author's website is listed as a homepage, but no direct link to a company or official product page is provided, and the project appears to be community-driven.

Sources

Written with AI assistance from the linked sources; every claim below was checked against them automatically. How we produce articles.

Claim check: 8/8 supported claims - 8 evidence links - 100% avg confidence
  • AgentQL is a reusable .NET library that translates EF Core models into LLM-friendly schema descriptions.supported - github.com
  • AgentQL provides safe SQL query execution for AI agents.supported - github.com
  • AgentQL enables LLMs to understand database structures and query them via function calling.supported - github.com
  • AgentQL exposes `GetDatabaseSchema`, `ExecuteQuery`, and `ReportFailure` LLM tool functions.supported - github.com
  • AgentQL offers configurable safety limits including row limits, timeouts, and read-only enforcement.supported - github.com
  • AgentQL supports OpenAI, Anthropic, and Ollama AI providers.supported - github.com
  • AgentQL includes a self-correction mechanism for AI query loops.supported - github.com
  • AgentQL's latest release is v0.2.1.supported - github.com

Caveats

  • The excerpt describes this as a 'fresh release'.
  • Single-source caution: verify critical details at the linked source.
Radar score 78/100 - how it was calculated
Reliability82
Freshness8
Novelty77
Technical85
Developer96
Ecosystem72
Confidence96
  • Reliability 82: GitHub metadata supports source trust
  • Freshness 8: Fresh GitHub release date
  • Novelty 77: Fresh GitHub release
  • Technical 85: Repository technical metadata
  • Developer 96: Developer tooling signals
  • Ecosystem 72: Fresh GitHub release
  • Confidence 96: Claims have reliable evidence
Share
XLinkedInHacker News

Discussion

Loading comments...

Related articles

Agents - Oct 11, 2026npcpy Python Library Latest Release v2.1.24The npcpy Python library, designed for research and development in NLP, multimodal LLMs, Agents, ML, and Knowledge Graphs, has released version v2.1.24. This release is part of an active project with a maturity score of 90 and a developer utility score of 100.AI Tools - Oct 12, 2026Teable AI Spreadsheet for BusinessTeable is an open-source AI spreadsheet designed for business use, offering a low-code/no-code platform. It recently had a fresh release, indicating active development.AI Tools - Oct 5, 2026Pairlet v2.3.0 Released for Local AI Coding TasksPairlet, formerly CC Pocket, has released version 2.3.0. This Kotlin-based project allows users to continue local AI coding tasks from various devices, including phones, tablets, and desktops.Agents - Oct 14, 2026Unmute: Voice Agents in YAMLUnmute is a Go-based project that allows developers to define voice agents using YAML. These definitions are then compiled into production-ready code for platforms like Pipecat or LiveKit, enabling deployment anywhere.Agents - Oct 10, 2026cc-haha: Local Desktop Workspace for Claude Code AgentsNanmiCoder's cc-haha is a local-first, cross-platform desktop workspace designed for Claude Code and AI agents. It supports multi-agent systems, Git worktrees, code diffs, and integrates with various communication platforms.Agents - Oct 9, 2026Wirken v1.28.0: Enterprise Gateway for Autonomous AgentsWirken has released version v1.28.0, an enterprise gateway designed for autonomous agents. This Rust-based project focuses on identity management, per-channel isolation, a credential vault, and tamper-evident audit logging.