Agent calls check() before acting
An AI agent passes any tx, scraped content, or counterparty message to immunity.check(). The Tier-1 cache resolves 99% of calls in under a millisecond — most of the time the network already knows.
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.
Most checks resolve locally in microseconds. Only the 1% that's actually new round-trips to the TEE. When something blocks, every agent on the network knows about it within a second. No human in the loop.
An AI agent passes any tx, scraped content, or counterparty message to immunity.check(). The Tier-1 cache resolves 99% of calls in under a millisecond — most of the time the network already knows.
Cache miss + on-chain registry miss only — the slice that is actually new. Encrypted context goes to a 0G Compute enclave running qwen-2.5-7b. Verdict comes back signed with attestation.
If the verdict says block, the SDK auto-publishes. The publisher locks 1 USDC for 72h on the on-chain Registry. Match rewards split 80/20 publisher / treasury — skin in the game by design.
The new antibody fans out across the AXL gossip mesh. Local caches update in well under a second. The same attack is blocked everywhere — by SDK on agents, by hook on Uniswap pools.
On-chain antibody Registry on 0G Chain. Sealed evidence on 0G Storage. Verifiable TEE inference on 0G Compute.
Peer-to-peer antibody gossip via custom pub/sub.
Pool-level hooks for collective LP defense.
Operators pay micro-fees per gated transaction. Publishers earn 80% of those fees on every match their antibody scores. Treasury keeps the registry running. Settled on-chain on 0G Galileo, no off-chain accounting.
Flat fee on every immunity.check() call. Tier-1 cache hits resolve locally before this fee applies.
When a TEE-verified novel threat mints a new antibody. Funds the on-chain registry write.
No subscription. No minimum. No volume discount tiers.
Paid in USDC, on chain, by the Registry contract directly to the publisher's address. No claim step, no off-chain settlement.
Skin in the game. Bad publishes get challenged and slashed; quiet legitimate ones unlock and reclaim the stake.
Real money. $47.13 distributed so far.
Operators pay cents to skip every retry of a known threat. Publishers earn USDC every time their pattern saves someone else from a loss. Treasury keeps the Registry funded. Every fee, reward, and stake settles on-chain on 0G Galileo, fully auditable, no off-chain accounting.
Antibodies recognize threats five ways: cheap, instant pattern matches at the edge, escalating to TEE-verified inference only when something genuinely new shows up. Examples are real patterns the demo fleet catches.
Specific wallets and contracts the network has flagged. Hash-table lookup, instant.
Suspicious function shapes regardless of who calls them. Selector + argument heuristics.
Runtime bytecode hash. Re-deployed clones can't hide under a fresh address.
Multi-hop taint topology. Bad actors at one remove still get caught.
Manipulation patterns and prompt-injection markers in the agent's input.
What the network is blocking the most right now. Click any IMM ID to inspect the matcher, evidence, and publisher.
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.matched[0],
confidence: verdict.confidence,
reason: verdict.reason,
});
},
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);
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.
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.