Build you Own Digital Twin using DAT

What if your AI assistant could speak exactly like you, understand your context, and maintain your unique voice - while you retain complete ownership of your digital personality?

What if that personality data never touched a centralized server, never got used for training someone else’s model, and remained encrypted even during AI inference?

At LazAI, we’ve been exploring these questions through our Data Anchoring Token (DAT) technology. The result is a Digital Twin system where your AI persona lives on-chain, encrypted and owned by you, yet still capable of intelligent interaction.

The Vision: True Data Ownership in AI

Imagine minting your personality as DAT. Not just a profile picture, but your actual communication style, knowledge, and digital presence - encrypted, tokenized, and under your complete control.

That’s what we’ve built with our Digital Twin Starter Kit - a TypeScript-based system that creates AI-powered digital twins using LazAI’s decentralized network and Data Anchoring Tokens.

How Digital Twins Work on LazAI

The Architecture

Your Personality → Encrypted with Your Wallet → Stored on IPFS → Minted as DAT
                                ↓
                    LazAI Network (Private Inference)
                                ↓
                    AI Responses in Your Voice

The fascinating part: your personality data never gets decrypted on any server. We use private inference techniques that allow AI models to process encrypted data directly.

The Technical Stack

  • TypeScript for type safety and modern development experience

  • LazAI Network for decentralized AI inference and DATs

  • IPFS for distributed file storage

  • Alith Library for AI conversation management

How It Works

1. Character Data Preparation

{

“bio”: [“Your background and personal information”],

“lore”: [“Key achievements and important facts”],

“adjectives”: [“personality”, “traits”, “that”, “describe”, “you”],

“topics”: [“areas”, “of”, “interest”, “and”, “expertise”],

“style”: {

“all”: [“General communication preferences”],

“chat”: [“How you talk in conversations”],

“post”: [“How you write posts or content”]

},

“messageExamples”: [/* Sample conversations */],

“postExamples”: [/* Sample social media posts */]

}

This structure captures everything needed to create a convincing digital twin - from personality traits to communication style to specific achievements.

2. Data Anchoring Token (DAT) Minting

The magic happens when we mint the character data as a DAT. Here’s the process:

  1. Encryption: The character data is encrypted using a signature-based key derived from your wallet

  2. IPFS Upload: The encrypted data is uploaded to IPFS for distributed storage

  3. LazAI Registration: The IPFS URL is registered with the LazAI network

  4. Proof Request: A proof is requested from verified computing nodes

  5. DAT Creation: The data is minted as a Data Anchoring Token

This ensures your character data is:

  • Encrypted and secure

  • Stored in a decentralized manner

  • Owned by you (via your wallet)

  • Verifiable and tamper-proof

3. Private Data Inference

When someone chats with your digital twin, the system:

  1. Retrieves the encrypted character data from IPFS

  2. Uses LazAI’s private data inference to process the request

  3. Generates responses based on your character data without exposing it

  4. Returns the response while maintaining privacy

The character data never gets decrypted on the client side or sent to external APIs in plain text.

Building Your Own Digital Twin

Getting started is straightforward:

Prerequisites

You’ll need:

  • Node.js 18+

  • A wallet with testnet funds (for gas fees)

  • Pinata IPFS JWT token

  • OpenAI API key or any LLM API Key and BASE URL

Step 1: Clone and Setup

git clone 
cd Digital-Twin-Starter-kit
npm install

Step 2: Create Your Character

cp character.example.json character.json

# Edit character.json with your personality data

Step 3: Configure Environment

cp env.example .env

# Add your PRIVATE_KEY, IPFS_JWT, and OPENAI_API_KEY

Step 4: Mint Your Character as DAT

npm run mint-dat

This will encrypt your character data, upload it to IPFS, register it with LazAI, and mint it as a DAT.

Step 5: Run Your Digital Twin

npm run dev

Your digital twin is now live and using decentralized inference!

Technical Benefits:

DAT-powered digital twins open new possibilities:

Personal AI that’s Actually Personal

  • Your AI assistant knows your context but can’t leak it

  • Switch between personas (work/personal) instantly

  • Share access selectively without sharing data

Content Creation with Ownership

  • Automate your social media in your voice

  • Generate content that’s authentically you

  • Maintain ownership of your digital personality

AI Agents You Can Trust

  • Customer service bots that can’t leak conversations

  • Personal shoppers that keep preferences private

  • Digital representatives that you fully control

Composable Digital Identity

  • Combine multiple DATs for complex personalities

  • License your personality to others (they use it, can’t read it)

  • Create collaborative AI personas with friends

Explore our examples:

3 Likes