Back to Blog

OnchainDB vs The World: Where We Fit in the AI Agent Stack

OnchainDB is the data layer for AI agents. Here's how we compare to databases, protocols, and infrastructure in the agent economy.

OnchainDB vs The World: Where We Fit in the AI Agent Stack

The AI agent stack is crowded. New protocols launch weekly. If you’re building for agents, you need to know what solves what - and what’s missing.

The missing piece: a data layer that any agent can query and pay automatically.

Here’s the answer: OnchainDB is the data layer with payments built in.

Traditional databases cost you money. OnchainDB earns you money - while giving you access to data across app boundaries without the sourcing overhead.

flowchart TB subgraph Agents["AI AGENTS"] A[AI Agent] S[Scripts & Pipelines] end subgraph Protocols["AGENT PROTOCOLS"] ID[Identity
ERC-8004] COM[Communication
MCP, ACP] PAY[Payments
x402] end subgraph Data["DATA ACCESS"] OCDB[OnchainDB
Query engine
Cross-app JOINs
Pay-per-query
Immutable audit] end subgraph Infra["INFRASTRUCTURE"] ST[Storage
Celestia] SE[Settlement
Tempo, USDC] MEM[Agent Memory
Recall] PD[Personal Data
Vana, ODL] end A & S --> ID & COM & PAY ID & COM & PAY --> OCDB OCDB --> ST & SE & MEM & PD style OCDB fill:#3b82f6,stroke:#1e40af,color:#fff

Not an identity protocol. Not a payment rail. Not a personal data network. We’re the database that lets any application query data across apps and pay automatically - the infrastructure that makes Satya Nadella’s “multi-repo CRUD” vision actually work.

The Stack at a Glance

LayerProblemSolutionOnchainDB?
Identity“Can I trust this agent?”ERC-8004, ENSNo
Communication“How do agents talk?”MCP, ACPNo
Payments“How do agents pay?”x402, TempoWe implement x402
Data Access“Where do agents get data?”OnchainDBYes - this is us
Agent Memory“Where do agents store state?”RecallNo
Personal Data“Who owns user data?”Vana, Open Data LabsNo

We don’t compete with the other layers. We’re the missing piece that connects them.


Traditional Databases

The obvious comparison. We’re all databases (MongoDB, Supabase). Here’s why OnchainDB wins for agent workloads:

FeatureMongoDB/SupabaseOnchainDB
CRUD operationsYesYes
Built-in paymentsNoYes - HTTP 402 on every query
Cross-app queriesNo - siloedYes - JOIN across any app
Data monetizationNo70% to you, 30% platform
Immutable audit trailNoYes - Celestia DA
Who pays whomYou pay themThey pay you

Use MongoDB/Supabase if you’re building a traditional app with no agent access, no monetization needs, and you’re fine paying hosting bills forever.

Use OnchainDB if you want your database to generate revenue. Every query from an AI agent pays you. Cross-app JOINs work out of the box. Your data has a permanent, verifiable audit trail.

The math is simple: Supabase costs you $25-500/month. OnchainDB earns you money from day one.


Observability Platforms

Splunk, Datadog, Azure Log Analytics - these are built for internal observability. Your team queries your logs to debug your systems.

OnchainDB is for external observability - when your logs have value to others.

Splunk / Datadog / AzureOnchainDB
Use caseInternal ops, debuggingExternal monetization, audit
Cost modelYou pay themOthers pay you
Data monetizationNoYes - sell access to logs
Cross-org queriesNoYes - query across publishers
Data layerDeletable, mutableImmutable (Celestia DA)
Index retentionConfigurableConfigurable (data retrievable from DA)

Use Splunk/Datadog for internal dashboards, alerting, and debugging.

Use OnchainDB when your logs have external value:

  • Threat intel - Security vendors monetize IOC feeds, attack patterns
  • Compliance records - Auditors need verifiable, immutable proof
  • AI transparency - Chain-of-thought logs for accountability
  • Cross-org analytics - Aggregate logs across multiple publishers

Internal observability stays internal. External observability belongs on OnchainDB.


Communication Protocols

MCP is Anthropic’s protocol for connecting agents to tools. 97 million monthly SDK downloads. 10,000+ public servers. Now governed by the Linux Foundation with OpenAI and Block. It’s the “USB-C of AI” - standardizing how agents discover and call tools.

ACP refers to multiple protocols: Agent Commerce Protocol (Stripe/OpenAI), Agent Communication Protocol (Virtuals/Base), and Agent Client Protocol (Zed). All handle communication or commerce flows.

None of them store data. They’re protocols, not infrastructure.

MCP / ACPOnchainDB
What it isCommunication protocolsDatabase + query engine
Data storageNoYes (Celestia + materialized views)
PaymentsNo (MCP) / Some (ACP)Yes (HTTP 402)
Query engineNoYes (cross-app JOINs)

How they work together:

sequenceDiagram participant Agent participant MCP as MCP Server participant OCDB as OnchainDB participant Chain as Blockchain Agent->>MCP: "Find laptops under $1000" MCP->>OCDB: Route to OnchainDB tool OCDB-->>Agent: HTTP 402 + payment quote Agent->>Chain: Pay via x402 Chain-->>OCDB: Payment confirmed OCDB-->>Agent: Query results

MCP handles discovery and routing. OnchainDB handles the actual data and payment. An agent using ACP for commerce still needs somewhere to query product data - that’s OnchainDB.

Building an MCP server for OnchainDB? Expose your app’s data to any MCP-compatible agent. They discover via MCP, query via OnchainDB, pay via x402. Three protocols, one integration.


Trustless Agents

ERC-8004 is an Ethereum standard from MetaMask, Google, and Coinbase engineers. It defines three registries:

  1. Identity Registry - Agent handles (ERC-721)
  2. Reputation Registry - Feedback and scoring
  3. Validation Registry - zkML verifiers, TEE oracles

ERC-8004 answers: “Should I trust this agent?”

OnchainDB answers: “Where does this agent get its data?”

ERC-8004OnchainDB
PurposeTrust verificationData access
What it storesIdentity, reputationApplication data
PaymentsUses x402Uses x402

How they work together:

sequenceDiagram participant Agent participant ERC as ERC-8004 participant OCDB as OnchainDB participant Chain as Blockchain Agent->>ERC: Check provider reputation ERC-->>Agent: Reputation score: 4.8/5 Agent->>OCDB: Query provider's data OCDB-->>Agent: HTTP 402 + quote Agent->>Chain: Pay via x402 OCDB-->>Agent: Data response Agent->>ERC: Post feedback (success)

ERC-8004 tells you whether to query. OnchainDB is how you query.

Example: Trusted Data Marketplace

flowchart LR subgraph Setup P[Data Provider] -->|1. Register identity| ERC[ERC-8004] P -->|2. Publish data| OCDB[OnchainDB] end subgraph Query A[Agent] -->|3. Check reputation| ERC A -->|4. Query + pay| OCDB A -->|5. Post feedback| ERC end

High-reputation providers get more queries. Bad actors get filtered out. Trust and data access work together.


Payment Infrastructure

x402

x402 is Coinbase’s payment protocol. It revives HTTP 402 (“Payment Required”) for instant stablecoin micropayments. 500,000+ weekly transactions across Base, Solana, and BNB Chain.

OnchainDB implements x402. We’re not a competitor - we’re a consumer.

sequenceDiagram participant Agent participant OCDB as OnchainDB participant Chain as Blockchain Agent->>OCDB: POST /query OCDB-->>Agent: HTTP 402 + quote ($0.001) Agent->>Chain: Pay via x402 (USDC) Chain-->>OCDB: Payment confirmed OCDB-->>Agent: Data response Note over OCDB: 70% to data provider
30% to platform

x402 moves the money. OnchainDB stores and serves the data.

Tempo

Tempo is Stripe and Paradigm’s payments-first L1. $500M raised at $5B valuation. Partners: Mastercard, UBS, Klarna.

x402TempoOnchainDB
TypePayment protocolL1 blockchainDatabase
PurposeHTTP micropaymentsPayment settlementData access + queries
Stores dataNoNoYes
Query engineNoNoYes

Tempo is a settlement layer. x402 is a payment protocol. OnchainDB is a data layer.

We’re adding Tempo support for payment settlement alongside Celestia. When an agent queries OnchainDB, Tempo can settle the micropayment. Different layers, same stack.


Personal Data Networks

Vana

Vana is an L1 for user-owned personal data. 1M+ users pool data (Reddit posts, health metrics, DNA) into DataDAOs for AI training.

How DataDAOs work:

  • Users contribute personal data to Data Liquidity Pools (smart contracts)
  • Proof-of-contribution validates data quality
  • Contributors earn governance tokens and royalties
  • AI companies pay to train on the pooled data

Open Data Labs

Open Data Labs built Vana and runs a data playground with 16+ queryable datasets: Instagram, Twitter/X, Telegram, sleep patterns, credit transactions, Spotify history. Each dataset comes from user contributions via DataDAOs with governance tokens (MIND, REM, BOPS).

Vana / Open Data LabsOnchainDB
Data typePersonal (social, health, genetic)Commercial (products, prices, APIs)
Data flowC2B - users contribute to poolsB2B/A2A - apps serve agents
Use caseAI model training (batch)Real-time queries (live)
Revenue modelPool once, earn royaltiesPay per query
GovernanceToken-based DAO votingApp owner sets pricing

Vana = Personal data pooled for training. Users contribute their Reddit history, sleep patterns, genetic data.

OnchainDB = Application data queried in real-time. Retailers expose inventory. APIs expose prices. Every query pays instantly.

When to use together

DataDAOs aggregate personal data. But AI agents need to query that aggregated data in real-time.

Example: Health AI Agent

sequenceDiagram participant Users as 100K Users participant DAO as Health DataDAO (Vana) participant OCDB as OnchainDB participant Agent as AI Health Coach Users->>DAO: Contribute sleep/fitness data DAO->>OCDB: Publish aggregated insights Agent->>OCDB: Query "sleep patterns age 30-40" OCDB-->>Agent: HTTP 402 + quote Agent->>OCDB: Pay via x402 OCDB-->>Agent: Aggregated results OCDB->>DAO: Revenue share DAO->>Users: Distribute to contributors

Vana handles contribution and governance. OnchainDB handles query and payment. The DataDAO earns from every agent query without building query infrastructure.

Example: Sentiment Analysis

flowchart LR subgraph Vana U[140K Reddit Users] -->|Pool data| DAO[Reddit DataDAO] end subgraph OnchainDB DAO -->|Publish indexes| OCDB[Sentiment Index] end subgraph Agents T[Trading Agent] -->|Query + Pay| OCDB OCDB -->|"$TICKER sentiment"| T end

Vana is the data collection layer. OnchainDB is the data access layer. They stack.


Agent Memory Networks

Recall is a “decentralized intelligence network” born from the merger of Textile (Tableland) and 3Box Labs (Ceramic) in early 2025. $42M raised from Bessemer, Coinbase Ventures, and Union Square Ventures. Built on Base.

Recall provides a memory layer for AI agents - storing knowledge bases, predictions, chain-of-thought logs, and performance history. Agents build reputation through verifiable track records.

Two components:

  1. Agent Memory - On-chain storage for agent-internal data (logs, predictions, reasoning)
  2. Competitive Arenas - AI models compete on tasks (trading, coding, reasoning) with tokenized rankings
RecallOnchainDB
Primary focusAgent memory + reputationData access + monetization
Competitive arenasYes (AI rankings, token staking)No
Revenue modelToken staking on agent portfoliosPay per query (reads and writes)
Query engineNoYes (cross-app JOINs)
Can store agent logsYesYes (we’re usage-agnostic)

Recall = Specialized for agent memory with built-in reputation and competitive arenas.

OnchainDB = General-purpose data layer. Can store agent memory and serve external data - with payments on every operation.

How they work together:

sequenceDiagram participant Agent participant Recall as Recall (Memory) participant OCDB as OnchainDB (Data) participant Chain as Blockchain Agent->>Recall: Store reasoning trace Agent->>OCDB: Query product prices OCDB-->>Agent: HTTP 402 + quote Agent->>Chain: Pay via x402 OCDB-->>Agent: Price data Agent->>Recall: Log decision + outcome Note over Recall: Reputation builds over time

Recall specializes in agent memory with competitive rankings. OnchainDB is the general-purpose data layer - store agent logs, serve external data, or both. The difference: Recall has arenas and token staking; OnchainDB has cross-app queries and pay-per-operation.


Beyond Data Access: Append-Only Ledger

OnchainDB is append-only by design. Every write is immutable, stored permanently on Celestia DA. This isn’t just for audit trails - it enables a new architecture: code offchain, data onchain.

Instead of writing smart contracts, you can:

  • Store state in OnchainDB tables (immutable, verifiable)
  • Run business logic in your application (flexible, upgradeable)
  • Get blockchain guarantees without blockchain complexity

Use cases this enables:

ApplicationHow It Works
StablecoinsBalances in tables, transfers as appends, mint/burn logic offchain
Token systemsOwnership records in collections, transfer validation in your app
Voting/governanceVotes as immutable records, tallying logic offchain
Asset registriesTitle records, ownership history, all verifiable
Settlement systemsTransaction logs, reconciliation, audit-ready by default
Loyalty programsPoints ledger, redemption history, cross-merchant queries

The pattern:

flowchart LR subgraph Traditional SC[Smart Contract] --> Chain[Blockchain] SC -.->|Complex, expensive| Chain end subgraph OnchainDB App[Your App] -->|Business logic| OCDB[OnchainDB] OCDB -->|Immutable state| DA[Celestia DA] App -.->|Simple, flexible| OCDB end

Smart contracts are powerful but rigid. OnchainDB gives you the immutability and verifiability of a blockchain with the flexibility of a traditional database. Upgrade your logic anytime - your data history remains tamper-proof.


Why Publish to OnchainDB

OnchainDB serves data out - but first, someone has to put data in. Here’s why data providers are publishing:

Data ProviderWhat They PublishWho QueriesRevenue Source
E-commerce retailersProduct catalogs, inventory, pricesShopping/comparison agentsPer-query from price aggregators
API providersPricing, rate limits, capabilitiesDeveloper agentsPer-query for API discovery
Financial data vendorsMarket data, prices, indicatorsTrading/analytics agentsPer-query micropayments
IoT networksSensor readings, telemetryMonitoring agentsPer-query for real-time data
Content platformsMetadata, summaries, embeddingsDiscovery agentsPer-query for content search
Logistics providersShipping rates, ETAs, capacityProcurement agentsPer-query for supply chain
DataDAOsAggregated personal data insightsResearch/analytics agentsPer-query with contributor splits
Security vendorsThreat intel, IOCs, attack logsSOC agents, SIEM toolsPer-query for threat feeds
AI agentsChain-of-thought logs, decisionsAuditors, compliance, researchersPer-query for transparency
Any applicationAudit trails, event logsCompliance, forensics, analyticsImmutable retention + monetization

The pitch is simple: You already have a database. Sync a copy to OnchainDB and turn reads into revenue. Or let others write to your collections and charge for that too.

flowchart LR subgraph Your Infrastructure DB[(Your Database)] -->|Sync| OCDB[OnchainDB] end subgraph Revenue A1[Agent 1] -->|Read + $0.001| OCDB A2[Agent 2] -->|Write + $0.002| OCDB A3[Agent N] -->|Read + $0.001| OCDB OCDB -->|70%| YOU[You] end

What changes:

Before OnchainDBAfter OnchainDB
Build custom APIsPublish once, query anywhere
Negotiate data dealsAutomatic per-query payments
Pay for bandwidthGet paid for bandwidth
Data sits unusedData generates revenue
No audit trailImmutable provenance on Celestia

Every query is a transaction - reads and writes. Every transaction pays the data provider. No sales team required.


When to Use OnchainDB

Our primary focus is AI agents - they generate high query volumes and need frictionless cross-app data access. But OnchainDB is usage-agnostic:

If you’re…Use OnchainDB to…
Building an AI agentQuery data from multiple apps, pay automatically
Fine-tuning models (Unsloth, Axolotl)Pull training datasets with automatic payment
Running a DataDAO (Vana)Expose aggregated data to any consumer, earn per query
Building MCP toolsAdd a monetizable data source to your MCP server
Publishing dataMonetize every read without building payment infrastructure
Need audit trailsGet immutable, verifiable data history on Celestia
Running analytics pipelinesAggregate cross-app metrics, pay providers automatically

OnchainDB is the data layer you add when:

  • Your data should generate revenue
  • Any consumer (agent, script, app) needs to query across app boundaries
  • You need verifiable, immutable records
  • You don’t want to build payment infrastructure

OnchainDB is NOT for:

  • Personal data pooling for AI training (use Vana)
  • Agent identity/reputation (use ERC-8004)
  • Payment settlement rails (use Tempo, x402)
  • Agent-to-agent communication (use MCP, ACP)

We do one thing: queryable data with payments built in.

npm install @onchaindb/sdk

Start building or follow us on Twitter.