Skip to main content

Intent Compilation Engine (ICE)

The Intent Compilation Engine transforms cross-workspace AI communication from natural language into compiled, deterministic operations that execute without LLM inference on the receiving workspace.

Why ICE?

MetricNatural Language BridgeIntent Bridge (ICE)
Receiver AI inferenceFull LLM call (~4,300 tokens)Zero
Execution modelNon-deterministicDeterministic
Response time2-8 seconds~15ms (cached: <1ms)
Token cost per call~$0.065$0
Audit trailNoneCryptographic execution proof

How It Works

When Workspace A needs to query data or execute a tool on Workspace B:

  1. Workspace A's AI calls the intent_bridge tool with structured parameters
  2. Intent Bridge compiles the operation into a signed IntentToken (HMAC-SHA256 + optional AES-256-GCM)
  3. Token is sent via JSON-RPC intent/execute to Workspace B's /a2a endpoint
  4. Workspace B verifies the signature, checks the nonce (replay prevention), and validates the contract
  5. Intent Executor dispatches directly to the target tool — no LLM inference
  6. Execution Proof is generated (SHA-256 hashes of input/output, policy checks applied)
  7. Result is signed and returned to Workspace A

Intent Operations

ICE supports five operation types:

OperationDescriptionExample
queryExecute a structured data querySELECT revenue FROM sales WHERE year = 2024
tool_callInvoke a specific tool with argumentsread_file({ path: '/data/report.md' })
discoverList workspace capabilitiesAvailable tools, tables, data sources
aggregateMulti-step pipelineQuery → transform → aggregate (auto-optimized by SQL fusion)
capabilityInvoke a published workspace capability by namerisk.calculateVar

Note: intent_bridge automatically wakes sleeping workspaces. If the target is scaled to zero, the caller scales it up via K8s API and retries transparently.

SQL Fusion Compiler

When an aggregate intent contains multiple queries against the same table, the SQL fusion compiler merges them:

-- Before fusion: 3 separate queries
SELECT revenue FROM sales WHERE year = 2024
SELECT dept FROM sales WHERE year = 2024
SELECT region FROM sales WHERE year = 2024

-- After fusion: 1 optimized query
SELECT revenue, dept, region FROM sales WHERE year = 2024 LIMIT 1000

The compiler also:

  • Deduplicates identical intents in a batch
  • Injects LIMIT on queries without one (safety net: LIMIT 1000)
  • Reports optimization stats in the response

Execution Proofs

Every compiled execution produces a cryptographic proof:

{
"inputHash": "sha256(canonical intent)",
"outputHash": "sha256(canonical result)",
"toolName": "query_bigquery",
"executionMs": 142,
"contractId": "contract-finance-001",
"policyChecks": [
{ "type": "sql_safety", "passed": true },
{ "type": "action_auth", "passed": true, "detail": "query:query_bigquery authorized" }
],
"proofSignature": "hmac-sha256(...)"
}

This provides audit-grade traceability: "this result came from this computation under this policy."

Intent Cache

Identical intents within the cache TTL (default: 60 seconds) return cached results instantly:

  • Cache key: SHA-256 of canonical JSON
  • Max size: 1,000 entries with LRU eviction
  • Non-cacheable: discover and aggregate operations are never cached
  • Success only: Only successful results are cached

Security

ICE uses the same HKDF key derivation tree as governance contracts:

ORG_MASTER_SECRET
└─ HKDF(contractId, version) → contractKey
├─ HMAC-SHA256(token) → signature
├─ AES-256-GCM(intent) → encrypted payload
├─ HMAC-SHA256(result) → result signature
├─ HMAC-SHA256(proof) → proof signature
└─ Nonce dedup → replay prevention (10-min window)

Defense in depth:

  1. Authentication — HMAC signature proves the sender has the contract key
  2. Integrity — Signature covers the full canonical token
  3. Confidentiality — Optional AES-256-GCM encryption
  4. Replay prevention — Unique nonce per token
  5. Expiry — Configurable TTL (default 5 minutes)
  6. Authorization — Contract allowedActions gate
  7. SQL safety — Blocklist for destructive SQL operations

When to Use ICE vs. Natural Language Bridges

Use CaseUse intent_bridgeUse bridge_workspace
Query specific data
Execute a known tool
Discover capabilities
Multi-step data pipeline
Creative analysis
Subjective questions
Open-ended conversation

Plan Availability

PlanNatural Language BridgesIntent Bridges (ICE)
Community
Team✅ Preset contracts✅ Preset contracts
Business✅ Custom contracts✅ Custom contracts
Enterprise✅ Custom contracts✅ Custom contracts