Skip to main content

Contracts v1

This page lists the versioned JSON Schema contracts (draft 2020-12) of the Navin Platform, explains their versioning rules and shows how to validate a document with the API, each SDK and the CLI. The schemas are stored in contracts/v1/, indexed by contracts/index.json, with one example per contract in contracts/examples/. The Control Plane, the portal, every SDK and the CLI use the same files: models are generated from them and documents are validated against them.

Version française : contracts.fr.md

Catalog​

28 contracts, plus common.schema.json for the shared definitions. Type manifest documents are applied through the Control Plane (GitOps or API) and carry a kind; document and event types are exchanged by the services.

ContractTypePurpose
commondefinitionsShared building blocks reused by every v1 contract: ids, timestamps, money, classification.
agent-manifestmanifest (Agent)Identity, version, tools, models, permissions, autonomy and budgets of an agent.
model-manifestmanifest (Model)Model Registry entry: provider, modalities, limits, reasoning, prices and policies.
tool-manifestmanifest (Tool)Schema, action, scopes and classification of a tool executed through the Tool Gateway.
skill-manifestmanifest (Skill)Versioned, signed skill: instructions, dependencies and permissions.
plugin-manifestmanifest (Plugin)Sandboxed OCI plugin or complete business pack installed through the Marketplace.
connector-manifestmanifest (Connector)Integration with a business system: authentication, scopes, resources and synchronization.
channel-manifestmanifest (Channel)Exposure channel (web, mobile, e-mail, messaging, voice): auth, transport, limits and sessions.
managed-componentmanifest (ManagedComponent)One component of the distribution: pinned version, licence, dependencies, secrets by reference, health.
execution-contractdocumentState of an agent run: states, steps, budgets, errors and resume strategy.
context-contractdocumentContext assembled for one model call: sources, classification, token budget and provenance.
memory-contractdocumentA memory item: ACL, TTL, write provenance and deletion rules.
evaluation-contractdocumentDataset, metrics, thresholds and results of an evaluation; a blocking gate prevents promotion.
policy-contractdocumentInput (resource, action, subject, context) and decision of a policy evaluation.
multimodal-contractdocumentMedia handled by the Multimodal Gateway: type, duration, resolution, storage, classification, DLP, costs.
license-entitlementdocumentPayload of a platform licence signed by the publisher (annual or triennial term).
execution-contextdocumentIdentity, delegation and governance context of an execution, signed by the Context Authority.
action-contextdocumentOne governed action: request, subject, target, argument digest, decisions, obligations, approval.
delegation-contextdocumentA delegation of rights to an agent, an application or a sub-agent, always covered by its parent.
approval-requestdocumentA human approval with four eyes and separation of duties.
security-incidentdocumentA SOC incident: correlated detections, risk verdict and response.
containment-orderdocumentOne typed reaction on one typed target with a controlled blast radius and the kill switch states.
storage-profiledocumentClient object storage (S3, Azure Blob, GCS, IBM COS, SeaweedFS): target, credential reference, purposes.
usage-eventeventOne consumption event: units, model, price at call time, currency, estimated, measured and billed cost.
audit-eventeventWho did what on which resource, the policy decision and the evidence; hash chained per tenant.
policy-decisioneventOne authorization decision: relationship check, policy decision and effective permission.
tool-invocationeventA tool or MCP call under an execution context: tool, argument digest, authorization, result.
llm-invocationeventA model call through the Model Gateway: model, provider, region, classification, usage and cost.
data-access-contexteventA data or RAG access: source, tenant filter, ACL, classification ceiling, documents returned.

Versioning rules​

  • Every document carries schema_version (1.0, 1.1...). The folder v1 is the major version.
  • Minor versions only add optional fields or enum values; objects with additionalProperties: false never get new fields in a minor version.
  • Removing or renaming a field, changing a type or making a field required is a major change: a new contracts/v2/ folder, and the API keeps serving v1 for at least 12 months.
  • Enum additions (for example a new usage_type) are minor; consumers must handle unknown values gracefully.
  • Money is always a decimal string plus an ISO 4217 currency; timestamps are RFC 3339 UTC.
  • Changes go through review, CI validation of every example and a changelog entry.

Validation​

  1. On the server. GET /v1/contracts lists the schemas, GET /v1/contracts/{name} returns one and POST /v1/contracts/{name}/validate answers {valid, errors[]}; POST /v1/manifests/apply validates before any registry change.

  2. With the CLI, before a commit or in CI. Exit code 1 when a document is invalid.

    enterprise-ai validate -f ./manifests/agent.yaml --output json
  3. Offline, in each SDK, with the schemas bundled in the package (no network, same result as the server).

SDKServer callOffline validationResult
Pythonclient.contracts.validate(name, document)enterprise_ai.contracts.validate(document, name=None)ValidationResult (valid, errors, raise_for_errors())
TypeScriptclient.contracts.validate(name, document)validateContract(name, doc, locale), validateManifest(doc){ valid, errors: { path, message, keyword }[] }
Goclient.Contracts.ValidateRemote(ctx, name, body)client.Contracts.Validate(name, doc), eai.ValidateContract(lang, name, doc)eai.ValidationResult (Contract, Valid, Errors)
Javaclient.contracts().validateRemote(name, body)client.contracts().validate(name, document), validateManifest(manifest)ValidationResult record (contract, valid, errors)
from enterprise_ai.contracts import validate

document = {"schema_version": "1.0", "event_id": "use_01J"}
remote = client.contracts.validate("usage-event", document) # the server answers {valid, errors}
local = validate(document, "usage-event") # offline, bundled schemas
print(local.valid, [str(issue) for issue in local.errors])
import { validateContract } from "@enterprise-ai/sdk";

const local = validateContract("multimodal-contract", doc);
if (!local.valid) console.log(local.errors.map((e) => `${e.path}: ${e.message}`));
res, err := client.Contracts.Validate("usage-event", doc)
if err != nil {
return err
}
fmt.Println(res.Valid, res.Errors)
ValidationResult r = client.contracts().validate("evaluation-contract", doc);
if (!r.valid()) { r.errors().forEach(System.out::println); }

Without a name, the Python and TypeScript manifest validators detect the contract from the kind of the document.

Example: Usage Event​

{
"schema_version": "1.0",
"event_id": "use_01J",
"occurred_at": "2026-10-29T10:00:01Z",
"tenant_id": "8f0c2a4e-1b7d-4c55-9a51-2f3e6d7c9b10",
"agent_id": "agt_ap",
"session_id": "ses_9",
"task_id": "tsk_3",
"usage_type": "llm",
"provider": "openai",
"model_id": "gpt-4o-mini",
"region": "eu-west",
"units": {"input_tokens": 812, "cached_input_tokens": 512, "output_tokens": 240, "reasoning_tokens": 120},
"pricing": {"pricing_version": "openai-2026-10-01", "currency": "USD", "effective_at": "2026-10-01T00:00:00Z", "reasoning_billing": "included_in_output"},
"cost": {"estimated": {"amount": "0.000310", "currency": "USD"}, "measured": null, "billed": null},
"source": "litellm"
}

FinOps rule: input_tokens includes the cached tokens and output_tokens includes the reasoning tokens.

Reference​