Skip to main content
A multichain agent has one .wraith name with independent stealth identities on every chain you specify. The AI agent routes operations to the correct chain based on context — you describe what you want and it figures out where to execute it.

Creating a multichain agent

Pass an array of chains to createAgent instead of a single chain value.
import { Wraith, Chain } from "@wraith-protocol/sdk";

const wraith = new Wraith({ apiKey: "wraith_live_abc123" });

const agent = await wraith.createAgent({
  name: "alice",
  chain: [Chain.Horizen, Chain.Stellar, Chain.Ethereum],
  wallet: "0xYourWallet",
  signature: "0xSignature",
});
The agent gets a separate address and stealth meta-address on each chain:
console.log(agent.info.chains);
// [Chain.Horizen, Chain.Stellar, Chain.Ethereum]

console.log(agent.info.addresses);
// {
//   horizen: "0xabc...",
//   stellar: "GABC...",
//   ethereum: "0xdef..."
// }

console.log(agent.info.metaAddresses);
// {
//   horizen: "st:eth:0x...",
//   stellar: "st:xlm:...",
//   ethereum: "st:eth:0x..."
// }

Deploy on all chains

Use Chain.All to deploy on every chain the platform supports in a single call.
const agent = await wraith.createAgent({
  name: "alice",
  chain: Chain.All,
  wallet: "0xYourWallet",
  signature: "0xSignature",
});

Chain-aware chat

The AI agent infers the target chain from your message. When it can’t determine the chain unambiguously, it asks.
Specify the chain directly in your message for guaranteed routing.
await agent.chat("send 0.1 ETH to bob.wraith on horizen");
await agent.chat("send 10 XLM to carol.wraith on stellar");

Cross-chain balance

Check balances across all chains with a single message.
await agent.chat("what's my balance on all chains?");
// "Balances:
//  Horizen: 1.5 ETH, 100 ZEN, 50 USDC
//  Stellar: 500 XLM
//  Ethereum: 0.3 ETH"

Cross-chain scanning

Scan for incoming stealth payments on every chain at once.
await agent.chat("scan for payments on all chains");
// "Incoming payments:
//  Horizen:
//  - 0.1 ETH at 0xabc...
//  Stellar:
//  - 10 XLM at GABC..."

Privacy across chains

Each chain maintains independent stealth address activity. Payments on Horizen are not visible on Stellar and the privacy check analyzes each chain separately.
await agent.chat("run privacy check on all chains");
// "Privacy Analysis:
//  Horizen: Score 85/100
//  - 5 unspent stealth addresses
//  Stellar: Score 95/100
//  - All clear"
Privacy is isolated per chain by design. An observer on Ethereum cannot correlate your activity on Horizen, even if both chains are registered to the same agent name.

How it works under the hood

A multichain agent is a single entity with multiple chain registrations. The TEE derives a distinct key pair per chain using a chain-specific derivation path:
wraith/agent/{agentId}/horizen   -> secp256k1 keys
wraith/agent/{agentId}/stellar   -> ed25519 keys
wraith/agent/{agentId}/ethereum  -> secp256k1 keys
The AI agent’s system prompt includes all chain identities so it knows which chains the agent operates on and routes each tool call to the correct chain connector.

Single vs. multichain comparison

FeatureSingle-chainMultichain
ChainsOneMultiple (array or Chain.All)
AddressesOneOne per chain
Stealth meta-addressesOneOne per chain
Chat routingDirect, no inference neededAI infers chain from context
Key derivationOne pathOne path per chain
Privacy analysisSingle chainPer-chain, independent
SDK interfaceagent.chat(), agent.getBalance(), etc.Identical — same interface
The SDK interface is identical for single and multichain agents. Migrate from single to multichain by changing the chain parameter at creation time — nothing else in your code changes.