Skip to content
axintdocs

IR schema

Axint’s Intermediate Representation (IR) is the cross-language contract that makes it possible for .axint, TypeScript, and Python sources to produce byte-identical Swift output. Every authoring surface eventually serializes to this schema; the validator and generator operate purely on the IR.

{
"name": "CreateCalendarEventIntent",
"title": "Create Calendar Event",
"description": "Creates a new event on the user's calendar.",
"domain": "productivity",
"isDiscoverable": true,
"parameters": [
{
"name": "eventTitle",
"type": "string",
"description": "Title of the event",
"optional": false,
"default": null
},
{
"name": "durationMinutes",
"type": "int",
"description": "Length of the event in minutes",
"optional": false,
"default": null
}
],
"entitlements": ["com.apple.developer.calendars"],
"infoPlistKeys": {
"NSCalendarsUsageDescription": "Create calendar events on your behalf."
},
"returnType": null,
"sourceFile": "intents/create_event.ts",
"sourceLine": 3
}
Field Type Notes
name string Swift struct name
title string Human-facing title
description string Human-facing description
domain string App Intent domain
isDiscoverable boolean Defaults to true
parameters IRParameter[] Ordered list (insertion order preserved)
entitlements string[] Reverse-DNS identifiers
infoPlistKeys Record<string, string> Info.plist usage description keys mapped to their human-facing permission copy
returnType IRType | null Inferred from perform(); null if none
sourceFile string Source file for diagnostics
sourceLine number Line where defineIntent(...) starts
Field Type Notes
name string Parameter name in source
type IRType See below
description string Used as @Parameter(title:)
optional boolean Defaults to false
default unknown | null Only valid if optional: true

One of: "string", "int", "double", "float", "boolean", "date", "duration", "url", or the legacy alias "number" (which normalizes to "int" during validation).

The IR uses camelCase keys (isDiscoverable, infoPlistKeys) even when authored from Python, because the JSON schema is the cross-language contract and needs to be stable across both sides. The Python IntentIR.to_dict() method emits camelCase specifically for this reason.

You can consume IR JSON directly without using either SDK — useful for building your own authoring layer on top:

import { generateSwift, validateIntent } from "@axint/compiler";
const ir = JSON.parse(irJson);
const diagnostics = validateIntent(ir);
if (diagnostics.some(d => d.severity === "error")) {
console.error(diagnostics);
process.exit(1);
}
const swift = generateSwift(ir);