The accountability primitive for AI agents. Cryptographic behavioral commitments with trustless verification.
Nobulex is an open protocol (MIT license) that enables autonomous AI agents to declare what they will and won't do, prove they followed through, and face economic consequences if they didn't. The way HTTPS enabled e-commerce by making connections trustworthy, Nobulex enables the agent economy by making behavior trustworthy.
You can't audit a neural network. But you can audit actions against stated commitments.
verify(covenant, actionLog) → { compliant: boolean, violations: Violation[] }
This is always decidable, always deterministic, always efficient.
npm install @nobulex/identity @nobulex/covenant-lang @nobulex/middleware @nobulex/verificationimport { createDID } from '@nobulex/identity';
import { parseSource } from '@nobulex/covenant-lang';
import { EnforcementMiddleware } from '@nobulex/middleware';
import { verify } from '@nobulex/verification';
// 1. Create an agent identity
const agent = await createDID();
// 2. Write a covenant in the DSL
const spec = parseSource(`
covenant SafeTrader {
permit read;
permit transfer (amount <= 500);
forbid transfer (amount > 500);
forbid delete;
}
`);
// 3. Enforce with middleware
const mw = new EnforcementMiddleware({ agentDid: agent.did, spec });
// $300 transfer — allowed
await mw.execute(
{ action: 'transfer', params: { amount: 300 } },
async () => ({ success: true }),
);
// $600 transfer — BLOCKED by covenant
await mw.execute(
{ action: 'transfer', params: { amount: 600 } },
async () => ({ success: true }), // never executes
);
// 4. Verify compliance
const result = verify(spec, mw.getLog());
console.log(result.compliant); // true
console.log(result.violations); // []| # | Primitive | What It Does | Package |
|---|---|---|---|
| 1 | Identity | W3C DID for every agent (did:nobulex:) with Ed25519 keys |
@nobulex/identity |
| 2 | Covenant | Cedar-inspired DSL: permit, forbid, require with conditions |
@nobulex/covenant-lang |
| 3 | Attestation | W3C Verifiable Credential binding agent to covenant | @nobulex/core-types |
| 4 | Action Log | SHA-256 hash-chained tamper-evident record with Merkle proofs | @nobulex/action-log |
| 5 | Verification | Deterministic verify(covenant, log) with violation proofs |
@nobulex/verification |
| 6 | Enforcement | On-chain staking/slashing with escalation | @nobulex/contracts |
| Tier | Mechanism | Guarantee | When to Use |
|---|---|---|---|
| Tier 1 | TEE Middleware (Intel SGX / AMD SEV) | Forbidden actions physically cannot execute | High-stakes: financial, medical, legal |
| Tier 2 | Staking / Slashing (on-chain) | Violations are economically irrational | General purpose: commerce, data access |
┌─────────────────────────────────────────────────────────────┐
│ Platform │
│ cli · sdk · elizaos-plugin │
├─────────────────────────────────────────────────────────────┤
│ Covenant Primitives │
│ │
│ ┌──────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ identity │ │ covenant-lang│ │ action-log │ │
│ │ (DID) │ │ (DSL) │ │(hash-chain)│ │
│ └──────────┘ └──────────────┘ └────────────┘ │
│ │
│ ┌────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ middleware │ │ verification │ │ composability │ │
│ │(pre-exec) │ │ (post-hoc) │ │(trust graph) │ │
│ └────────────┘ └──────────────┘ └───────────────┘ │
│ │
│ ┌─────┐ ┌───────────┐ │
│ │ tee │ │ contracts │ │
│ │(SGX)│ │(Solidity) │ │
│ └─────┘ └───────────┘ │
├─────────────────────────────────────────────────────────────┤
│ Foundation │
│ core-types · crypto · evm │
└─────────────────────────────────────────────────────────────┘
covenant SafeTrader {
permit read;
permit transfer (amount <= 500);
forbid transfer (amount > 500);
forbid delete;
require counterparty.compliance_score >= 0.8;
}
Forbid wins. If any forbid matches, the action is blocked regardless of permits. Default deny for unmatched actions. Conditions support >, <, >=, <=, ==, != on numeric, string, and boolean fields.
Three contracts deployed to Ethereum (Sepolia testnet):
| Contract | Purpose |
|---|---|
CovenantRegistry |
Register covenant hashes on-chain, prevent duplicates |
StakeManager |
Stake ETH on covenants, lock/slash on violation |
SlashingJudge |
Submit violations, compute escalating penalties |
npx tsx demo/covenant-demo.tsCreates two agents, authors a covenant, enforces it via middleware, blocks a forbidden transfer, and verifies compliance — all in one script.
git clone https://github.com/agbusiness195/NOBULEX.git
cd NOBULEX
npm install
npx vitest run # 6,062 tests, 112 files, 0 failures| Bitcoin | Ethereum | Nobulex | |
|---|---|---|---|
| What it trusts | Monetary transfers | Contract execution | Agent behavior |
| Trust mechanism | Proof of Work | Proof of Stake | Proof of Compliance |
| What's verified | Transaction validity | State transitions | Behavioral commitments |
| Guarantee | Trustless money | Trustless agreements | Trustless agents |
MIT