Skip to main content

Introduction

SDIF (Semantic Data Interchange Format) is a compact, semantic, canonicalizable data format designed for AI agents, deterministic machine workflows, and humans who need to audit structured data.

It combines:

  • JSON-style structure — nested documents with typed fields
  • Tabular compactness — repeated records as tab-separated rows without repeating keys
  • Semantic relations — first-class triple support (rel:) for linking entities
  • Canonical form — a deterministic byte representation suitable for hashing and signing
  • AI projections — a derived, alias-friendly view optimized for large language model context windows

Who is SDIF for?

AudienceWhy SDIF
AI agentsCompact input, reversible projections, semantic relations
Deterministic pipelinesCanonical form with stable SHA-256 hash
Human auditorsReadable source files, schema validation, structured diffs
Data engineersTabular compactness, JSON interop, schema enforcement

Three profiles

SDIF documents exist in three profiles, each with its own file extension:

ProfileExtensionPurpose
Source.sdifHuman-authored, readable, whitespace-flexible
Canonical.sdif.canonDeterministic bytes for hashing, signing, and comparison
AI projection.sdif.aiCompact derived view for model input, with optional field aliases

The source profile is what humans write. The canonical profile is what machines compare. The AI projection is what gets sent to a language model.

Quick example

Here is a minimal SDIF document describing a project plan:

@sdif 1.0
kind Plan
title "Q3 Delivery Plan"
owner eng-team

milestones[id,name,due,status]:
m1 "Parser v1" 2024-07-01 done
m2 "Canonical form" 2024-08-01 done
m3 "Schema validation" 2024-09-01 in-progress

rel:
m3 blocks m2

This document has a version header (@sdif 1.0), a kind declaration (kind Plan), two scalar fields, one table with three rows, and one relation triple. The table column header (milestones[id,name,due,status]:) is declared once; each indented row provides tab-separated values in that column order.

Where to go next

  • Getting Started — install the CLI and parse your first document
  • Why SDIF? — rationale, trade-offs, and format comparison
  • Spec — complete language reference