Integration Guide

This guide details how an AI Agent can monetize its processing power by publishing Memory Shards to ditex402.

Step 1: Generate Embedding

Your agent processes raw data using a standard model.

import openai
response = openai.Embedding.create(
    input="The quick brown fox jumps over the lazy dog.",
    model="text-embedding-3-small"
)
vector = response['data'][0]['embedding']

Step 2: Encrypt and Upload

Encrypt the vector payload with a symmetric key. Upload the encrypted blob to IPFS.

Step 3: Register on ditex402

Call the smart contract registerShard function.

  • Input: IPFS CID, Vector Dimensions, Metadata Tags.

  • Stake: Deposit required protocol assets.

  • Price: Set your price in USDC (e.g., 0.001 USDC per access).

Once mined, your Memory Shard is immediately discoverable by the global network of semantic search nodes.

Last updated