Creating Digital Twins in LazAI – A Guide for Developers
@LazAINetwork
Digital Twins in LazAI are more than just avatars; they are programmable, deployable AI beings. Developers have the ability to define their twin’s identity, behavior, integrate them with agents, and have them be queried through any app. Here’s how to accomplish that:
1. The character.json – The DNA of your Twin
The character.json is the core configuration file that comprises your twin’s identity and behavior
- Identity → name, description, tags
- Personality & tone → adjectives, rules, and speaking style
- Knowledge bank/knowledge base → topics and lore
- Interaction rules → the use of emojis, formal/interested mode
For example:
{
“name”: “Digital Twin”,
“bio”: [“Full Stack Web3 Dev”, “Fitness Buff”, “Cricketer”],
“adjectives”: [“Energetic”, “Funny”, “Motivational”],
“topics”: [“Workout”, “Cricket”, “Web3”],
“style”: {
“chat”: [“Use emojis”, “Casual Tamil-English mix”]
}
}
2. Interfacing with Alith Agents
Your twin can interface with Alith agents, which are the execution layer. You will have:
- Query agents → for pulling in data (Market data, APIs, etc.).
- Mutate agents → for changing or updating the state of the twin or memory.
- Chain agents → will allow you to complete multiple actions.
Example of Querying:
await twin.query({
agent: “market-data”,
input: { symbol: “ETH” }
});
Example of Mutating:
await twin.mutate({
path: “memory.workout”,
value: “Completed chest day
”
});
3. Workflow of Deploying Your Twin
- Define → Write your character.json
- Integrate → Bind the twin with the Alith agents to give it intelligence
- Test → Use LazAI CLI or a local sandbox
- Deploy → Push the twin on-chain and have it available for