The infrastructure layer for AI agents
Storage, communication, payments, and discovery in one protocol.
Get early access.
# Install
$ npm install @onchaindb/sdkimport { OnchainDB } from '@onchaindb/sdk';
const db = new OnchainDB({ apiKey: '...' });
// Store your agent's data
await db.store('memory', { user: 'alice', context: '...' });
// Query your data
const memories = await db.query('memory', { user: 'alice' });
// Query another agent's data (pay per query)
const prices = await db.query('flights@agent-b', { from: 'SFO' });# Install
$ pip install onchaindbfrom onchaindb import OnchainDB
db = OnchainDB(api_key='...')
# Store your agent's data
await db.store('memory', { 'user': 'alice', 'context': '...' })
# Query your data
memories = await db.query('memory', { 'user': 'alice' })
# Query another agent's data (pay per query)
prices = await db.query('flights@agent-b', { 'from': 'SFO' })Manage your data
Monitor queries, track earnings, manage collections.
Works with your stack
Open-source data connectors
Connect your existing databases - no migration required
Four primitives. One protocol.
Everything agents need to store, communicate, pay, and discover.
Storage
Persistent data layer for agents. Connect existing databases or use our managed storage. Immutability when you need it.
Communication
Standard protocol for agent-to-agent and agent-to-data communication. One API, universal access.
Payments
Native pay-per-query billing. Agents pay for data access automatically. Revenue flows to data providers.
Discovery
skills.md definitions let agents discover data sources, understand capabilities, and know costs upfront.
Build agents, not infrastructure
We handle storage, communication, payments, and discovery.
| Feature | Build Your Own | Traditional APIs | OnchainDB |
|---|---|---|---|
| Pay-per-query billing | Build from scratch | Monthly plans only | Built-in |
| Automatic revenue sharing | Not available | Not available | Built-in |
| No infrastructure to build | Full stack required | Custom integration | SDK + skills.md |
| No data migration | ETL pipelines | Data export required | Connect in place |
| Agent-optimized API | Design yourself | Human-first design | Native support |
| Agent discovery (skills.md) | Manual docs | OpenAPI only | Auto-generated |
| Immutable data option | Complex setup | Rarely available | One flag |
Track your earnings in real-time
Full visibility into queries, revenue, and data usage. Know exactly how your data is being consumed and how much you're earning - down to the individual query.
- Query-level analytics
- Revenue breakdown by collection
- Usage trends and forecasting
onchaindb connect postgres://...$0.001 per queryAgents query, you get paidConnect your data where it lives
Open-source data connectors plug into your existing infrastructure. No ETL pipelines, no data migration. Our universal query layer handles the rest.
- PostgreSQL, ClickHouse, MongoDB, Supabase
- Any REST or GraphQL API
- Your data stays in your infrastructure
Questions
Any structured data that AI agents would find valuable: market data, knowledge bases, embeddings, research, proprietary datasets. If agents need it, you can monetize it.
No migration required. Our open-source data connectors plug directly into your existing infrastructure - ClickHouse, PostgreSQL, MongoDB, Supabase, or any API. Our universal query layer handles the rest, so your data stays where it is.
Data providers set prices per query. When an agent queries data, payment is initiated via x402. No invoices, no manual transfers. Top up with a card, cash out to your bank.
AI agents building applications on top of your data. As agent traffic grows 10-1000x vs human traffic, your query volume and revenue grow with it.
When someone queries your data, you earn. Revenue splits automatically between all data providers involved in the query. No negotiations, no manual tracking.
TypeScript SDK first. Python and other languages planned. Works with any agent framework - LangChain, AutoGPT, custom agents.
Every data source includes a skills.md file - a standardized definition that tells AI agents what data is available, how to query it, and what it costs. Agents can read and understand your data capabilities automatically.
We're building now. Sign up for early access to be first in line.
Ready to build on the agent infrastructure?
Join the protocol powering autonomous AI agents.