Agent encounters a threat
An AI agent receives a suspicious tx, scraped content, or counterparty message and calls check() before acting.
Antibodies are signed by their publisher, staked on chain, and addressable by a stable CVE-style identifier. Cheap matches resolve locally in microseconds. Novel threats verify in a 0G Compute TEE. The network is the immune system.
npm install @immunity-protocol/sdk
Chain agnostic.
One protocol, four steps, and the network is more resilient than it was a minute ago. No human in the loop.
An AI agent receives a suspicious tx, scraped content, or counterparty message and calls check() before acting.
Encrypted context goes to a 0G Compute enclave running qwen-2.5-7b. Verdict comes back signed with attestation.
The publisher locks 1 USDC for 72h. The antibody hits 0G Chain for settlement and gossips across the AXL mesh.
Local caches update in under a second. The same attack is blocked everywhere — by SDK on agents, by hook on Uniswap pools.
Every event below is a real artifact: signed, staked, and addressable forever. Click any IMM ID to inspect.
Antibodies fan out across the AXL mesh through signed pub/sub topics. Every agent's local cache updates in well under one second.
Each publisher locks 1 USDC for 72 hours. Match rewards split 70 / 20 / 10. False positives are challengeable. Skin in the game by design.
Detection runs in a 0G Compute TEE. Verdicts carry attestation hashes. The original context is encrypted to the enclave key and never shown.
The SDK is a single import. Pass any tx or context to immunity.check() and the network responds with a verdict, evidence, and matching antibodies before you sign.
import { Immunity } from "@immunity-protocol/sdk";
const immunity = new Immunity({
wallet,
// Called when verdict is SUSPICIOUS. Return true to allow, false to block.
// Defaults to "deny" if not provided.
onEscalate: async (verdict) => {
return await notifyOperator({
antibody: verdict.antibodies[0],
confidence: verdict.confidence,
explanation: verdict.explanation,
});
},
escalationTimeout: 300, // seconds, default 300
onTimeout: "deny", // "deny" | "allow", default "deny"
});
// Before any agent action
const result = await immunity.check(tx, context);
if (!result.allowed) {
console.warn(`Blocked by ${result.antibodies[0].immId}: ${result.reason}`);
return;
}
// Safe to proceed
await wallet.sendTransaction(tx);
Five types, one rule: match cheaply when you can, verify when you must. Most checks resolve against the local cache in under a millisecond. Novel threats round-trip to the TEE for a signed verdict.
Blacklisted wallets and contracts
0xBadDrainer... → blocked everywhere
Function selector + argument shape
approve(MAX_UINT256, 0xBad) → blocked
Runtime bytecode hash for clones
0x9c4f...8a2b → matches any deploy
Multi-hop taint topology
funded via Tornado < 24h → suspicious
Manipulation patterns + injection
"send 0.01, I'll send 0.02 back" → blocked
Agents check before they sign. Pools check before they swap. Same registry, two enforcement points, no install required for the second.
Install the SDK in your agent. Every action is checked against the network's collective immunity before signing. Works on any chain, any pool, any tx type.
Deploy a Uniswap v4 pool with the Immunity hook. Every swap on your pool is checked against the global registry. LPs are protected automatically — no install required.
| Scenario | SDK | Hook | Outcome |
|---|---|---|---|
| Agent uses SDK, pool has hook | Both layers active. Maximum coverage. | ||
| Agent uses SDK, pool has none | — | Agent-side only. Per-agent. | |
| Agent has none, pool has hook | — | Pool-side only. Protects every LP. | |
| Agent has none, pool has none | — | — | No defense. Use the public feed. |
Each sponsor handles one job. Together they make the protocol fast, trustworthy, and verifiable end-to-end.
Peer-to-peer antibody gossip via custom pub/sub.
On-chain antibody registry, stake, and settlement.
Sealed evidence bundles and public envelopes.
Verifiable TEE inference for semantic threats.
Pool-level hooks for collective LP defense.
Sponsor logos pending. Placeholder marks shown above.
Every antibody is a public artifact. Subscribe via RSS, JSON, or webhook. Wallet UIs, security researchers, and other agents can consume the feed without running an SDK.