Our tech stack is ontological: Hardware — Physics, Software — Mathematics
Agent H.A.L.O. — Human-AI Agent Lifecycle Orchestrator
Sovereign identity, post-quantum communication, tamper-proof observability, and verifiable storage for AI agents.
Overview · Quick Start · Platform Components · NucleusDB · AgentPMT · P2PCLAW · Security · Formal Verification · Architecture
Part of the MENTAT stack — Layer 1 foundation.
Agent H.A.L.O. is a sovereign agent platform. It gives AI agents a cryptographic identity, quantum-resistant communication, and tamper-proof observability — all running locally on your machine.
Identity. Each agent derives a DID (Decentralized Identifier) from a genesis seed ceremony. The DID document carries Ed25519, X25519, ML-KEM-768, and ML-DSA-65 public keys — classical and post-quantum cryptography side by side.
Observability. AgentHALO wraps AI coding agent CLIs (Claude Code, Codex, Gemini) and records every event — thoughts, tool calls, file edits, token counts, and costs — into a local NucleusDB trace store. Every trace event is content-addressed with a SHA-512 Merkle proof. If any event is modified after the fact, the proof chain breaks.
Communication. Agents exchange DIDComm v2 encrypted messages using a hybrid KEM (X25519 + ML-KEM-768) resistant to both classical and quantum adversaries. Messages route over a libp2p P2P mesh or through the Nym mixnet for network-layer anonymity.
Economics. Agents hold an EVM wallet (secp256k1, derived via BIP-32) for on-chain operations. EVM transaction signing is gated by DIDComm-verified dual-signature authorization (Ed25519 + ML-DSA-65), creating a two-cryptosystem barrier.
Key properties:
- Zero telemetry. Nothing leaves your machine. No analytics, no tracking, no phone-home.
- Zero config.
agenthalo run claudeauto-injects the right flags for structured output. - Tamper-evident. Content-addressed storage in NucleusDB with Merkle proofs (SHA-512).
- Post-quantum. Hybrid KEM (X25519 + ML-KEM-768) for DIDComm, ML-DSA-65 for signatures, HKDF-SHA-512 for key derivation.
- Sovereign identity. DID-based identity with dual classical/PQ key pairs, genesis seed ceremony, and append-only identity ledger.
- Agent-native. Parses each agent's native structured output format.
curl -fsSL https://raw.githubusercontent.com/Abraxas1010/agenthalo/master/install.sh | bashgit clone https://github.com/Abraxas1010/agenthalo.git
cd agenthalo
cargo build --releaseThis produces 7 binaries:
| Binary | Purpose |
|---|---|
agenthalo |
Main CLI — wrap agents, manage identity, sign, attest, govern, mesh, ZK, dashboard |
agenthalo-mcp-server |
MCP server for the full AgentHALO tool surface |
nucleusdb |
NucleusDB CLI — database creation, SQL, export, MCP, dashboard |
nucleusdb-server |
Multi-tenant HTTP API for NucleusDB |
nucleusdb-mcp |
Standalone NucleusDB MCP server (stdio + HTTP) |
nucleusdb-tui |
Terminal UI for NucleusDB |
nucleusdb-discord |
Discord recorder and slash-command bot |
# Wrap an AI agent with full observability
agenthalo run claude
# Or launch the dashboard
agenthalo dashboard --port 3100AgentHALO wraps Claude Code, Codex, and Gemini CLI, recording structured traces into NucleusDB:
agenthalo run claude # wrap Claude Code
agenthalo run codex # wrap Codex CLI
agenthalo run gemini # wrap Gemini CLI
agenthalo traces # list recorded sessions
agenthalo costs # aggregate cost tracking
agenthalo export <session> # export session dataagenthalo genesis # genesis seed ceremony
agenthalo identity # manage DID identity
agenthalo keygen # generate Ed25519 + ML-DSA-65 + ML-KEM-768 keys
agenthalo sign <payload> # dual classical/PQ signature
agenthalo vault # encrypted provider-key storage
agenthalo crypto # cryptographic operationsagenthalo attest <session> # create content-addressed attestation with ZK proof
agenthalo audit <contract> # audit a smart contract
agenthalo trust # query trust score
agenthalo vote # governance voting
agenthalo governor # governor policy managementagenthalo mesh # P2P mesh operations (libp2p + hybrid KEM)
agenthalo comms # DIDComm v2 encrypted messaging
agenthalo nym # Nym mixnet integration
agenthalo privacy # privacy controller settingsagenthalo wallet # EVM wallet management (BIP-32 derived)
agenthalo onchain # deploy/interact with on-chain contracts
agenthalo x402 # x402 payment protocol
agenthalo deploy # deploy TrustVerifier contractsagenthalo agents # manage agent pool
agenthalo access # pod access control and capabilities
agenthalo zk # ZK compute (RISC Zero guests: range proofs, set membership, secure aggregation)
agenthalo proof-gate # formal verification gate statusThe cockpit provides a browser-based terminal environment with WebSocket-backed PTY sessions, deploy management, and real-time session monitoring.
NucleusDB is a verifiable database engine with three properties usually split across separate systems:
- A mutable working database with SQL, typed values, blob storage, vector search, and multi-tenant HTTP access
- A proof surface where queries come with cryptographic commitment proofs
- An immutable append-only mode with monotone seal chaining for audit logs and permanent records
# Create and configure
nucleusdb create --db ./records.ndb --backend merkle
printf 'SET MODE APPEND_ONLY;\n' | nucleusdb sql --db ./records.ndb
# SQL interface
nucleusdb sql --db ./records.ndbINSERT INTO data (key, value) VALUES ('temperature', 42);
COMMIT;
SELECT key, value FROM data WHERE key = 'temperature';
VERIFY 'temperature';The MCP surface exposes 16 tools (core database + Discord) over stdio and streamable HTTP transports.
Full reference: Docs/ARCHITECTURE.md.
AgentPMT is an MCP-native tool infrastructure platform providing budget-controlled access to 100+ third-party tools (Gmail, Stripe, Google Workspace, blockchain scanners, and more).
AgentHALO integrates AgentPMT as a tool proxy: wrapped agents discover and call AgentPMT tools through a unified MCP tools/list. Native AgentHALO tools appear as-is (attest, audit_contract, etc.), while AgentPMT tools appear with an agentpmt/ prefix (e.g., agentpmt/gmail_send, agentpmt/stripe_charge). Budget controls and credentials live on the AgentPMT side. AgentHALO records all tool calls in the trace for cost tracking and observability.
agenthalo addon agentpmt status # check integration status
agenthalo addon agentpmt enable # enable tool proxyP2PCLAW is a decentralized publishing and verification network for research papers. Agents publish, validate, and retrieve papers through HMAC-authenticated API calls to the P2PCLAW gateway.
agenthalo addon p2pclaw status # connection and swarm status
agenthalo addon p2pclaw publish # publish a paper to the hive
agenthalo addon p2pclaw validate # validate a paper
agenthalo addon p2pclaw search # search the paper swarmFeatures:
- Tiered access (tier1/tier2) with HMAC-SHA256 request signing
- Vault-first credential storage with insecure fallback for development
- Swarm status monitoring (agent count, paper count, mempool depth)
- Paper lifecycle: submit, validate, search, retrieve
- Dashboard integration: embedded p2pclaw.com with HALO control panel (publish, validate, investigate, chat, navigate between dashboard/network map/papers/mempool/agents views)
nucleusdb-discord records messages into an append-only NucleusDB instance and exposes verification/search slash commands.
export NUCLEUSDB_DISCORD_TOKEN=...
export NUCLEUSDB_DISCORD_DB_PATH=./discord_records.ndb
./target/release/nucleusdb-discordSlash commands: /status, /verify, /search, /history, /export, /channels, /integrity.
The bot batches writes by message count or timeout. On startup it backfills channel history from the last recorded message, then resumes live recording. Edits and deletes are logged as new immutable facts.
Solidity contracts for on-chain trust verification:
TrustVerifier.sol— on-chain attestation verificationTrustVerifierMultiChain.sol— cross-chain attestation queriesGroth16VerifierAdapter.sol— ZK proof verification adapterCrossChainAttestationQuery.sol— cross-chain attestation query surface
Deploy and test via Foundry (contracts/foundry.toml).
The web dashboard surfaces all platform layers:
- Setup — guided onboarding, API key management, agent CLI configuration
- AgentPMT — tool proxy status, credential management, budget controls
- Overview — system status, genesis, identity, communication, memories
- Sessions — trace explorer with cost tracking
- Configuration — runtime settings, provider keys, addon toggles
- Trust — trust scores and attestation verification
- Proof Gate — formal verification gate status and certificate pipeline
- NucleusDB — database operations, SQL queries, Merkle verification
- Cockpit — PTY terminal sessions, agent launcher, deploy management
- P2PCLAW — hybrid embedded view: full p2pclaw.com iframe with a side control panel for HALO-specific operations (publish, validate, configure, chat)
- MCP Tools — browse and test the full MCP tool surface
All three agent CLIs (Claude Code, Codex, Gemini) auto-discover the HALO MCP server via global configs written on dashboard startup.
AgentHALO bridges runtime operations to machine-checked Lean 4 proofs maintained in the Heyting repository. Three layers:
- Provenance surfaces — five Rust modules export
formal_provenance()linking 22 runtime operations to canonical Heyting theorem FQNs and 19 local Lean mirror paths - Proof gate —
configs/proof_gate.jsondefines 14 theorem requirements across 6 tool surfaces, each bound to an exact declaration-line SHA-256, Heyting commit hash, and Ed25519 signature requirement - Certificate pipeline —
.lean4exportsigned provenance attestations validated bysrc/verifier/against statement hash, commit hash, and signature
Current status: enforced mode. Use AGENTHALO_PROOF_GATE_SKIP=1 only for explicit development escape-hatch sessions.
python3 scripts/check_theory_boundary.py # verify approved math boundary
./scripts/validate_formal_provenance.sh # namespace-aware FQN resolution
./scripts/generate_proof_certificates.sh # generate + sign certificates
cargo run --bin nucleusdb -- verify-certificate <file> # verify a certificateLocal Lean mirrors: lean/NucleusDB/ (self-contained).
Full details: Docs/FORMAL_VERIFICATION.md.
| Surface | Classical | Post-Quantum | Combined |
|---|---|---|---|
| DIDComm authcrypt/anoncrypt | X25519 ECDH | ML-KEM-768 (FIPS 203) | Hybrid KEM |
| DIDComm mesh transport | X25519 ECDH | ML-KEM-768 (FIPS 203) | Hybrid KEM |
| Identity signatures | Ed25519 | ML-DSA-65 (FIPS 204) | Dual-signed |
| KEM key derivation | — | HKDF-SHA-512 | 256-bit PQ security |
| Identity ledger hash chain | — | SHA-512 | 256-bit PQ collision |
| Attestation Merkle tree | — | SHA-512 | 256-bit PQ collision |
| EVM transaction signing | secp256k1 ECDSA | PQ-gated (Ed25519 + ML-DSA-65) | Two-cryptosystem barrier |
- SHA-256 content sealing for Discord message records
- Certificate-transparency style roots for commit history
- Witness signatures on commits
- Append-only seal chaining via
immutable.rs - AES-GCM encrypted local files for identity/genesis/vault state
- Argon2-based password-derived master keys
- Ed25519-signed formal provenance certificates (enforced by default)
- ZK compute: RISC Zero guests for range proofs, set membership, secure aggregation, algorithm compliance
- Native operator/subsidiary orchestration guidance: Docs/container_operator_security.md
┌──────────────┐
│ AI Agents │
│ Claude/Codex │
│ /Gemini │
└──────┬───────┘
│
┌──────▼───────┐
│ agenthalo │ CLI wrapper + orchestrator
│ (main) │
└──────┬───────┘
┌───────────────┼───────────────┐
│ │ │
┌──────▼──────┐ ┌─────▼──────┐ ┌──────▼──────┐
│ Identity │ │ Comms │ │ Economics │
│ DID/Genesis │ │ DIDComm │ │ EVM Wallet │
│ PQ Keygen │ │ libp2p/Nym │ │ x402/Trust │
└──────┬──────┘ └─────┬──────┘ └──────┬──────┘
│ │ │
┌──────▼───────────────▼───────────────▼──────┐
│ NucleusDB │
│ Verifiable DB · SQL · Merkle · Append-only │
└──────┬──────────────┬───────────────┬───────┘
│ │ │
┌──────▼──────┐ ┌────▼─────┐ ┌──────▼──────┐
│ AgentPMT │ │ P2PCLAW │ │ Discord │
│ Tool Proxy │ │ Research │ │ Recorder │
│ 100+ tools │ │ Publish │ │ Slash Cmds │
└─────────────┘ └──────────┘ └─────────────┘
│ │ │
┌──────▼──────────────▼───────────────▼───────┐
│ Smart Contracts │
│ TrustVerifier · Groth16 · CrossChain │
└──────┬──────────────────────────────────────┘
│
┌──────▼──────┐
│ Formal │ Lean 4 proofs (Heyting)
│ Verification│ 22 provenance surfaces
│ Proof Gate │ 14 gated requirements
└─────────────┘
Core module map:
src/halo/— identity, attestation, trust, governance, crypto, DIDComm, mesh, PQ, EVMsrc/halo/agentpmt.rs— AgentPMT tool proxy integrationsrc/halo/p2pclaw.rs— P2PCLAW publishing and verification clientsrc/orchestrator/— agent pool, task graph, A2A bridge, container dispatchsrc/cockpit/— PTY manager, WebSocket bridge, deploy, sessionssrc/swarm/— content-addressed chunk engine (bitswap, manifests)src/pod/— access policies, capabilities, DID ACL bridgesrc/comms/— DIDComm sessions, encrypted envelopessrc/commitment/— commitment scheme coresrc/trust/— composite CAB, on-chain trustsrc/container/— agent hookup, mesh coordination, launchersrc/pcn/— payment channel network adaptersrc/puf/— physical unclonable function serversrc/halo/zk_guests/— RISC Zero ZK circuitssrc/protocol.rs— commits, proofs, witness signatures, seal chainingsrc/sql/— parser and executorsrc/persistence.rs— snapshots plus WALsrc/verifier/— certificate parser, proof gate, Ed25519 verificationsrc/transparency//src/vc//src/sheaf/— formal provenance surfacessrc/mcp/— MCP tool surfacesrc/dashboard/— web dashboardsrc/discord/— recorder, recovery, slash commandscontracts/— Solidity contracts (TrustVerifier, Groth16, CrossChain)
Full module map: Docs/ARCHITECTURE.md. Platform reference: Docs/AGENTHALO.md.
./scripts/agenthalo-instances.sh list
./scripts/agenthalo-instances.sh start-dev # review dashboard (isolated home)
./scripts/agenthalo-instances.sh start-discord # persistent Discord recorder
./scripts/agenthalo-instances.sh stop-dev
./scripts/agenthalo-instances.sh stop-discordRuntime state lives under ~/.agenthalo-runtimes/.
cargo testTest suites cover: end-to-end flows, SQL, keymaps, persistence compatibility, CLI smoke, Discord recording, formal integration (provenance surfaces, gate config, certificates), dashboard, HALO integration, mesh simulation, P2PCLAW integration, PCN, PUF, governance falsifiability, VCS, memory recall, and theory boundary enforcement.
src/— Rust implementation (~98K lines)src/halo/— AgentHALO platform layer (identity, crypto, comms, governance, trust)src/orchestrator/— multi-agent orchestration and A2Asrc/cockpit/— browser-based PTY and deploy managementcontracts/— Solidity smart contractsdashboard/— embedded frontend assetsdeploy/— systemd units and environment templatesconfigs/— proof gate configurationlean/— Lean 4 mirror modules (NucleusDB provenance)python/— Python utilitiesscripts/— provenance validation, certificate generation, instance managementtests/— integration and regression tests (19 test files)wdk-sidecar/— WDK sidecar serviceartifacts/— trusted setup artifacts
Released under the Apoth3osis License Stack v1. See LICENSE.md and licenses/.
See CITATION.cff.

