O
OMNISENS AI
protocol.md · how-it-works
How It Works

The Protocol

TCP/AP defines a standard interface for evaluating AI-generated decisions. The protocol consists of three core objects:

Agentic ProtocolSHA-256 + ArtifactSHA-256 + Validationed25519 certified

Together they provide a deterministic contract between probabilistic model outputs and governed execution.

Protocol Overview

Every evaluation produces one of two outcomes:

200CONFORMANT
422INTERPRETATION_DRIFT

A conformant Artifact passes validation and is certified for execution. An interpretation drift result indicates that the Artifact was ambiguous, and execution is blocked.

1. Agentic Protocol

An Agentic Protocol is a content-addressed decision contract. It defines:

  • the structure of admissible Artifacts (constraints)
  • the set of admissible labels (labels)
  • the conditions required to emit each label (rules)

Agentic Protocols are held as data, versioned, and content-hashed. Their identity is independent of the model that produced the Artifact.

agentic_protocol.json
{
  "slug": "issue_refund.guard",
  "version": "1.0",
  "constraints": {
    "type": "object",
    "required": ["name", "arguments"],
    "properties": {
      "name": { "const": "issue_refund" },
      "arguments": {
        "type": "object",
        "required": ["amount"],
        "properties": { "amount": { "type": "number" } }
      }
    }
  },
  "labels": ["AUTO_APPROVE", "MANAGER_REVIEW"],
  "rules": [
    { "label": "AUTO_APPROVE",   "condition": { "<=": [{ "var": "arguments.amount" }, 50] } },
    { "label": "MANAGER_REVIEW", "condition": { ">":  [{ "var": "arguments.amount" }, 50] } }
  ],
  "bundle_hash": "sha256:e3b0c44298fc1c14…"
}

2. Artifact

An Artifact is the structured output submitted for evaluation. Artifacts may originate from:

  • LLM tool calls
  • APIs
  • Python functions
  • External systems

TCP/AP treats all Artifact producers identically. Only the Artifact is evaluated. The producing model is not part of the decision contract.

artifact · model output
# OpenAI chat completion, the tool call in the model's response
{
  "id": "chatcmpl-9xT2kLp",
  "object": "chat.completion",
  "model": "gpt-4o",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "tool_calls": [
          {
            "id": "call_a1b2c3",
            "type": "function",
            "function": {
              "name": "issue_refund",
              "arguments": "{\"amount\": 20}"
            }
          }
        ]
      },
      "finish_reason": "tool_calls"
    }
  ]
}

3. Validation

The Kernel evaluates an Artifact against an Agentic Protocol and returns a signed Conformance Event. Evaluation is deterministic: the same Artifact and Agentic Protocol always produce the same result.

200 CONFORMANT. The Artifact satisfies the declared rules: the model did not drift, and the decision is safe to act on. The Kernel returns a signed result certifying that the Artifact conformed to the Agentic Protocol.

422 INTERPRETATION_DRIFT. The Artifact is structurally valid, but the model drifted. Its output did not resolve to a single, unambiguous interpretation. The decision is no longer safe to act on, and execution is blocked.

response · 200 OK
< HTTP/1.1 200 OK
{
  "status": "EVALUATED",
  "trace_id": "trc_4a1f8b2c",
  "provenance": {
    "agentic_protocol_hash": "sha256:81b0…",
    "artifact_hash": "sha256:9de2…",
    "generation_metadata_hash": "sha256:4b81…"
  },
  "data": {
    "conformant": true,
    "label": "AUTO_APPROVE"
  },
  "error": null,
  "attestation": null
}
response · 422 Unprocessable Entity
< HTTP/1.1 422 Unprocessable Entity
{
  "status": "EVALUATED",
  "trace_id": "trc_9f2c4e7a",
  "provenance": {
    "agentic_protocol_hash": "sha256:a7c0…",
    "artifact_hash": "sha256:9de2…",
    "generation_metadata_hash": "sha256:4b81…"
  },
  "data": {
    "conformant": false,
    "label": null
  },
  "error": {
    "failure_code": "INTERPRETATION_DRIFT",
    "message": "The artifact did not resolve to a single admissible label."
  },
  "attestation": null
}