🧪 AI Knowledge Layer Platform

Platform for
AI-Ready Websites

Ninja creates an AI Knowledge Layer that enables websites to become understandable by AI systems through runtime transformation, structured knowledge, and programmable execution — without changing your backend or CMS.

🌐 Existing Website
Your CMS & Content — unchanged
⚡ AI Knowledge Layer
Applied by Ninja at runtime
Smart Anchors Structured Data AI Metadata llms.txt Knowledge Graph
🤖 AI Systems
Understand & Reference Your Website
ChatGPT Gemini Claude Perplexity
🌐 Traditional Website
HTML designed for humans
🧪 AI Knowledge Layer
Runtime enrichment • No backend changes
Structured Knowledge Semantic Relationships Answer Mapping AI-Ready Representations
🤖 LLMs & AI Search
ChatGPT  ·  Gemini  ·  Claude  ·  Perplexity
AI Agents AI Overview Conversational Search
The Core Concept

One Layer. Between Websites and AI.

Traditional websites expose HTML designed primarily for human users. The AI Knowledge Layer enriches that content during runtime by applying structured knowledge, metadata, semantic relationships, transformation rules, and AI-ready representations — before the content is consumed by AI systems.

  • The original website remains completely unchanged — no CMS migration, no backend modification
  • Every page request delivers AI-enhanced HTML through runtime transformation
  • AI systems receive structured, navigable, machine-readable knowledge
  • The original visual presentation for human visitors is preserved exactly
  • Continuously updated as your content evolves
Platform Components

Modular. Reusable. Production-Ready.

The AI Knowledge Layer is delivered by five reusable platform components. Every capability is built from the same stack — enabling consistent, controlled, observable transformations at scale.

📋

Rules Engine

Declarative behavior. WHEN / WHERE / DO / WHY. No code required.

📊

Datasets

Structured knowledge and runtime variables that power rule execution.

🛠

Transformation Scripts

Custom logic for complex transformations. Runs in a secure sandbox.

Execution Engine

Draft → Dry Run → Validate → Preview → Live. Fully observable.

🌐

Edge Integrations

DNS-based or Cloudflare deployment. Works with any website, any stack.

Every component serves a single mission  →  Making your website understandable by AI
What the Platform Delivers

Platform Capabilities

The Ninja platform is capability-driven. GEO is one application. The platform supports a full spectrum of use cases from AI discoverability to SEO, personalization, experimentation, and execution control.

AI Core
AI Knowledge Layer

Complete AI readability transformation. Anchors, schema, metadata, navigation, discovery.

AI Core
Runtime HTML Transformation

Every page request delivers AI-enhanced HTML. No rebuilds, no deployments.

GEO
Structured Data Management

FAQPage, Organization, SoftwareApplication, and custom schema injection at runtime.

GEO
AI Metadata Management

ai-scope, ai-entity, ai-context tags. llms.txt linking. Freshness signals.

SEO
SEO Governance

Meta tags, canonical URLs, Open Graph, title management across all pages at once.

GEO
GEO Optimization

Answer mapping, knowledge navigation, entity relationships, AI discovery resources.

Ops
Personalization

Geo-based, device-based, segment-based content variation without backend changes.

Ops
Experimentation

A/B testing, multivariate experiments. No engineering dependencies. Instant rollback.

Ops
Execution Control

Dry-run validation, preview links, audit trail, staged rollout, instant rollback.

Ops
Security Policies

Script blocking, CSP enforcement, header control. Applied at the edge.

Platform
Edge Integrations

DNS-based or Cloudflare Worker deployment. 300+ global locations. Sub-1ms latency.

Platform
Future Platform Extensions

The same platform stack adapts as AI standards evolve. No re-architecture required.

SEO and GEO are both present. Neither replaces the other. The platform supports every optimization layer simultaneously through the same rules and execution infrastructure.

Architecture Runtime at the Edge
👤 Browser Request
User or AI Crawler
⚡ Ninja Edge Layer
Rule Evaluation • Transformation • AI Layer Application
🌐 Origin Server
Unchanged — never touched

Before Ninja vs With Ninja

Before — Traditional Flow
Browser → Origin → HTML Response No AI signals No structured data No answer mapping AI misunderstands content
With Ninja — AI Knowledge Layer
Browser → Ninja Edge → Origin → Transform + Smart Anchor links on every heading + FAQPage / Organization schema injected + AI metadata tags applied + llms.txt discovery reference active

Request Flow

1
Request Arrives at Edge

User browser or AI crawler sends a request. Ninja intercepts at the edge before origin is contacted.

2
Rules Evaluated by Priority

Matching rules execute. Conditions are checked against URL, geo, device, headers, and dataset values.

3
Origin Response Fetched

Original HTML is retrieved from origin. Source remains entirely unmodified.

4
AI Layer Applied

Transformation rules and scripts modify the HTML response. AI Knowledge Layer elements are injected.

5
AI-Enhanced Response Delivered

Browser or AI system receives the fully enhanced page. Visual appearance for human visitors is identical.

<5ms Added Latency
300+ Global Edge Locations
100% Real-Time Processing

No Backend Changes Required

Traditional Approach
Developer implements changes in backend
CMS migration required for new capabilities
Deployment cycle needed for every update
Rollback requires a new deployment
Changes affect all users simultaneously
With Ninja
Rules activate instantly at the edge
Works on any existing CMS or stack
No deployment cycle — rules go live immediately
Instant rollback — pause any rule
Dry-run and preview before production
Rules Engine Behavior without Code

Every transformation in Ninja is defined as a rule. Rules describe behavior declaratively — the edge executes them. Product managers and content teams can build and activate rules without writing code.

WHEN
Trigger

When does the rule activate? On every HTML response, on specific URL patterns, on specific request conditions.

WHERE
Conditions

Where does it apply? Match URL paths, geo location, device type, headers, dataset values, user segments.

DO
Actions

What happens? Inject HTML, modify metadata, run a script, set response headers, bind dataset variables.

WHY
Priority & Logic

Execution order, rule dependencies, conflict resolution, staging flags, and rollout conditions.

Example: AI Schema Injection Rule

Rule Definition
rule faq-schema-inject trigger html_response where url matches /faq* do inject_json_ld FAQPage from dataset faq_content inject_anchor_map inject_ai_meta scope="faq, knowledge" priority 10

Rule Types

AI Knowledge Layer Rules
  • Answer mapping — link questions to answer paragraphs via anchors
  • Schema injection — FAQPage, Organization, SoftwareApplication structured data
  • AI metadata — ai-scope, ai-entity, ai-context tags
  • llms.txt reference — inject AI discovery link globally
  • Freshness signals — temporal metadata for AI systems
  • Knowledge navigation — annotate links with topic relationships

Rule Builder — Built for Humans, Not Just Developers

Visual Rule Builder — no code required
WHEN — Trigger
html_response
WHERE — URL Pattern
/faq*
DO — Action
inject_json_ld (FAQPage)
WHY — Priority
10 — production

"You don't write code. You describe behavior — and the edge executes it."

Datasets Structured Runtime Knowledge

Rules operate on structured knowledge rather than hardcoded values. Datasets define the knowledge your website carries. Variables bind that knowledge to HTML output at runtime.

Dataset
Structured data
Variable
Runtime binding
Rule
Executes at edge
Output
AI-enhanced HTML

Example Dataset: FAQ Knowledge

faq_content dataset
dataset faq_content "what-is-geo": question: "What is Generative Engine Optimization?" answer: "GEO helps AI systems understand websites." scope: "geo, ai-knowledge" "how-ninja-works": question: "How does Ninja apply the AI Layer?" answer: "At runtime, via rules, without CMS changes." scope: "platform, runtime"

Data Binding — Template to Output

HTML Template
<h2>{{faq.question}}</h2> <p>{{faq.answer}}</p>
Runtime Output — AI-Enhanced
<h2 id="q-what-is-geo" data-ninja-anchor="what-is-geo"> What is Generative Engine Optimization? </h2> <p data-answer-for="what-is-geo" data-scope="geo, ai-knowledge"> GEO helps AI systems understand websites. </p>

"Data doesn't rest. It executes — into output, into HTML, into the page the user sees."

Scripts Programmable Extensions

Rules handle 80% of transformations declaratively. Transformation Scripts handle the remaining complex cases — multi-step logic, dynamic data processing, conditional branching — executed safely in a sandboxed environment.

Rules — Declarative (80%)
Fixed behavior, no code required
WHEN / WHERE / DO / WHY syntax
Used by product managers and content teams
Best for: meta injection, schema, anchors, banners
Scripts — Programmable (Complex Cases)
Custom JavaScript in a secure sandbox
Access to ctx: request, datasets, HTML API
Used for complex transformations and logic
Best for: dynamic schema, AI entity annotation, conditional injection

Safe Execution Environment

🔒 Isolated Sandbox

Scripts run in a controlled environment. No system access. No network calls outside allowed scope.

🎯 Predictable Output

Every execution produces deterministic, verifiable output. No side effects beyond HTML transformation.

📊 Runtime ctx Object

Access: request URL, geo, device, dataset variables, HTML manipulation API, response headers.

✅ Production-Safe

Test in dry-run before activating. Preview output. Instant deactivation at any time.

Example Script: Dynamic AI Schema Generation

scripts/inject-faq-schema.js
// ctx provides access to datasets, request, HTML API const faqs = ctx.datasets.faq_content.entries; const schema = { "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": faqs.map(faq => ({ "@type": "Question", "name": faq.question, "acceptedAnswer": { "@type": "Answer", "text": faq.answer } })) }; ctx.html.injectJsonLd(schema); ctx.html.setMeta('ai-scope', faqs.map(f => f.scope).join(','));

"You write the logic. The edge executes it — between the server and the user."

Execution Engine Observable. Testable. Reversible.

Every transformation is controlled. No change reaches production without passing through a complete execution lifecycle — from draft to dry-run to validation to preview to live.

Stage 1
Draft
Stage 2
Dry Run
Stage 3
Validation
Stage 4
Preview
Stage 5
Live
Dry-Run Execution Log
09:14:02 Rule faq-schema-inject matched 09:14:02 Dataset faq_content resolved (4 entries) 09:14:02 Script executed successfully 09:14:02 + FAQPage schema injected 09:14:02 + 4 anchor links applied 09:14:02 + ai-scope meta tag set 09:14:02 ✓ Rule executed. 6 modifications captured.
HTML Diff View — Before vs After
<head> <title>FAQ | Ninja</title> + <script type="application/ld+json">{...}</script> + <meta name="ai-scope" content="geo, faq" /> </head> <body> ~ <h2 id="q-what-is-geo" + data-ninja-anchor="what-is-geo">
6 additions  ·  0 removals  ·  0 errors
Output Validation
Title tag present
Meta description present
H1 element verified
FAQPage schema valid
All anchors resolved
Title length: 61 chars (warn >60)
5 passed  ·  1 warning  ·  0 errors
Audit Timeline
09:10:00
Rule created — draft state
09:12:30
Dry-run executed — 6 modifications
09:14:02
Validation passed (1 warning)
09:16:45
Preview link generated
09:20:00
Rule activated — LIVE — Rollback available
Integrations Frictionless Deployment

Deployment requires minimal effort while preserving existing infrastructure. Ninja operates in front of your website — nothing inside your stack changes.

Alternative
☁ Cloudflare Worker

Deploy via Cloudflare Workers for existing Cloudflare infrastructure. 300+ global locations. Zero additional latency configuration.

Advanced
🌍 Selective Traffic Routing

Route specific paths or subdomains through Ninja. Gradual rollout. Zero-risk deployment with per-path control.

Get Started in Minutes

1
Add Your Domain

Register your domain in the Ninja dashboard. No code required.

2
Configure DNS

Update your DNS CNAME record to point to Ninja's edge network. One record, two minutes.

3
Verify Connection

Dashboard confirms traffic is flowing through Ninja. Origin is unaffected.

4
Create Your First Rule

Build a rule, dry-run it, validate, and activate. AI Knowledge Layer goes live instantly.

Works With Any Website

CMS Platforms
WordPress, Webflow, Contentful, Sanity, Drupal
Custom Backends
Node.js, Python, Ruby, PHP, Go, Java
E-Commerce
Shopify, Magento, WooCommerce, BigCommerce
Static Sites
Next.js, Astro, Gatsby, Hugo, Eleventy
SaaS Platforms
HubSpot, Salesforce, Wix, Squarespace
Legacy Systems
Any stack that serves HTML responses
<1ms
Added Latency
300+
Edge Locations
0
Backend Changes
Any Website Stack
Get Started

Ready to Make Your Website AI-Ready?

See the AI Knowledge Layer applied to your existing website — without changing your CMS, backend, or content workflow.