Smart Components

SmartSQL: SQL for the Agentic Era

Geno Valente, Basia Kubicka, Matt Wirth
#SmartSQL#SQL#Agents#Raindrop#Infrastructure

The first database designed for autonomous AI agents

The database industry has a problem: every major innovation of the past decade has been about making databases faster, more distributed, or more scalable. But none have addressed the fundamental shift happening in software- the rise of autonomous AI agents that need to create, query, and manage structured data without human intervention.

Today, we’re announcing SmartSQL, the world’s first database built specifically for the agentic era. SmartSQL doesn’t just accept natural language queries, it enables AI agents to autonomously manage entire data lifecycles, from schema discovery to PII compliance, all while maintaining enterprise-grade security and performance.

The Agentic Database Challenge

When Uber’s “QueryGPT” saved 140,000 hours monthly with natural language SQL, they demonstrated something profound: the future of databases isn’t about human-friendly interfaces, it’s about agent-native data operations.

But QueryGPT was an internal tool requiring massive engineering investment. Meanwhile, AI agents in production face a more complex challenge. They don’t just need to query existing data, they need to:

Traditional databases force agents through the same human-designed interfaces: learn SQL syntax, understand schema design, manually configure security policies. This creates a fundamental bottleneck in agentic workflows.

Beyond Natural Language: True Agentic Data Operations

SmartSQL isn’t another deployment wrapper or API abstraction. It’s a complete data platform that versions your entire backend infrastructure alongside your code. When you create a SmartSQL instance, you get a fully managed database with built-in PII detection, natural language processing, and automatic schema management, not just a connection to a generic database service.

SmartSQL does this by treating autonomous agent reasoning as the primary database interface. Instead of translating human intent into SQL, SmartSQL enables agents to perform sophisticated data operations through intelligent context understanding.

Autonomous Schema Discovery and Evolution

AI agents can explore and modify data structures dynamically, without predefined schemas:

// Agent discovers existing data structure
const dataContext = await this.env.CUSTOMER_DATABASE.getMetadata();
// Returns: table schemas, column types, sample data

// Agent queries for insights using natural language
const insights = await this.env.CUSTOMER_DATABASE.executeQuery({
  textQuery: 'analyze customer behavior patterns for conversion funnels',
  format: 'json'
});

Intelligent PII Management for Agents

The most critical capability for production AI agents is autonomous PII handling. SmartSQL’s multi-LLM pipeline automatically identifies, classifies, and secures sensitive data without agent programming:

// Execute INSERT query - PII automatically detected and stored separately
await this.env.SUPPORT_DATABASE.executeQuery({
  sqlQuery: 'INSERT INTO transcripts (content, user_segment) VALUES (?, ?)',
  format: 'json'
});
// PII detection runs automatically on data modification

// Query for insights - PII detection results available separately
const behaviorPatterns = await this.env.SUPPORT_DATABASE.executeQuery({
  textQuery: 'identify common support issues by user segment',
  format: 'json'
});

// Access PII detection results if needed
const piiData = await this.env.SUPPORT_DATABASE.getPiiData('transcripts');

Context-Aware Agent Queries

Unlike traditional databases that require explicit column names and table structures, SmartSQL understands agent intentions and automatically maps them to optimal data operations:

// Agent uses natural language for complex analysis
const insights = await this.env.CUSTOMER_DATABASE.executeQuery({
  textQuery: 'find customers at risk of churn based on behavioral signals from the last 90 days',
  format: 'json'
});

// Agent explores correlations through natural language queries
const correlations = await this.env.CUSTOMER_DATABASE.executeQuery({
  textQuery: 'show correlations between user behavior and subscription renewals',
  format: 'json'
});

Pre-Built, Production-Ready Components

SmartSQL operates alongside other specialized data components, each handling complex requirements that typically require months of engineering:

SmartBuckets: Multi-modal document processing with automatic graph database relationships, topic clustering, and semantic search—not just vector storage.

SmartMemory: Persistent agent context with automatic knowledge graph construction and temporal reasoning—not basic session storage.

SmartSQL: Complete database platform with integrated PII detection, natural language processing, and automatic compliance—not just a database connection.

Traditional setup for equivalent functionality:

SmartSQL setup:

// raindrop.manifest
smartsql "customer-data" {}

// Complete functionality available immediately
const insights = await this.env.CUSTOMER_DATA.executeQuery({
  textQuery: 'find high-value customers while excluding personal data'
});
// PII detection, compliance, and NLP included

The power emerges when agents seamlessly orchestrate across all three systems:

// Agent performs cross-system analysis
const documents = await this.env.SMART_BUCKETS.findSimilar({
  query: 'customer complaints about billing'
});

// Agent structures insights from document analysis
await this.env.CUSTOMER_DATABASE.executeQuery({
  sqlQuery: `INSERT INTO billing_insights (sentiment, issue_category, resolution_time)
             VALUES (?, ?, ?)`,
  format: 'csv'
});

// Query structured insights
const patterns = await this.env.CUSTOMER_DATABASE.executeQuery({
  textQuery: 'show patterns in billing complaints and resolution times',
  format: 'json'
});

For Developers Who Build Products, Not Infrastructure

SmartSQL targets developers who want to:

You write application code. SmartSQL handles the rest.

Versioned Backend Infrastructure

// Traditional approach: manage database, configure PII detection, set up NLP
// SmartSQL approach: complete data stack in your manifest

// raindrop.manifest - infrastructure as code with versioning
application "customer-analytics" {
  smartsql "primary-database" {}
  smartsql "second-database" {}  // Different version, same interface
}

// Branch your entire backend like Git branches code
// Each environment gets isolated, versioned infrastructure
const productionResults = await this.env.PRIMARY_DATABASE.executeQuery({
  textQuery: 'analyze customer retention patterns'
});

const stagingResults = await this.env.STAGING_DATABASE.executeQuery({
  textQuery: 'analyze customer retention patterns'  // Same code, different data stack
});

Guided Development with Complete Context

Unlike generic API wrappers, SmartSQL provides Claude Code or other MCP compliant solutions with complete architectural context and development patterns:

// Claude Code understands your entire data architecture
// Suggests optimal queries based on your schema and PII policies
// Provides architectural guidance, not just API documentation

// Claude suggests this based on your table structure:
const riskAnalysis = await this.env.FINANCE_DATABASE.executeQuery({
  textQuery: 'identify accounts with unusual transaction patterns excluding PII',
  format: 'json'
});

// Claude explains why this approach handles compliance automatically
const piiStatus = await this.env.FINANCE_DATABASE.getPiiData('transactions');

Claude Code receives:

Instead of relying on Claude knowing generic infrastructure, this gives Claude everything it needs to build an architecture that fits your needs.

Production Examples

Customer Analytics

// Natural language queries handle complex business logic
const churnRisk = await this.env.CUSTOMER_DB.executeQuery({
  textQuery: 'identify customers likely to cancel based on usage patterns from last 60 days'
});

// PII automatically detected and isolated
const piiData = await this.env.CUSTOMER_DB.getPiiData('customers');
console.log(`Found ${piiData.piiDetections.length} PII instances`);

Financial Compliance

// Complex compliance queries through natural language
const riskAssessment = await this.env.FINANCE_DB.executeQuery({
  textQuery: 'flag accounts with transaction patterns requiring manual review per banking regulations'
});

// Automatic audit trail for compliance
const metadata = await this.env.FINANCE_DB.getMetadata('transactions');

Customer Intelligence

// Agent builds customer profiles through targeted queries
const customerProfiles = await this.env.CUSTOMER_DATABASE.executeQuery({
  textQuery: 'create comprehensive customer profiles excluding personal identifiable information',
  format: 'json'
});

// Agent identifies actionable patterns
const insights = await this.env.CUSTOMER_DATABASE.executeQuery({
  textQuery: 'find actionable patterns to reduce customer churn within 30 days',
  format: 'json'
});

Financial Risk Assessment

// Agent performs risk analysis with automatic PII protection
const riskAssessment = await this.env.FINANCE_DATABASE.executeQuery({
  textQuery: 'analyze financial risk across all customer accounts following banking compliance requirements',
  format: 'json'
});

// Check PII detection results for compliance
const piiDetections = await this.env.FINANCE_DATABASE.getPiiData('accounts');

Product Development Intelligence

// Agent queries existing data using natural language
const analysisResults = await this.env.AGENT_DATABASE.executeQuery({
  textQuery: 'analyze trial users from July to identify conversion blockers',
  format: 'json'
});

// Agent creates new tables using direct SQL
await this.env.AGENT_DATABASE.executeQuery({
  sqlQuery: `CREATE TABLE feature_adoption_metrics (
    user_id INTEGER,
    feature_name TEXT,
    adoption_date TIMESTAMP,
    velocity_score REAL
  )`,
  format: 'json'
});

Architecture for Autonomous Operations

Agent-First API Design: Every SmartSQL operation accepts agent context and objectives rather than explicit SQL commands

Multi-LLM Pipeline: Specialized models optimized for specific needs

Autonomous Governance: Built-in compliance and security policies that adapt to agent behavior patterns

Context Preservation: Agent learnings and preferences persist across sessions and workflows

Performance Optimization: Automatic query optimization based on agent usage patterns and objectives

The Future is Agentic First

SmartSQL represents the first step toward truly autonomous data operations. As AI agents become the primary interface for software systems, data infrastructure must evolve beyond human-designed patterns.

In the agentic era, databases won’t be configured, they’ll be reasoned with. Data won’t be queried, it’ll be understood. Schemas won’t be designed—they’ll evolve.

SmartSQL enables this future today, integrated with the LiquidMetal AI Raindrop platform that’s already powering autonomous agents built through Claude Code.

Getting Started

SmartSQL is available as part of the Raindrop platform, accessible through our MCP integration with Claude Code. Setup takes less than 5 minutes:

  1. Install Claude Code and the Raindrop CLI
  2. Sign up and get your API key from liquidmetal.ai
  3. Add the MCP server to your Claude Code configuration
  4. Start building AI-native applications with structured data via SmartSQL

Whether you’re building autonomous agents, data analysis tools, or traditional applications with AI enhancements, SmartSQL eliminates the database complexity that typically consumes weeks to months of development time.

We’re currently in public beta with $5/mo access for all early users at this time. The response from our developer community has been overwhelming—teams are building production applications with complex data requirements in hours instead of weeks.


Ready to experience AI-native databases?

Join the public beta at liquidmetal.ai and discover how SmartSQL, SmartBuckets, SmartMemory and the entire Raindrop Platform are transforming application development for the AI era.

Subscribe to our newsletter

← Back to all Blogs & Case Studies