What blockchain is to Web3, AIG is to Web7. A DAG of cryptographically signed agent events.
A graph whose nodes are signed events in an agent's life and whose edges are cryptographic causation. Every node is one of four types:
Every edge carries a DID signature. The whole graph is tamper-evident and traversable from any root intent.
A blockchain is a linear sequence of transactions sharing global state. An agent's work is branching, parallel, recursive: one intent spawns many delegations; each spawns sub-agents; each produces inference artifacts; all converge on an outcome.
Forcing this into a chain loses the structure. A DAG preserves it:
Intent
└── Delegation (Prime → Agent A)
├── Inference (Agent A)
│ └── Outcome (Agent A → Alice)
└── Sub-Delegation (Agent A → Agent B)
├── Inference (Agent B)
└── Outcome (Agent B → Alice)
{
"type": "intent",
"id": "aig:550e8400...",
"principal": "did:w7:alice",
"goal": {
"action": "file_tax_q1",
"params": { "quarter": "2026-Q1" }
},
"constraints": { "deadline": "2026-04-30", "budget": "50 USD" },
"sig": "ed25519:...",
"ts": 1713600000
}
{
"type": "delegation",
"id": "aig:6ba7b810...",
"parent": "aig:550e8400...", // → intent
"from": "did:w7:prime/main",
"to": "did:w7:skill/tax-filing",
"policy": { "maxBudget": "50 USD", "jurisdiction": "IN" },
"sig": "ed25519:...",
"ts": 1713600010
}
{
"type": "inference",
"id": "aig:c56a4180...",
"parent": "aig:6ba7b810...", // → delegation
"model": "did:w7:model/tax-v3@sha256:abc123",
"input_hash": "0x1a2b3c...",
"output": { "draft_url": "..." },
"zk_proof": "0xdeadbeef...", // ZK-ML proof of inference
"agent_sig": "ed25519:...",
"ts": 1713600020
}
{
"type": "outcome",
"id": "aig:d62f0a3c...",
"parent": "aig:c56a4180...", // → inference
"agent": "did:w7:skill/tax-filing",
"principal": "did:w7:alice",
"result": { "ok": true, "filed_at": "2026-04-15" },
"sig": "ed25519:...",
"ts": 1713600030
}
Every node's parent field is the ID of its causal predecessor. This creates an immutable, verifiable chain of causation from any outcome back to the originating intent.
The lineage check in PoO verifies this chain is unbroken: outcome.parent === inference.id.
Any outcome can be replayed from the root intent. KYRx record/replay + ZK-ML proofs ensure deterministic verification.
Failed outcome → walk the edges → find which inference node failed proof or policy. Exact agent identified in O(log n).
Attested outcomes feed the reputation ledger. The AIG is the authoritative source of truth for agent track record.
Auditors receive a signed subgraph export, not a log hairball. Cryptographically verifiable by any third party.
| Tier | What | Where |
|---|---|---|
| Hot | Active graph, recent nodes | In-process (KYRx region) + QuantumOS cluster state |
| Warm | Historical nodes, search index | Infravault + Vigil timeline DB |
| Cold / canonical | Merkle commitment | L0 anchor (Merkle root of subgraph) + DA layer for blobs |
| Blockchain | IPFS DAG | Activity graph (SIEM) | AIG | |
|---|---|---|---|---|
| Signed events | ✓ | partial | ✗ | ✓ |
| ZK-proof of AI inference | ✗ | ✗ | ✗ | ✓ |
| Outcome settlement | ✗ | ✗ | ✗ | ✓ |
| Reputation feedback | ✗ | ✗ | ✗ | ✓ |
| Auditable by regulator | hard | ✗ | ✓ | ✓ |
| Parallel agents | ✗ | ✓ | ✓ | ✓ |
You don't build AIG nodes by hand. Prime does it for you. Your app emits intents; AIG materialises as a side-effect of Prime execution.
import { createIntent, createDelegation, createInference, createOutcome, anchor }
from "kynetra-prime/core/web7";
// 1. Express intent — AIG root node created automatically
const intent = createIntent({
from: "did:w7:alice",
to: "skill:tax-filing",
intent: { action: "file_quarterly", params: { quarter: "2026-Q1" } },
settle: { rail: "amp-escrow", amount: { amount: "50", currency: "USD" } },
});
// 2. Prime delegates — delegation node added with parent=intent.id
const delegation = createDelegation(prime.id, intent, agent.id);
// 3. Agent executes — inference node added with parent=delegation.id
const inference = createInference(agent.id, delegation, {
model: "did:w7:model/tax-v3@sha256:abc", inputHash, outputHash,
});
// 4. Outcome attested — outcome node added with parent=inference.id
const outcome = createOutcome(agent.id, "did:w7:alice", inference.id, { ok: true });
// 5. Commit subgraph to L0 — returns Merkle root
const { merkleRoot } = anchor(intent.id);
The AIG class ships three primary query methods. All return plain arrays of AIGNode objects — no reactive wrappers, no hidden fetches.
lineage(id) — trace ancestorsBFS upward from any node. Returns every ancestor node up to the root intent. Use this to answer: "who authorised this outcome and how did we get here?"
import { getAIG } from "@hyperbridge/forge/aig";
const graph = getAIG();
// outcomeId came from the settled AMP envelope
const ancestors = graph.lineage("aig-outcome-1713600030-x9k2");
console.log(ancestors.map(n => `${n.type} ${n.id}`));
// outcome aig-outcome-1713600030-x9k2
// inference aig-inference-1713600020-m4p7
// delegation aig-delegation-1713600010-r3q1
// intent aig-intent-1713600000-a8z5
// Find the originating principal
const root = ancestors.find(n => n.type === "intent");
console.log(root.payload.principal); // "did:w7:alice"
walk(rootId) — traverse descendantsBFS forward from any node. Returns the full subgraph rooted there. Use this to answer: "what did this intent produce?" — useful for generating audit exports or computing aggregate outcomes.
import { getAIG } from "@hyperbridge/forge/aig";
const graph = getAIG();
const subgraph = graph.walk("aig-intent-1713600000-a8z5");
// Group by node type to summarise the run
const summary = Object.groupBy(subgraph, n => n.type);
console.log({
intents: summary.intent?.length ?? 0, // 1
delegations: summary.delegation?.length ?? 0, // 2 (sub-agent spawned)
inferences: summary.inference?.length ?? 0, // 2
outcomes: summary.outcome?.length ?? 0, // 2
});
// Check every outcome succeeded
const failed = (summary.outcome ?? []).filter(n => !n.payload.ok);
if (failed.length) console.error("Failed outcomes:", failed.map(n => n.id));
anchor(rootId) — commit to L0Walks the subgraph, sorts node IDs deterministically, computes a FNV Merkle root, and appends the commitment to the anchor log. The returned merkleRoot is the value written to the L0 smart contract.
import { getAIG } from "@hyperbridge/forge/aig";
const graph = getAIG();
const commitment = graph.anchor("aig-intent-1713600000-a8z5");
console.log(commitment);
// {
// merkleRoot: "3f8a2c1d",
// nodeIds: ["aig-delegation-...", "aig-inference-...", "aig-intent-...", "aig-outcome-..."],
// ts: 1713600035000,
// rootId: "aig-intent-1713600000-a8z5"
// }
// Later: verify any node is in the commitment
const check = graph.verify("aig-outcome-1713600030-x9k2", commitment.merkleRoot);
console.log(check); // { ok: true, reason: "ok" }
AIGBuilder chains node creation without manually threading IDs. Each call auto-sets parent to the previous node.
import { AIG, AIGBuilder } from "@hyperbridge/forge/aig";
const graph = new AIG();
const result = new AIGBuilder(graph)
.intent({ principal: "did:w7:alice", action: "file_tax_q1" })
.delegation({ from: "did:w7:prime/main", to: "did:w7:skill/tax-filing" })
.inference({ model: "did:w7:model/tax-v3@sha256:abc123", inputHash: "0x1a2b" })
.outcome({ ok: true, filed_at: "2026-04-15" })
.anchor();
console.log(graph.size()); // 4
console.log(result.merkleRoot); // "a1b2c3d4"
console.log(graph.roots().length); // 1 (the intent node)
console.log(graph.leaves().length); // 1 (the outcome node)