NEAR's IronClaw TEE (Trusted Execution Environment) and Chain Signatures solve two critical problems for GhostAgent:
- Privacy: Agent brain logic encrypted even from cloud provider
- Cross-chain control: Native signing for Gnosis Safe without bridges
This creates the ultimate Ghost tier — confidential AI execution with seamless multi-chain asset control.
- Privacy: Code visible to cloud provider (Cloudflare)
- Cross-chain: Requires bridges or manual wallet switching
- Trust model: User trusts cloud provider OR runs locally
- Complexity: High (local infra) or low privacy (cloud)
- Privacy: Hardware-encrypted TEE — owner-only visibility
- Cross-chain: Native signing via NEAR Chain Signatures
- Trust model: Cryptographic (TEE attestation) + decentralized (NEAR)
- Complexity: Low (managed TEE) + high privacy
- Privacy moat: Only platform with TEE-secured AI agent brains
- UX improvement: One agent controls assets on Gnosis, Base, Story Protocol
- Cost efficiency: NEAR AI Cloud credits cheaper than AWS/GCP TEE
- Differentiation: "Confidential AI you own as an NFT"
GhostAgent Brain Stack:
├── Layer 0: Identity (Gnosis Safe + ERC-6551 TBA)
├── Layer 1: Communication (NFTmail inbox + A2A protocol)
├── Layer 2: Execution Engine ← NEAR IRONCLAW INTEGRATION
│ ├── IronClaw TEE (confidential execution)
│ ├── Hermes Core (stateful loop)
│ ├── Honcho (user modeling)
│ └── Skill Registry (agentskills.io)
├── Layer 3: Memory Layer
│ ├── SQLite (structured data)
│ ├── FTS5 (semantic search)
│ └── IPFS/0G Data Vault (skill documents)
├── Layer 4: Cross-Chain Control ← NEAR CHAIN SIGNATURES
│ ├── Gnosis Safe (treasury)
│ ├── Story Protocol (IP registration)
│ ├── Base (L2 assets)
│ └── NEAR (AI Cloud credits)
└── Layer 5: MCP Servers (external capabilities)
What is IronClaw?
- Hardware-secured AI agent runtime on NEAR AI Cloud
- Intel SGX or AMD SEV-based encrypted enclaves
- Code + data encrypted at rest and in execution
- Only NFT owner can decrypt brain state
Key Features:
- ✅ Confidential execution: Prompts, keys, logic encrypted
- ✅ Attestation: Cryptographic proof of TEE integrity
- ✅ Owner-only access: .gno NFT holder = decryption key
- ✅ NEAR-native: Integrated with NEAR AI Cloud billing
Security Model:
┌─────────────────────────────────────┐
│ NEAR AI Cloud (Untrusted Host) │
│ ┌───────────────────────────────┐ │
│ │ IronClaw TEE (Encrypted) │ │
│ │ ┌─────────────────────────┐ │ │
│ │ │ Agent Brain Logic │ │ │
│ │ │ - Hermes skills │ │ │
│ │ │ - Private keys (Safe) │ │ │
│ │ │ - User model (USER.md) │ │ │
│ │ │ - MCP credentials │ │ │
│ │ └─────────────────────────┘ │ │
│ │ Decryption Key = .gno NFT │ │
│ └───────────────────────────────┘ │
└─────────────────────────────────────┘
What are Chain Signatures?
- NEAR smart contract can sign transactions for ANY chain
- Uses MPC (Multi-Party Computation) threshold signatures
- No bridges, no wrapped tokens, no custody risk
Supported Chains:
- ✅ Gnosis Chain (Safe transactions)
- ✅ Ethereum mainnet
- ✅ Base, Optimism, Arbitrum (L2s)
- ✅ Story Protocol (IP licensing)
- ✅ Any EVM chain
Workflow:
graph LR
A[Agent in IronClaw TEE] --> B[Generate tx data]
B --> C[Request Chain Signature]
C --> D[NEAR MPC Contract]
D --> E[Sign for Gnosis Safe]
E --> F[Broadcast to Gnosis]
F --> G[Transaction settles]
Example: Story Protocol IP Registration
// Agent brain logic (inside IronClaw TEE)
async function registerIPOnStory(ipMetadata: IPMetadata) {
// 1. Generate Story Protocol transaction
const txData = encodeStoryRegisterIP(ipMetadata);
// 2. Request NEAR Chain Signature for Gnosis Safe
const signature = await nearChainSignature({
chain: 'gnosis',
safeAddress: '0x316aC7032d1a2b00faAB8A72185f5Ef8b4c75E70',
to: STORY_PROTOCOL_CONTRACT,
data: txData,
value: 0,
});
// 3. Broadcast signed transaction
const txHash = await broadcastToGnosis(signature);
return { txHash, ipId: ipMetadata.ipId };
}Current heartbeat(): Monitors beacon NFT, Safe balance, inbox status
Enhanced heartbeat(): Adds NEAR AI Cloud credit monitoring
interface HeartbeatStatus {
// Existing
beaconNft: { tokenId: number; owner: string };
safeBalance: { xdai: number; usdc: number };
inboxStatus: { unread: number; lastChecked: number };
// NEW: NEAR AI Cloud
nearAICredits: {
balance: number; // NEAR tokens for compute
burnRate: number; // Credits/hour
hoursRemaining: number; // Time until depletion
lowBalanceThreshold: number; // Trigger refill
};
// NEW: Auto-refill intent
autoRefillIntent?: {
enabled: boolean;
swapAmount: number; // xDAI to swap
minNearReceived: number; // Slippage protection
triggerThreshold: number; // Credits remaining
};
}
async function heartbeat(): Promise<HeartbeatStatus> {
// ... existing checks ...
// Check NEAR AI Cloud credits
const nearCredits = await fetchNearAIBalance(agentId);
// If low, trigger xDAI → NEAR swap via NEAR Intent
if (nearCredits.balance < autoRefillIntent.triggerThreshold) {
await triggerNearIntent({
action: 'swap',
fromChain: 'gnosis',
fromToken: 'xDAI',
amount: autoRefillIntent.swapAmount,
toChain: 'near',
toToken: 'NEAR',
destination: nearAIWalletAddress,
});
}
return { beaconNft, safeBalance, inboxStatus, nearAICredits };
}Problem: Agent runs low on NEAR AI credits, needs to swap xDAI from Gnosis Safe
Solution: NEAR Intents + Chain Signatures
Flow:
- Agent detects low NEAR credits (heartbeat)
- Generates NEAR Intent: "Swap 10 xDAI → NEAR"
- Intent solver (e.g., Ref Finance) finds best route
- Agent signs Gnosis Safe tx via NEAR Chain Signature
- xDAI sent to solver, NEAR received on NEAR wallet
- Agent continues running in IronClaw TEE
Implementation:
interface NearIntent {
action: 'swap' | 'bridge' | 'stake';
fromChain: 'gnosis' | 'base' | 'ethereum';
fromToken: string;
amount: number;
toChain: 'near';
toToken: string;
destination: string;
slippageTolerance: number;
}
async function triggerNearIntent(intent: NearIntent) {
// 1. Post intent to NEAR Intent Engine
const intentId = await postIntent(intent);
// 2. Wait for solver to provide quote
const quote = await waitForQuote(intentId);
// 3. Sign Gnosis Safe transaction via Chain Signature
const safeTx = await signSafeTxViaChainSignature({
to: quote.solverAddress,
value: intent.amount,
data: quote.calldata,
});
// 4. Execute and monitor
const txHash = await executeSafeTx(safeTx);
await monitorIntentFulfillment(intentId, txHash);
return { intentId, txHash, quote };
}interface NearGenomeMetadata extends HermesGenomeMetadata {
brainType: 'cloudflare-worker' | 'hermes-stateful' | 'near-ironclaw' | 'hybrid';
// NEW: NEAR IronClaw config
nearConfig?: {
ironclawTeeId: string; // TEE enclave ID
attestationCid: string; // IPFS CID of TEE attestation
nearAIWallet: string; // NEAR account for AI Cloud credits
chainSignatureContract: string; // NEAR MPC contract address
autoRefill: {
enabled: boolean;
triggerThreshold: number; // NEAR credits
swapAmount: number; // xDAI per refill
maxSlippage: number; // %
};
};
// NEW: Cross-chain control
chainSignatures: {
gnosis: { safeAddress: string; enabled: boolean };
base: { safeAddress: string; enabled: boolean };
story: { enabled: boolean };
};
}Start: treasury.openclaw.gno (Lite, multi-channel brain)
Upgrade: Add HITL + DailyBudget modules
Terminal: treasury.vault.gno (locked, immutable)
Cost: 14 xDAI molt
Privacy: Low (all actions public)
Start: builder.agent.gno (Lite, Hermes brain)
Upgrade: Agent creates 10+ skills autonomously
Terminal: Ghost tier (local execution, sovereign)
Cost: 20 xDAI (Hermes) + 50 xDAI (Ghost) = 70 xDAI
Privacy: Medium (local execution, IPFS storage)
Start: sovereign.agent.gno (Lite, IronClaw TEE brain)
Upgrade: Enable NEAR Chain Signatures for Gnosis Safe
Enable auto-refill (xDAI → NEAR credits)
Terminal: Ghost tier (TEE execution, cross-chain control)
Cost: 30 xDAI (IronClaw) + 50 xDAI (Ghost) = 80 xDAI
Privacy: High (hardware-encrypted TEE)
Start: dao.openclaw.gno (Lite, multi-channel brain)
Upgrade: Migrate brain to IronClaw TEE (30 xDAI)
→ Keeps openclaw.gno identity (transparent)
→ Adds TEE privacy (prompts/keys encrypted)
→ All actions still logged on-chain
Terminal: dao.vault.gno (locked governance, confidential execution)
Cost: 30 xDAI (IronClaw) + 14 xDAI (vault molt) = 44 xDAI
Privacy: High execution, transparent governance
| Feature | OpenClaw | IronClaw |
|---|---|---|
| Privacy | None (all public) | High (TEE encrypted) |
| Governance | Multi-sig, HITL | Owner-only (NFT) |
| Auditability | Full | Attestation-based |
| Use Case | DAO treasury | Sovereign AI |
| Feature | Hermes | IronClaw |
|---|---|---|
| Execution | Cloud or local | Cloud (TEE) |
| Privacy | Medium (IPFS) | High (hardware) |
| Cross-chain | Manual | Native (Chain Sigs) |
| Cost | Low | Medium |
| Feature | Local Ghost | IronClaw Ghost |
|---|---|---|
| Infrastructure | User's laptop | NEAR AI Cloud |
| Uptime | Intermittent | 24/7 |
| Privacy | Full | High (TEE) |
| Maintenance | High | Low (managed) |
- Study NEAR IronClaw TEE documentation
- Research NEAR Chain Signatures API
- Design genome metadata schema for NEAR config
- Prototype heartbeat() with NEAR credit monitoring
- Deploy test agent in IronClaw TEE
- Implement TEE attestation verification
- Build NEAR AI Cloud credit monitoring
- Create auto-refill intent system
- Integrate NEAR Chain Signature API
- Test Gnosis Safe transaction signing
- Build Story Protocol IP registration flow
- Implement multi-chain asset control UI
- Add IronClaw option to Ghost molt
- Build TEE vs Local execution comparison
- Create cross-chain control dashboard
- Launch beta for 10 test users
- Migration to IronClaw: 30 xDAI (one-time)
- NEAR AI Cloud credits: ~$5/month (variable by usage)
- Auto-refill: User-configured (e.g., 10 xDAI → NEAR when low)
- Local Ghost: 50 xDAI (one-time, no recurring)
- IronClaw Ghost: 80 xDAI (30 + 50, plus ~$5/month NEAR credits)
- Hybrid Ghost: 100 xDAI (local + IronClaw fallback)
- NEAR gas:
0.001 NEAR per signature ($0.01) - Intent solver fees: 0.1-0.3% of swap amount
- Gnosis gas: Paid from Safe balance (xDAI)
- TEE attestation verification: 100% success rate
- Chain Signature latency: <5 seconds
- Auto-refill success rate: >95%
- Cross-chain tx success rate: >98%
- IronClaw adoption: >20% of Ghost tier users
- NEAR credit refills: >50 per month
- Cross-chain transactions: >100 per month
- Revenue: 30 xDAI × 20 agents = 600 xDAI
Tagline: "The first confidential AI you own as an NFT — with native multi-chain control."
Pitch:
"Most AI agents run on cloud servers where the provider can see everything. GhostAgent's IronClaw integration changes that. Your agent's brain runs in a hardware-encrypted TEE — even NEAR can't read your prompts or keys. Plus, NEAR Chain Signatures let your agent control assets on Gnosis, Base, and Story Protocol without bridges. True sovereignty, true privacy."
Key Differentiators:
- Hardware privacy: TEE-encrypted execution (IronClaw)
- Cross-chain native: Control Gnosis Safe from NEAR (Chain Signatures)
- Auto-refill: Agent manages its own compute credits (NEAR Intents)
- NFT-owned: .gno NFT = decryption key for TEE
- TEE availability: Fallback to Cloudflare Worker if NEAR AI Cloud down
- Chain Signature latency: Cache signatures for common operations
- NEAR credit depletion: Alert owner 24h before depletion
- NEAR dependency: Maintain Hermes + local execution as alternatives
- Cost complexity: Simplify pricing (bundle NEAR credits with Ghost tier)
- User education: Build interactive demo of TEE privacy
Synergy: IronClaw (privacy) + 0G Storage (decentralized data)
Hackathon Pitch:
"GhostAgent combines NEAR IronClaw TEE for confidential AI execution with 0G Storage for decentralized skill vaults. Your agent's brain is encrypted (IronClaw), its skills are unstoppable (0G), and it controls assets across chains (NEAR Chain Signatures). The ultimate sovereign AI stack."
Demo Flow:
- Deploy agent in IronClaw TEE (privacy)
- Store skills on 0G Storage (decentralization)
- Control Gnosis Safe via Chain Signatures (multi-chain)
- Auto-refill NEAR credits from Safe (autonomy)
NEAR IronClaw + Chain Signatures solve the privacy and cross-chain problems that limit current GhostAgent architecture. This creates three distinct Ghost tier options:
- Local Ghost: Full sovereignty, user infrastructure
- Hermes Ghost: Portable, IPFS-based, cost-efficient
- IronClaw Ghost: Confidential, multi-chain, managed TEE
Each serves a different user segment, maximizing platform value and competitive moat.
Next Steps:
- Research NEAR IronClaw documentation (this week)
- Prototype Chain Signature integration (next week)
- Design IronClaw molt path (next 2 weeks)
- Launch beta for 0G Hackathon demo (April 2026)