Cloudflare D1

Provides SQLite-compatible serverless SQL databases that bind directly to Cloudflare Workers, enabling structured data persistence at the edge.

Evaluated Mar 07, 2026 (0d ago) vcurrent
Homepage ↗ Other cloudflare sqlite edge serverless-database sql
⚙ Agent Friendliness
61
/ 100
Can an agent use this?
🔒 Security
88
/ 100
Is it safe for agents?
⚡ Reliability
80
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
82
Error Messages
75
Auth Simplicity
88
Rate Limits
80

🔒 Security

TLS Enforcement
100
Auth Strength
85
Scope Granularity
82
Dep. Hygiene
85
Secret Handling
88

Data encrypted at rest; binding-based access means no credentials in Worker code; each database is isolated per account

⚡ Reliability

Uptime/SLA
85
Version Stability
78
Breaking Changes
75
Error Recovery
80
AF Security Reliability

Best When

Your Workers-based agent needs lightweight relational storage co-located at the edge and query patterns are predominantly reads with occasional writes.

Avoid When

You need high concurrent write throughput, PostgreSQL-specific syntax, or strongly consistent reads from any geographic region.

Use Cases

  • Store agent memory, conversation history, or task state in a relational schema accessible from Workers without external DB hops
  • Maintain a lightweight catalog or registry (tools, plugins, configs) that agents query during runtime
  • Implement user-specific session tables or per-tenant data isolated by database binding in a multi-tenant agent system
  • Run analytical queries over structured logs or event data captured by Workers without egressing to a central database
  • Prototype agent workflows with familiar SQL semantics before migrating to a larger managed DB

Not For

  • High-write-throughput workloads — D1 is optimized for read-heavy patterns and has limited concurrent write support
  • Databases requiring full PostgreSQL features, stored procedures, or complex extensions not available in SQLite
  • Multi-region strong consistency — D1 replicates reads but writes go to a single primary, introducing replication lag at distant PoPs

Interface

REST API
Yes
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: api_token worker_binding
OAuth: No Scopes: Yes

Primary access is via Workers binding (no credentials in code); REST API access uses Cloudflare API token with D1:Edit or D1:Read permissions

Pricing

Model: freemium
Free tier: Yes
Requires CC: No

Free tier is ample for prototyping; row-read pricing can accumulate quickly on full-table scans — use indexed queries

Agent Metadata

Pagination
offset
Idempotent
Partial
Retry Guidance
Documented

Known Gotchas

  • D1 is still GA-transitioning from open beta — some alpha features (time travel, read replication) may change behavior without notice
  • Prepared statements must be re-prepared per Worker invocation — no connection pooling persists across requests
  • Maximum database size is 2GB per database (soft limit in beta); plan schema carefully for long-running agent deployments
  • REST API for D1 is separate from the Workers binding — mixing both in an agent can cause confusion about which credentials/endpoint to use
  • SQLite WAL mode and some PRAGMA commands are not supported; agents relying on SQLite-specific tuning flags will need adjustments

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for Cloudflare D1.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6470
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered