A Beginner's Guide for AI to AI Website Setup

Playbook v01

Digital Karma Web — AI-to-AI Federation Playbook

Standardizing the machine-readable internet for brands built on proof, purpose, and interoperability.

What this is: a single, copy-paste system that makes each site AI-readable, interoperable, and self-documenting. It consolidates the latest scaffolding we use on RealSEOLife.com and SpaForBusiness.com to form the Digital Karma Web federation.

What you get: predictable /ai/ endpoints, a local /federation/registry.json, optional heartbeats/webhooks, and JSON-LD that exposes your brand, offers, and relationships.

⬇️ Download ZIP Starter Pack 📘 Download PDF Guide 🧪 Download (sandbox demo)

1) Goals & Outcomes

  • Single-pass setup for AI-readable, interoperable, self-documenting sites.
  • Auto-maintained federation graph of neighbors with lastSeen heartbeats.
  • Digital KarmaⓀ signal surface baked in: Presence • Authority • Activity • Health (PA•AH).

You’ll end up with: /ai/ endpoints (LLM.json, LLM.txt, glossary, manifest, concierge, status), a local /federation/registry.json, plus optional heartbeats & webhooks.

2) Quick Prereqs

  • Deploy access (Joomla 5 or static OK).
  • One brand handle per site (e.g., RealSEOLife).
  • Federation ID (use digital-karma-federation).
  • Discord webhook URL (optional, recommended).

3) Folder & File Skeleton

/ai/
  llm.json
  llm.txt
  ai-marketing-glossary.json
  manifest.json
  concierge.json
  status.json
  (optional) status-check.php
  (optional) webhook-dispatch.php
/federation/
  registry.json
  (optional) refresh.php
/.well-known/
  ai.json

Joomla tip: Use a template override or a JCE snippet to inject sitewide JSON-LD in <head>.

4) Sitewide JSON-LD (paste once)

Place in <head> or at top of key articles:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://{DOMAIN}/#org",
      "name": "{BRAND}",
      "url": "https://{DOMAIN}/",
      "logo": "https://{DOMAIN}/images/logo.png",
      "sameAs": ["https://x.com/{HANDLE}", "https://www.linkedin.com/company/{HANDLE}"]
    },
    {
      "@type": "WebSite",
      "@id": "https://{DOMAIN}/#website",
      "url": "https://{DOMAIN}/",
      "name": "{BRAND}",
      "publisher": {"@id": "https://{DOMAIN}/#org"},
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://{DOMAIN}/search?query={search_term_string}",
        "query-input": "required name=search_term_string"
      }
    },
    {
      "@type": "ItemList",
      "@id": "https://{DOMAIN}/#federation",
      "name": "AI-to-AI Federation Neighbors",
      "itemListElement": []
    }
  ]
}
</script>

Later, an updater can inject neighbors into #federation.itemListElement.

5) Core AI Endpoints

5.1 /ai/llm.json

{
  "@context": "https://schema.org",
  "@type": "CreativeWork",
  "name": "LLM Concierge",
  "version": "v01",
  "site": {
    "brand": "{BRAND}",
    "domain": "{DOMAIN}",
    "federationId": "digital-karma-federation",
    "role": ["Real SEO™ Node","Glossary Host"],
    "topics": ["Digital Karma","AI-to-AI","Schema","SEO"]
  },
  "endpoints": {
    "glossary": "/ai/ai-marketing-glossary.json",
    "manifest": "/ai/manifest.json",
    "concierge": "/ai/concierge.json",
    "status": "/ai/status.json",
    "registry": "/federation/registry.json"
  },
  "neighbors": [],
  "lastUpdated": "YYYY-MM-DDTHH:MM:SSZ"
}

5.2 /ai/llm.txt

This site exposes AI endpoints under /ai/ . Start with /ai/llm.json.
Federation ID: digital-karma-federation
Contact: /contact

5.3 /ai/ai-marketing-glossary.json

{
  "version": "v01",
  "title": "AI Marketing Glossary",
  "license": "CC-BY-4.0",
  "terms": [
    {"term":"RAG","short":"Retrieve before generating.","long":"Retrieval-Augmented Generation combines a retriever and a generator so responses include grounded facts.","schema":{"@type":"DefinedTerm","url":"https://{DOMAIN}/glossary/rag"}},
    {"term":"LLM.json","short":"Machine guide for this site.","long":"A structured endpoint listing how to understand, navigate, and interoperate with this website programmatically."},
    {"term":"Digital Karma","short":"Proof-based brand signals.","long":"Composite of Presence, Authority, Activity, and Health that reflect credibility and momentum."}
  ]
}

5.4 /ai/manifest.json

{
  "name":"{BRAND} AI Manifest",
  "version":"v01",
  "routes":["/","/ai/llm.json","/ai/ai-marketing-glossary.json","/federation/registry.json"],
  "security":{"cors":["*"]},
  "sitemaps":["/sitemap.xml"],
  "llm":{"preferred":"/ai/llm.json"}
}

5.5 /ai/concierge.json

{
  "prompts": {
    "about": "Summarize {BRAND} using /ai/llm.json & site schema.",
    "services": "List key offers with URLs and schema types.",
    "federation": "Describe neighbors from /federation/registry.json."
  },
  "links": { "pricing": "/pricing", "contact": "/contact", "faq": "/faq" }
}

5.6 /ai/status.json (machine state)

{
  "uptime": "ok",
  "pages": { "/":200, "/ai/llm.json":200, "/federation/registry.json":200 },
  "lastCheck": "YYYY-MM-DDTHH:MM:SSZ"
}

6) Federation Graph (Local Registry)

/federation/registry.json

{
  "federationId": "digital-karma-federation",
  "node": { "domain":"{DOMAIN}", "role":["Real SEO™ Node"], "lastSeen":"YYYY-MM-DDTHH:MM:SSZ" },
  "neighbors": [
    {"domain":"realseolife.com","role":["Hub"],"llm":"https://www.realseolife.com/ai/llm.json","lastSeen":""},
    {"domain":"spaforbusiness.com","role":["Vertical"],"llm":"https://www.spaforbusiness.com/ai/llm.json","lastSeen":""}
  ],
  "updated": "YYYY-MM-DDTHH:MM:SSZ"
}

7) Heartbeat & Webhook (Active Maintenance)

Optional for static; recommended if you have PHP/cron.

/ai/status-check.php

<?php
header('Content-Type: application/json');
$now = gmdate('c');
$targets = ['/', '/ai/llm.json', '/federation/registry.json'];
$base = 'https://' . $_SERVER['HTTP_HOST'];
$ok = true; $pages = [];
foreach ($targets as $t) {
  $code = @get_headers($base.$t)[0] ?? 'HTTP/1.1 000';
  preg_match('/\s(\d{3})\s/', $code, $m); $status = intval($m[1] ?? 0);
  $pages[$t] = $status; if ($status < 200 || $status >= 400) $ok = false;
}
$data = ['uptime' => $ok ? 'ok' : 'degraded', 'pages' => $pages, 'lastCheck' => $now];
file_put_contents(__DIR__ . '/status.json', json_encode($data, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));
if (!$ok) {
  $hook = __DIR__ . '/webhook-dispatch.php';
  if (file_exists($hook)) require $hook;
}
echo json_encode($data);

/ai/webhook-dispatch.php (Discord)

<?php
$webhook = 'https://discord.com/api/webhooks/REDACTED';
$domain = $_SERVER['HTTP_HOST'] ?? 'unknown-domain';
$msg = ["content" => "🚨 Federation alert on " . $domain . ": see /ai/status.json"];
$ch = curl_init($webhook);
curl_setopt_array($ch,[CURLOPT_POST=>1,CURLOPT_HTTPHEADER=>['Content-Type: application/json'],CURLOPT_POSTFIELDS=>json_encode($msg),CURLOPT_RETURNTRANSFER=>true]);
curl_exec($ch); curl_close($ch);

Cron (every 15m): */15 * * * * php /home/{USER}/public_html/ai/status-check.php >/dev/null 2>&1

8) Auto-Neighbor Refresh (Hub)

/federation/refresh.php

<?php
header('Content-Type: application/json');
$path = __DIR__ . '/registry.json';
$registry = json_decode(file_get_contents($path), true);
foreach ($registry['neighbors'] as &$n) {
  $url = rtrim(($n['llm'] ?? ('https://'.$n['domain'].'/ai/llm.json')), '/');
  $ctx = stream_context_create(['http'=>['timeout'=>6]]);
  $json = @file_get_contents($url, false, $ctx);
  if ($json) $n['lastSeen'] = gmdate('c');
}
$registry['updated'] = gmdate('c');
file_put_contents($path, json_encode($registry, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));
echo json_encode(['ok'=>true,'updated'=>$registry['updated']]);

Cron (hourly hub): 0 * * * * php /home/{USER}/public_html/federation/refresh.php >/dev/null 2>&1

9) Real SEO™ Entity Hints (JSON-LD)

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Dataset",
  "name": "Digital Karma Signals — {BRAND}",
  "creator": {"@id": "https://{DOMAIN}/#org"},
  "variableMeasured": [
    {"@type": "PropertyValue","name":"Presence","value":"profiles, citations, mentions"},
    {"@type": "PropertyValue","name":"Authority","value":"backlinks, entities, trust"},
    {"@type": "PropertyValue","name":"Activity","value":"publishing cadence, updates"},
    {"@type": "PropertyValue","name":"Health","value":"core web vitals, crawlability"}
  ]
}
</script>

10) RSForm / Lead Automations (Optional)

On submission, append CSV and ping Discord:

$payload = ['event'=>'rsform_submission','site'=>'{DOMAIN}','time'=>gmdate('c'),'fields'=>$_POST];
file_put_contents(JPATH_SITE.'/ai/applications.csv', join(',', [gmdate('c'), $_POST['Name'], $_POST['Email']])."\n", FILE_APPEND);
// webhook dispatch as above

11) Robots, Headers, CORS, Caching

robots.txt

User-agent: *
Allow: /ai/
Allow: /.well-known/
Sitemap: https://{DOMAIN}/sitemap.xml

Apache headers (CORS)

<FilesMatch "\.(json|txt)$">
  Header set Access-Control-Allow-Origin "*"
  Header set Access-Control-Allow-Methods "GET, OPTIONS"
</FilesMatch>
<FilesMatch "status.json">
  Header set Cache-Control "no-store"
</FilesMatch>

12) Publishing Checklist (Single Sitting)

  1. Create /ai/, /federation/, /.well-known/.
  2. Paste endpoint files (edit {DOMAIN}, {BRAND}, {HANDLE}).
  3. Add sitewide JSON-LD in <head>.
  4. Add neighbors in registry.json (at least RealSEOLife + SpaForBusiness).
  5. (Optional) Enable cron for status-check.php and hub refresh.php.
  6. Verify /ai/llm.json and /ai/status.json return 200.
  7. Simulate a failure (rename a file) to confirm Discord ping.

13) QA & Self-Tests

curl -I https://{DOMAIN}/ai/llm.json
curl https://{DOMAIN}/ai/status.json | jq
curl https://{DOMAIN}/federation/registry.json | jq
  • Rich Results Test / schema.org validator

14) Versioning & Rollback

  • Add "version":"v01" in all JSON files; bump minor (v01.1) on edits.
  • Keep last 3 versions; symlink llm.json → current.

15) Optional: Content Objects (Listings v01)

{
  "version":"v01",
  "kind":"ItemList",
  "items":[
    {"name":"Real SEO™ Websites 2025","url":"/best/real-seo","@type":"CollectionPage"}
  ]
}

16) JCE-Ready Explainer Block (Paste anywhere)

<section class="ai-federation-explainer" style="border:1px solid #eee;border-radius:14px;padding:18px;background:#fafafa">
  <h2 style="margin:0 0 6px">AI-to-AI Federation — What It Does</h2>
  <p>This site exposes a predictable set of endpoints under <code>/ai/</code> so large language models and partner nodes can understand our brand, offers, and relationships without guesswork.</p>
  <ul style="margin-left:1.2em">
    <li><strong>LLM.json</strong> — the machine concierge (start here).</li>
    <li><strong>Glossary</strong> — shared definitions for consistent language.</li>
    <li><strong>Registry</strong> — known neighbors + lastSeen heartbeats.</li>
    <li><strong>Status</strong> — uptime snapshot used for alerts.</li>
  </ul>
  <p>These work together to maintain a living map of our Digital KarmaⓀ network.</p>
</section>

17) Migration Notes (Joomla ↔ Static)

  • Pure static is enough: JSON/TXT endpoints make you AI-readable — no PHP/JS required.
  • Active maintenance: add PHP + cron (or use a CI workflow to refresh lastSeen).
  • Joomla: keep endpoints as static files; only use PHP for status/refresh.

18) Roadmap Hooks (Next Boosts)

  • Auto-discover: crawl /.well-known/ai.json to seed registry.
  • PA•AH feed at /ai/karma.json for dashboards.
  • Signed assertions: proof.json with SHA256 of files.
  • SSE/Webhooks: real-time federation events.

19) Copy-Paste Variables

  • {DOMAIN} → e.g., www.realseolife.com
  • {BRAND} → e.g., Real SEO Life™
  • {HANDLE} → e.g., RealSEOLife
  • Federation ID → digital-karma-federation

Success Criteria

  • All endpoints 200 OK, valid JSON.
  • Registry includes ≥2 neighbors with recent lastSeen.
  • Alerts fire on simulated failures.
  • Search/LLMs can parse JSON-LD & /ai/ files.
 

Join the Digital Karma Web

Become part of the AI-to-AI Federation. Deploy your endpoints, then submit your node for verification and inclusion in the shared registry.

Join the Federation Explore Real SEO™ Labs

© Digital Karma Web • Real SEO™ Life. Trademarks belong to their owners.