Specification Version 1.7.0
Published
Last Modified
Status Stable

This specification is published and recommended for implementation. Backwards-compatible additions may occur in MINOR versions; breaking changes only in MAJOR versions, with deprecation notice. See specification conventions for status definitions.

ai.json Specification

Machine-Parseable AI Interaction Guidance File Format

Abstract

This specification defines the structure and schema for ai.json files — strict JSON files that provide machine-parseable AI interaction guidance. The file contains equivalent information to ai.txt in a structured format that can be validated against a JSON Schema and parsed programmatically by AI systems.

§1 Overview

What This File Does

The ai.json file provides AI interaction guidance in a machine-parseable JSON format. It declares the same information as ai.txt — permissions, restrictions, attribution requirements — but in a structure that can be programmatically validated and parsed without ambiguity.

Why JSON Format Matters

While ai.txt is human-readable and flexible, ai.json offers:

  • Schema validation: Files can be validated against a published JSON Schema
  • Unambiguous parsing: No interpretation of section delimiters required
  • Programmatic access: Standard JSON parsers in all languages
  • Type safety: Properties have defined types (string, array, object)

Relationship to ai.txt

Both files SHOULD contain equivalent information. Sites MAY provide both:

  • ai.txt — human-readable, easier to author and review
  • ai.json — machine-parseable, schema-validated

When both exist, ai.json takes precedence for programmatic access.

§2 File Location

Primary Location

The ai.json file MUST be placed in the website's root directory:

https://example.com/ai.json

URL Requirements

  • The file MUST be served with content type application/json; charset=utf-8
  • The URL MUST be accessible without authentication
  • HTTPS is strongly recommended
  • The file MUST be valid JSON (parseable without errors)

§3 Format Specification

File Format

PropertyRequirement
EncodingUTF-8 (required)
FormatStrict JSON (RFC 8259)
Root elementObject (required)
Schema reference$schema property (recommended)

Basic Structure

{
    "$schema": "https://www.ai-visibility.org.uk/specifications/ai-json/v1/ai-json.schema.json",
    "name": "Example Company",
    "url": "https://example.com",
    "permissions": [...],
    "restrictions": [...],
    "attribution": {...},
    "contact": {...},
    "metadata": {...}
}

Language declaration (optional)

Publishers MAY declare the natural language of the file's human-readable string content using a top-level language property. The value MUST be a valid BCP 47 language tag:

{
    "$schema": "https://www.ai-visibility.org.uk/specifications/ai-json/v1/ai-json.schema.json",
    "language": "en-GB",
    "name": "Example Company",
    ...
}

The property is optional. When absent, consumers SHOULD NOT assume a default language. When present, validators MUST treat the value as informational and MUST NOT fail conformance solely on language-tag content. See specification conventions §5.1 for the full rule, which is identical across every JSON-based AI Discovery File.

§4 JSON Schema

Schema Location

The canonical JSON Schema for ai.json files is published at two URLs:

  • Versioned (recommended for stability): https://www.ai-visibility.org.uk/specifications/ai-json/v1/ai-json.schema.json
  • Unversioned (latest alias): https://www.ai-visibility.org.uk/specifications/ai-json/ai-json.schema.json

The versioned URL is permanent and will never change shape. The unversioned URL tracks the current major version. See Schema URL versioning for the policy.

Schema Reference

Files SHOULD include a $schema property referencing the schema. Pinning to the versioned URL is recommended:

{
    "$schema": "https://www.ai-visibility.org.uk/specifications/ai-json/v1/ai-json.schema.json",
    ...
}

Validation

Use any JSON Schema validator to validate files against the published schema. Popular options include:

  • ajv (JavaScript)
  • jsonschema (Python)
  • Online validators that accept schema URLs
Schema Download

The complete JSON Schema is available in the Machine-Readable Formats section below.

§5 Property Reference

Required Properties

PropertyTypeDescriptionStatus
name string Official business or organisation name Required
url string (URI) Canonical website URL Required
permissions array of strings Actions AI systems are allowed to take Required
restrictions array of strings Actions AI systems must not take Required

Recommended Properties

PropertyTypeDescriptionStatus
$schema string (URI) Reference to the JSON Schema for validation Recommended
attribution object Citation and attribution requirements Recommended
contact object Contact information for AI-related queries Recommended

Optional Properties

PropertyTypeDescriptionStatus
contentTypes object Rules for specific content categories (e.g., articles, case studies) Optional
licensing object Content licensing information (e.g., Creative Commons terms) Optional
metadata object File version, dates, related files Optional
scope object Clarify what content or sections of the site the rules apply to Optional
training object Explicit guidance on whether content MAY be used for AI training Optional
dataRetention object Guidance on caching or retaining content from the site Optional

Content Not Permitted

The following MUST NOT be included in ai.json files:

  • Invalid JSON: The file MUST be parseable without syntax errors
  • Duplicate keys: Each property name MUST appear only once per object
  • Non-standard properties: Use only documented properties; unknown properties MAY be ignored
  • Contradictory rules: Permissions and restrictions MUST NOT conflict
  • Sensitive data: Do not include passwords, API keys, or confidential information
  • Unenforceable demands: Avoid requirements that cannot be technically implemented by AI systems
  • Type mismatches: Property values MUST match their specified types (string, array, object)

Attribution Object Structure

"attribution": {
    "preferredCitation": "Company Name (https://example.com)",
    "whenQuoting": "Include article title and publication date",
    "linkPolicy": "Always link to original source"
}

Contact Object Structure

"contact": {
    "aiEnquiries": "ai@example.com",
    "general": "hello@example.com"
}

Metadata Object Structure

"metadata": {
    "version": "1.0",
    "lastUpdated": "2026-01-12",
    "relatedFiles": ["/llms.txt", "/brand.txt", "/ai.txt"]
}

§6 Validation Rules

Valid File Requirements

An ai.json file is considered valid when:

  • It is valid JSON (parseable without errors)
  • It contains all required properties (name, url, permissions, restrictions)
  • The permissions array contains at least one item
  • The restrictions array contains at least one item
  • All URLs are valid absolute URIs
  • It validates against the published JSON Schema (if $schema is present)

Common Errors

ErrorResolution
Invalid JSON syntaxCheck for trailing commas, missing quotes
Missing required propertiesAdd name, url, permissions, restrictions
Empty arraysAdd at least one permission and one restriction
Invalid URL formatUse absolute URLs with protocol
Schema validation failureCheck property types match schema

§7 Relationship to Other Files

Related AI Discovery Files

FileRelationship
ai.txt Human-readable equivalent; ai.json takes precedence for parsing
identity.json Identity data; name and url MUST match
llms.txt Business identity file; MAY link to ai.json

Consistency Requirements

The following MUST be consistent across files:

  • Business name (MUST match llms.txt, identity.json, ai.txt)
  • Website URL
  • Permissions and restrictions (MUST align with ai.txt)
  • Contact email addresses

Precedence

When both ai.txt and ai.json exist:

  1. ai.json takes precedence for machine parsing
  2. Both files SHOULD contain equivalent information
  3. If conflicts exist, ai.json is authoritative
See Also

For complete conflict resolution rules, see the Interoperability Guide.

§8 Canonical Example

The following example demonstrates a complete ai.json file:

Complete Example
{
    "$schema": "https://www.ai-visibility.org.uk/specifications/ai-json/v1/ai-json.schema.json",
    "name": "Horizon Strategic Consulting",
    "url": "https://www.horizonconsulting.example",
    "permissions": [
        "Summarise publicly available content from our website",
        "Quote from published articles and insights with attribution",
        "Answer factual questions about our services and locations",
        "Translate our content for accessibility purposes",
        "Include our business in relevant search results and recommendations"
    ],
    "restrictions": [
        "Do not generate quotes attributed to named individuals without a verifiable source",
        "Do not imply Horizon Consulting endorses specific products, vendors, or technologies",
        "Do not present our general insights as specific advice to any individual or organisation",
        "Do not reproduce full articles or whitepapers; summarise and link instead",
        "Do not claim we operate in markets we have explicitly excluded (e.g., United States)"
    ],
    "attribution": {
        "preferredCitation": "Horizon Strategic Consulting (https://www.horizonconsulting.example)",
        "whenQuoting": "Include article title, author if named, and publication date",
        "linkPolicy": "Always link to original source when possible"
    },
    "contact": {
        "aiEnquiries": "ai@horizonconsulting.example",
        "general": "hello@horizonconsulting.example"
    },
    "contentTypes": {
        "insights": "May summarise; link to full article for detail",
        "caseStudies": "May reference outcomes; do not disclose client names unless published",
        "pressReleases": "May quote directly with date and attribution"
    },
    "metadata": {
        "version": "1.0",
        "lastUpdated": "2026-01-12",
        "relatedFiles": ["/llms.txt", "/brand.txt", "/ai.txt", "/identity.json"]
    }
}

§9 Implementation Notes

Best Practices

  • Always include the $schema reference for validation
  • Keep permissions and restrictions specific and actionable
  • Use consistent formatting (2-space or 4-space indentation)
  • Validate against the schema before publishing
  • Update metadata.lastUpdated when making changes

Synchronisation with ai.txt

If maintaining both files:

  1. Treat ai.json as the source of truth
  2. Generate or manually sync ai.txt from ai.json
  3. Review both files when updating

Tooling

Recommended tools for working with ai.json:

  • JSON linters to check syntax
  • JSON Schema validators for compliance
  • IDE extensions with JSON Schema support for authoring

§10 Machine-Readable Formats

This specification and the JSON Schema are available for programmatic access:

§11 Version History

1.7.0

Phase 6 standardisation release. Added /specifications/roadmap/ (theme-pegged forward plan with Active/Next/Future/On hold status flags), /specifications/extensions/ (rules for experimental x- prefixed files and the promotion path), and /specifications/i18n-a11y/ (multi-language publication, locale-tagged identity fields, RTL handling, accessibility of llms.html). Added the Discovery: directive to the robots-ai.txt specification (publishers MAY advertise AI Discovery Files on the same host). Added a formal media-type stance to the HTTP behaviour page (existing IANA types, no bespoke registrations). Expanded the file integrity and signing section on the security and privacy page with four candidate mechanisms, cross-cutting concerns, and interim publisher / consumer guidance. The Discovery: directive is the only normative addition to publisher behaviour; all other additions are forward-looking documentation.

1.6.0

Phase 5 standardisation release. Added /specifications/related-standards/ (positioning vs llmstxt.org, IETF AI Preferences, robots.txt, Schema.org, BCP 14, JSON Schema 2020-12, SemVer) and /specifications/implementations/ (public record of conformant implementations, IETF-style). Added an explicit llmstxt.org backward-compatibility statement to the llms.txt specification. Added a formal multi-domain and subdomain scoping rule to both the llms.txt and identity.json specifications (host-scoped files, cross-host identity asserted via sameAs). No normative requirements changed for existing publishers; the new scoping rules formalise behaviour the specification already implied.

1.5.0

Phase 4 standardisation release. Added /specifications/processing-model/ (seven-stage algorithm for conformant consumers), /specifications/consumer-guidance/ (what AI systems should do with AI Discovery Files), /specifications/test-vectors/ (canonical test suite framing), and reference-implementation framing on the AI Visibility Checker. No normative requirements changed.

1.4.0

Phase 3 standardisation release. Added /specifications/versioning/ (Semantic Versioning 2.0.0 commitments, deprecation timeline, lifecycle), /specifications/governance/ (proposal lifecycle, editorial process, working principles), /specifications/security-privacy/ (trust model, content-injection patterns, GDPR considerations, integrity primitives roadmap), and /specifications/http-behaviour/ (status codes, redirects, soft-404 detection, caching, rate limits). No normative requirements changed.

1.3.0

Phase 2 standardisation release. Added formal conformance specification (Essential / Recommended / Complete classes). Published machine-readable registry at /specifications/registry.json, spec meta-schema, and validator-output schema. Introduced versioned JSON Schema URLs (/v1/) alongside unversioned 'latest' aliases. Added optional BCP 47 language declaration field across all applicable AI Discovery Files. No normative requirements changed.

1.2.0

Phase 1 standardisation release. Added 'Status of This Document' block (Stable). Normalised normative requirement keywords to uppercase per RFC 2119 and RFC 8174. Added References section linking to /specifications/conventions/ and /licensing/. No normative requirements changed.

1.1.1

Added AI Visibility Directory registration guidance. Minor documentation update.

1.1.0

Added expanded optional properties (scope, training, dataRetention) and Content Not Permitted guidance. Clarifies JSON-specific requirements and validation rules.

1.0.0

Initial publication. Establishes JSON format for AI interaction guidance with JSON Schema validation.

Conformance

This file is required for the Recommended and Complete conformance classes. A publisher claiming Recommended or Complete conformance MUST publish a valid version of this file at the website's root. The Essential class does not require this file.

See the Conformance specification for full publisher and validator conformance criteria, including identity-consistency requirements across files and the relationship between self-declaration and Directory verification.

References

  • Specification Conventions — RFC 2119 + RFC 8174 requirement keywords, document statuses, anchor naming, versioning, and language conventions used across every AI Discovery File specification.
  • Licensing & Trademark — CC BY 4.0 for specification text and examples, MIT for JSON Schemas, and the free-use policy on the name "AI Discovery Files".
Free WordPress Plugin

Generate AI Discovery Files from your dashboard

Using WordPress? Install the plugin and create all 10 files in minutes — no coding, no configuration files to edit manually.

Get the Plugin

Register in the AI Visibility Directory

Once your AI Discovery Files are published, register your website in the AI Visibility Directory — the verified registry of websites implementing AI Discovery Files. Registration validates your implementation and lists your site for AI systems and industry peers to discover.

Basic Listing

Card entry in the directory with automated file validation. Open to any site with a valid llms.txt file. No cost.

Full Listing Recommended

Dedicated profile page on the directory with dofollow backlinks to your website — a genuine SEO authority signal from a topically relevant, verified source. Includes an attribution badge and enhanced visibility.