Downloadable SDKs for integrating policy-gated authorization, governance enforcement, and cryptographic proof verification into your autonomous AI agents.
npm install @halm/kernel-sdknpm install @halm/verifier-sdknpm install @halm/edge-sdknpm install @halm/edgeThe primary integration SDK. Provides typed methods for authorizing AI agent actions, executing approved proposals, replaying decisions for audit, and querying the append-only audit event log. Every side-effect your agent produces passes through this gate.
npm install @halm/kernel-sdkDependencies: Zero runtime dependencies beyond fetch
HALMClient, ActionType, AuthorizationStatus, ProposedAction, AuthorizationDecision, ExecutionResult, ReplayResult, HALMError, AuthenticationError, ExecutionDeniedError, DoubleExecutionError
import { HALMClient } from '@halm/kernel-sdk';
const halm = new HALMClient({
baseUrl: 'https://your-tenant.halmai.ai',
apiKey: process.env.HALM_API_KEY!,
});
// Authorize a financial action
const decision = await halm.authorize({
type: 'ledger:write',
payload: { amount: 5000, recipient: 'vendor-42' },
context: { confidenceScore: 0.94, agentId: 'agent-7' },
});
if (decision.status === 'ALLOW') {
const result = await halm.execute({
proposalId: decision.proposalId,
});
console.log('Executed:', result.executionId);
}Four packages — from cloud to silicon
Your agent calls authorize() and execute()
Policy enforcement, budget gates, proof generation
Auditors verify proofs independently
trapAndSign() intercepts physical intents
How each governance vertex translates from digital agents to physical actuators
| Pentagon Vertex | Digital Agent Context | Cyber-Physical (Robotics) Context |
|---|---|---|
| INVARIANT | Do not mutate core logic. | Do not exceed maximum physical torque or enter restricted spatial coordinates. |
| ECONOMY | Do not exceed token budget. | Do not consume more battery voltage than allocated for this movement. |
| RISK | Do not execute prompt injection. | Do not execute if the physical proximity sensor detects a human in the operating radius. |
| PROVENANCE | Verify chain-of-custody for all data. | Verify firmware signature and sensor calibration certificates before actuating. |
| CONSENT | Require human approval for critical actions. | Require operator acknowledgment before high-torque or safety-critical movements. |
If an embodied AI hallucinates and tries to swing a robotic arm through a wall (or a person), the kernel.trapAndSign() function will fail the RISK and INVARIANT gates. The HMAC signature will never be generated, and the physical motor will literally drop the command.
Govern Open Claw agents through HALMAI™ constitutional tiers
The OpenClawLobeAdapter lets you register any Open Claw agent as a governed Lobe inside HALMAI™. Every tool call the agent attempts is routed through the full 3-tier Constitutional Gate before execution. The agent only acts if HALMAI™ approves.
POST /api/v1/openclaw/register
Authorization: Bearer <tenant_api_key>
{
"agent_name": "Supply Chain Optimizer",
"domain": "FINANCE",
"capabilities": ["wire_transfer", "aml_scan"],
"agent_version": "1.2.0",
"model_id": "neotron-v3"
}Returns lobe_name and propose_endpoint for subsequent calls.
POST /api/v1/openclaw/propose
Authorization: Bearer <tenant_api_key>
{
"tool_call": {
"id": "tc-9f3a2b",
"tool_name": "execute_wire_transfer",
"arguments": {
"from": "treasury-ops",
"to": "vendor-0x8c1f",
"amount": 250000,
"currency": "USD"
},
"agent_confidence": 0.92,
"trigger_prompt": "Pay invoice #4821 to approved vendor"
},
"lobe_name": "openclaw-supply-chain-optimizer",
"spend_amount": 1500
}{
"approved": true,
"governance_token": "oc-gov-oc-tc-9f3a2b-x7f2e9a1",
"reason": "Tool call approved by HALMAI™ Constitutional Gate",
"tiers": {
"tier1": { "zkInference": {...}, "jurisdiction": {...} },
"tier2": { "proofFirewall": {...}, "arbitration": {...} },
"tier3": { "economic": {...}, "simulation": {...} }
},
"violations": []
}If approved: true, execute the tool and include governance_token in your execution trace. If approved: false, do NOT execute — check violations[].
/api/v1/openclaw/register/api/v1/openclaw/proposegovernance_token in traceviolations[]GET /api/v1/openclaw/schemaSelf-correcting governance for Nemo Claw agents
When a Nemo Claw agent is denied, the adapter returns a structured GovernanceBrief as the tool error. The LLM reads the brief, understands the violation, and self-corrects on the next turn. You are using their compute to learn your rules.
POST /api/v1/openclaw/nemoclaw
Authorization: Bearer <tenant_api_key>
{
"action": {
"agent_id": "nemoclaw-finance-01",
"intent_domain": "FINANCE",
"tool_name": "access_hr_data",
"tool_args": { "employee_id": "E-4821", "field": "salary" },
"confidence": 0.88
}
}{
"type": "HALMAI_GOVERNANCE_CLEARED",
"governance_token": "nc-gov-...",
"summary": "Action approved"
}{
"type": "HALMAI_GOVERNANCE_VETO",
"summary": "Cross-domain violation",
"violations": ["Finance lacks HR clearance"],
"remediation": "Restrict to FINANCE domain"
}Nemo Claw feeds tool errors back into the LLM context window. The agent reads the violations and remediation, understands the constraint, and adjusts its next attempt to comply with HALMAI™ Sovereign Law. Auto-registers agents on first contact — no separate registration step needed.
Traditional agent security relies on isolated execution environments (VMs/Containers). While essential for preventing IT breaches, isolation alone cannot govern complex resource constraints, multi-jurisdictional compliance, or physical system interactions. HALMAI™ provides the Constitutional Governance layer that sits above your secure runtime.
Beyond standard API rate limits, HALMAI™ tracks compute as a governable resource. If an agent attempts an infinitely recursive loop or inefficient action, the pre-gate rejects the tool-call, protecting your token margins.
Digital agents lack physical awareness. HALMAI™ is architected with an Endpoint-Local Reflex capable of processing sensor telemetry for sub-20ms safety vetoes, establishing a governance path for future robotics integrations.
A cross-domain data request might be legal in the US but violate the EU AI Act. HALMAI's Tier 1 Engine dynamically evaluates geographic and departmental jurisdiction, generating compliance-ready defense briefs on every veto.
Start with the Kernel SDK to add governance enforcement to your agents in minutes.