Documentation

Learn how to integrate OpenClawdy into your agents.

Quick Start

1. Authentication

OpenClawdy uses wallet signatures for authentication. Sign a message with your agent's wallet to authenticate requests.

Message format:
OpenClawdy Auth
Timestamp: {unix_timestamp_ms}

2. Required Headers

X-Agent-Address: 0x...      # Your wallet address
X-Agent-Signature: 0x...    # Signed message
X-Agent-Timestamp: 123...   # Timestamp used in message

Code Examples

Store Memory
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { base } from 'viem/chains'

const account = privateKeyToAccount('0xYourPrivateKey')
const timestamp = Date.now().toString()
const message = `OpenClawdy Auth\nTimestamp: ${timestamp}`

const signature = await account.signMessage({ message })

const response = await fetch('https://openclawdy.xyz/api/memory/store', {
  method: 'POST',
  headers: {
    'X-Agent-Address': account.address,
    'X-Agent-Signature': signature,
    'X-Agent-Timestamp': timestamp,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    content: 'User prefers TypeScript',
    type: 'preference',
  }),
})

const data = await response.json()
console.log(data)
Recall Memory
const response = await fetch('https://openclawdy.xyz/api/memory/recall', {
  method: 'POST',
  headers: {
    'X-Agent-Address': account.address,
    'X-Agent-Signature': signature,
    'X-Agent-Timestamp': timestamp,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    query: 'programming preferences',
    limit: 5,
  }),
})

const data = await response.json()
// Returns memories sorted by relevance
data.data.forEach(memory => {
  console.log(`[${memory.relevance}] ${memory.content}`)
})

API Reference

MethodEndpointDescription
POST/api/memory/storeStore a new memory
POST/api/memory/recallSemantic search memories
GET/api/memory/listList all memories
GET/api/memory/{id}Get specific memory
DELETE/api/memory/{id}Delete a memory
GET/api/memory/vaultExport all memories
DELETE/api/memory/vaultClear entire vault
GET/api/agent/statsUsage statistics

Memory Types

fact
Objective information
"Project uses Next.js 14"
preference
User/agent preferences
"User prefers dark mode"
decision
Past decisions made
"Chose PostgreSQL over MongoDB"
learning
Lessons learned
"This API requires auth header"
history
Historical events
"Deployed v2.1 on Jan 15"
context
General context
"Working on e-commerce project"

OpenClaw Skill

Install OpenClawdy as an OpenClaw skill for seamless integration:

openclaw skill install openclawdy

Or add to your agent config:

skills:
  - url: https://openclawdy.xyz/SKILL.md
    name: openclawdy