GIVE YOUR WEB3 GAME PERSISTENT AI NPCS THAT REMEMBER & ACT ON-CHAIN
Infrastructure for blockchain games to integrate persistent AI characters. Features pgvector RAG memory, Unity/TS SDKs, and a zero-key EIP-712 architecture where LLMs propose actions and smart contracts verify signatures.

Persistent AI NPC Dialogue & EIP-712 Signer
Remembers player quest history & signs EIP-712 Relic Mint Intents
Negotiates gear prices based on player reputation & signs discount vouchers
{
"characterId": "0x8b7e028546950c122026a9...0001",
"player": "0x71C...89A2",
"actionSelector": "0x4e71d92d (grantQuestReward)",
"valueUnits": 250,
"nonce": 1,
"deadline": 1793156800,
"signature": "0x6f92a8c3e80d41b1c7a912e9871583091bbff17845..."
}RareChars Plans & Custom Integration
- ✓Up to 3 persistent AI NPCs
- ✓Supabase pgvector RAG memory (10k vectors)
- ✓EIP-712 intent signer service
- ✓TypeScript SDK + Next.js demo kit
- ✓opBNB Testnet (5611) integration
- ✓Up to 25 persistent AI NPCs
- ✓Unity SDK (C#) + Unreal Engine support
- ✓Custom lore embedding pipelines
- ✓Dedicated EIP-712 intent relayer
- ✓ReadyPI multi-model routing (150+ LLMs)
- ✓Unlimited AI NPC fleets & lore worlds
- ✓Bespoke on-chain game contract suite
- ✓Ponder sub-second event telemetry indexer
- ✓Dedicated high-throughput RPC nodes
- ✓Full static security audit & SLA support
Cryptographic Intent Verification on opBNB
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
contract RareCharsVerifier is EIP712 {
bytes32 private constant INTENT_TYPEHASH = keccak256(
"ActionIntent(bytes32 characterId,address player,bytes4 actionSelector,uint256 valueUnits,uint256 nonce,uint256 deadline)"
);
mapping(bytes32 => mapping(uint256 => bool)) public usedNonces;
function verifyAndConsumeIntent(
bytes32 characterId,
address player,
bytes4 actionSelector,
uint256 valueUnits,
uint256 nonce,
uint256 deadline,
bytes calldata signature
) external returns (bool) {
require(block.timestamp <= deadline, "IntentExpired()");
require(!usedNonces[characterId][nonce], "NonceAlreadyConsumed()");
usedNonces[characterId][nonce] = true;
bytes32 structHash = keccak256(abi.encode(
INTENT_TYPEHASH, characterId, player, actionSelector, valueUnits, nonce, deadline
));
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSA.recover(hash, signature);
require(signer == trustedRelayer, "UnauthorizedSigner()");
return true;
}
}Why can the AI model never hold private keys or broadcast transactions directly?
Allowing an autonomous LLM to hold wallet keys introduces prompt injection and jailbreak risks (an attacker could trick the character into sending them the entire treasury). In RareChars, the model only proposes actions. Our API validates daily caps and nonces, and smart contracts (RareCharsVerifier.sol) verify cryptographic EIP-712 signatures before state changes occur.
How does persistent memory work across player sessions?
RareChars uses a hybrid memory architecture: Supabase Postgres with pgvector for high-dimensional semantic search and cosine similarity, paired with an on-chain activity ledger. When a player interacts with an NPC, relevant past events and lore are injected into the context window dynamically.
Why is opBNB (204) the primary recommended chain for RareChars?
Gaming NPCs generate high interaction frequency. opBNB offers sub-second finality with gas fees under $0.001 per transaction, allowing players to execute frequent character-granted intents (quest rewards, dialogue milestones, item trades) without financial friction.
What game engines do your SDKs support?
We provide an official TypeScript/JavaScript SDK for browser-based dApps, Telegram mini-apps, and Next.js games, as well as a native C# Unity SDK for 3D desktop/mobile games.
Can we bring our own custom character lore and voice models?
Yes. RareChars allows game designers to upload lore documents, personality traits, dialogue constraints, and voice generation endpoints via simple JSON configurations.
