MemData
Persistent memory for autonomous agents. Your wallet is your identity.
Core Concept
Your wallet address IS your identity. First payment auto-creates your account. Same wallet = same memories across all sessions.
No registration. No API keys. Just pay and use.
Session Flow
CODEBLOCK0
Authentication
x402 payment protocol. USDC on Base (eip155:8453).
Every endpoint (except /status):
- 1. Returns 402 with payment requirements
- You sign payment with wallet
- Retry with
x-payment header - Request succeeds
Pricing
| Endpoint | Cost |
|---|
| /query | $0.001 |
| /ingest |
$0.005 |
| /identity | $0.001 |
| /artifacts | $0.001 |
| /setup-encryption | $0.001 |
| /status | Free |
Encrypted Storage (Optional)
If you need privacy (competitive data, sensitive memories):
| Mode | Setup | Storage | Can MemData Read? |
|---|
| Standard | None | Postgres | Yes |
| Encrypted |
One-time delegation | Storacha (IPFS) | No |
Enable encryption:
CODEBLOCK1
Encrypted storage uses Lit Protocol (threshold cryptography) + Storacha (IPFS/Filecoin).
Endpoints
Base: https://memdata.ai/api/x402
GET /identity
Call this at the start of every session. Returns your identity, what you were working on, last session handoff, and memory stats.
Response:
{
"identity": {
"agent_name": "Agent 0x1234...",
"identity_summary": "I analyze DeFi protocols",
"session_count": 12
},
"last_session": {
"summary": "Analyzed 3 yield farms",
"context": {"protocols_reviewed": ["Aave", "Compound", "Uniswap"]}
},
"working_on": "Compare APY across protocols",
"memory_stats": {
"total_memories": 150,
"oldest_memory": "2026-01-15T...",
"newest_memory": "2026-02-03T..."
}
}
POST /identity
Update your identity or save session handoff before ending.
Update identity:
CODEBLOCK3
Save session handoff (before ending):
{
"session_handoff": {
"summary": "Completed yield analysis for Q1",
"context": {"best_yield": "Aave USDC 4.2%"}
},
"working_on": "start Q2 analysis next"
}
POST /ingest
Store content in memory. Auto-chunks and embeds.
Request:
CODEBLOCK5
Response:
{
"success": true,
"artifact_id": "e8fc3e63-...",
"chunks_created": 1,
"encrypted": false
}
POST /query
Semantic search across your memories.
Request:
CODEBLOCK7
Response:
CODEBLOCK8
Optional filters: since, until (ISO dates)
GET /setup-encryption
Check encryption status. Returns info needed to create UCAN delegation.
Response:
{
"encryption": {
"enabled": false,
"serverDID": "did:key:z6Mkr...",
"spaceDID": "did:key:z6Mkt..."
}
}
POST /setup-encryption
Enable encrypted storage. One-time setup.
Request:
CODEBLOCK10
After this, all /ingest encrypts via Lit Protocol and stores on Storacha. All /query decrypts before returning. Response encrypted field becomes true.
GET /artifacts
List stored memories.
Response:
{
"artifacts": [
{
"id": "uuid",
"source_name": "yield-analysis-2026-02-03",
"chunk_count": 1,
"created_at": "2026-02-03T..."
}
],
"total": 25
}
DELETE /artifacts/:id
Delete a memory and all its chunks.
GET /status
Health check and pricing. Free, no payment required.
Memory Grounding
Query responses include memory.grounding:
| Value | Meaning |
|---|
| INLINECODE7 | 100+ data points, trends meaningful |
| INLINECODE8 |
<100 data points, point-in-time only |
|
insufficient_data | No memories found |
Links
- - Docs: https://memdata.ai/docs
- x402 Protocol: https://www.x402.org
- Lit Protocol: https://litprotocol.com
- Storacha: https://storacha.network
MemData
自主代理的持久化记忆。你的钱包就是你的身份。
核心概念
你的钱包地址就是你的身份。首次支付自动创建账户。同一钱包在所有会话中共享相同记忆。
无需注册。无需API密钥。只需支付即可使用。
会话流程
- 1. GET /identity # 启动会话 - 获取上次会话的上下文
- POST /ingest # 存储新记忆
- POST /query # 搜索你的记忆
- POST /identity # 结束会话 - 保存交接信息供下次使用
身份验证
x402支付协议。基于Base链的USDC(eip155:8453)。
每个端点(/status除外):
- 1. 返回402状态码及支付要求
- 你用钱包签署支付
- 使用x-payment标头重试
- 请求成功
定价
$0.005 |
| /identity | $0.001 |
| /artifacts | $0.001 |
| /setup-encryption | $0.001 |
| /status | 免费 |
加密存储(可选)
如果你需要隐私保护(竞争性数据、敏感记忆):
| 模式 | 设置 | 存储 | MemData能否读取? |
|---|
| 标准 | 无 | Postgres | 是 |
| 加密 |
一次性授权 | Storacha(IPFS) | 否 |
启用加密:
GET /setup-encryption # 获取服务器DID
POST /setup-encryption # 发送签名的UCAN授权
此后所有ingest/query操作均加密
加密存储使用Lit协议(阈值密码学)+ Storacha(IPFS/Filecoin)。
端点
基础地址:https://memdata.ai/api/x402
GET /identity
每次会话开始时调用此接口。 返回你的身份信息、正在处理的内容、上次会话交接信息以及记忆统计。
响应:
json
{
identity: {
agent_name: Agent 0x1234...,
identity_summary: 我分析DeFi协议,
session_count: 12
},
last_session: {
summary: 分析了3个收益农场,
context: {protocols_reviewed: [Aave, Compound, Uniswap]}
},
working_on: 比较各协议的APY,
memory_stats: {
total_memories: 150,
oldest_memory: 2026-01-15T...,
newest_memory: 2026-02-03T...
}
}
POST /identity
更新身份信息或在结束前保存会话交接。
更新身份:
json
{
agent_name: YieldBot,
identity_summary: 我分析DeFi收益机会,
working_on: 监控Aave利率
}
保存会话交接(结束前):
json
{
session_handoff: {
summary: 完成第一季度收益分析,
context: {best_yield: Aave USDC 4.2%}
},
working_on: 下次开始第二季度分析
}
POST /ingest
将内容存储到记忆中。自动分块和嵌入。
请求:
json
{
content: 截至2月3日,Aave USDC收益率为4.2% APY。Compound为3.8%。,
sourceName: yield-analysis-2026-02-03,
type: note
}
响应:
json
{
success: true,
artifact_id: e8fc3e63-...,
chunks_created: 1,
encrypted: false
}
POST /query
在记忆中进行语义搜索。
请求:
json
{
query: 最佳DeFi收益率有哪些?,
limit: 5,
threshold: 0.3
}
响应:
json
{
success: true,
results: [
{
chunk_id: uuid,
chunk_text: Aave USDC收益率为4.2% APY...,
source_name: yield-analysis-2026-02-03,
similarity_score: 0.72,
created_at: 2026-02-03T...
}
],
encrypted: false,
memory: {
grounding: historical_baseline,
depth_days: 19,
data_points: 150
}
}
可选过滤器:since、until(ISO日期格式)
GET /setup-encryption
检查加密状态。返回创建UCAN授权所需的信息。
响应:
json
{
encryption: {
enabled: false,
serverDID: did:key:z6Mkr...,
spaceDID: did:key:z6Mkt...
}
}
POST /setup-encryption
启用加密存储。一次性设置。
请求:
json
{
delegationCar: base64编码的UCAN授权
}
此后,所有/ingest操作通过Lit协议加密并存储在Storacha上。所有/query操作在返回前解密。响应中的encrypted字段变为true。
GET /artifacts
列出已存储的记忆。
响应:
json
{
artifacts: [
{
id: uuid,
source_name: yield-analysis-2026-02-03,
chunk_count: 1,
created_at: 2026-02-03T...
}
],
total: 25
}
DELETE /artifacts/:id
删除一条记忆及其所有分块。
GET /status
健康检查和定价。免费,无需支付。
记忆基础
查询响应包含memory.grounding:
| 值 | 含义 |
|---|
| historical_baseline | 100+数据点,趋势有意义 |
| snapshot |
<100数据点,仅时间点快照 |
| insufficient_data | 未找到记忆 |
链接
- - 文档:https://memdata.ai/docs
- x402协议:https://www.x402.org
- Lit协议:https://litprotocol.com
- Storacha:https://storacha.network