{% extends "base.html" %}

{% block title %}Privacy Policy — Maxim | Agentic Robotics Framework{% endblock %}

{% block meta_description %}Privacy policy for the Maxim agentic robotics framework. Details on data collection, SMS messaging, and how your information is handled.{% endblock %}

{% block meta_keywords %}Maxim privacy policy, Maxim data, SMS privacy, Twilio privacy, agentic robotics privacy{% endblock %}

{% block meta_author %}Maxim Project{% endblock %}
{% block og_site_name %}Maxim{% endblock %}
{% block og_type %}article{% endblock %}

{% block structured_data %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "Privacy Policy — Maxim",
  "description": "Privacy policy for the Maxim agentic robotics framework.",
  "author": { "@type": "Person", "name": "Denny Schaedig", "url": "https://www.dennyschaedig.com" },
  "publisher": { "@type": "Organization", "name": "Maxim", "url": "https://www.dennyschaedig.com/maxim" },
  "mainEntityOfPage": "https://www.dennyschaedig.com/maxim/privacy-policy"
}
</script>
{% endblock %}

{% block content %}
<div class="space-y-8">
  <a href="/maxim" class="text-indigo-400 hover:text-indigo-300 text-sm font-medium">&larr; Back to Maxim Overview</a>

  <header class="text-center space-y-2">
    <h1 class="text-3xl md:text-4xl font-bold text-white tracking-tight">Privacy Policy</h1>
    <p class="text-slate-400 text-sm">Last updated: March 8, 2026</p>
  </header>

  <div class="rounded-xl bg-gradient-to-br from-indigo-700 via-purple-700 to-indigo-800 p-6 text-white shadow-lg">
    <p class="leading-relaxed">This privacy policy describes how the Maxim project ("Maxim," "we," "us") collects, uses, and protects information when you interact with our services, including SMS/MMS messaging.</p>
  </div>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Information We Collect</h2>
    <p class="text-slate-300 leading-relaxed">When you interact with Maxim, we may collect the following information:</p>
    <ul class="space-y-2 text-slate-300 list-disc pl-5">
      <li><strong class="text-white">Phone number</strong> &mdash; When you send or receive SMS/MMS messages through our Twilio-powered messaging service.</li>
      <li><strong class="text-white">Message content</strong> &mdash; The text of messages you send to and receive from Maxim, used to process your requests and maintain conversation context.</li>
      <li><strong class="text-white">Conversation metadata</strong> &mdash; Timestamps, message direction (inbound/outbound), and conversation threading identifiers.</li>
      <li><strong class="text-white">Usage data</strong> &mdash; Interaction patterns used by Maxim's internal learning systems (NAc reward attribution) to improve response quality.</li>
    </ul>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">SMS/MMS Messaging</h2>
    <p class="text-slate-300 leading-relaxed">Maxim uses Twilio to send and receive SMS and MMS messages. By texting Maxim, you consent to receive automated responses. Key details:</p>

    <div class="bg-slate-800 border border-slate-700 rounded-xl p-6 space-y-4">
      <div>
        <h3 class="text-lg font-semibold text-indigo-400 mb-2">Message Frequency</h3>
        <p class="text-slate-300">Message frequency varies based on your interaction. Maxim responds to your messages and may send proactive notifications related to active tasks or goals.</p>
      </div>
      <div>
        <h3 class="text-lg font-semibold text-indigo-400 mb-2">Opting Out</h3>
        <p class="text-slate-300">You can stop receiving messages at any time by texting <span class="font-mono text-indigo-400">STOP</span> to our number. You will receive a confirmation and no further messages will be sent.</p>
      </div>
      <div>
        <h3 class="text-lg font-semibold text-indigo-400 mb-2">Help</h3>
        <p class="text-slate-300">Text <span class="font-mono text-indigo-400">HELP</span> for assistance or contact us at the email below.</p>
      </div>
      <div>
        <h3 class="text-lg font-semibold text-indigo-400 mb-2">Costs</h3>
        <p class="text-slate-300">Message and data rates may apply. Check with your carrier for details.</p>
      </div>
    </div>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">How We Use Your Information</h2>
    <p class="text-slate-300 leading-relaxed">Information collected is used for the following purposes:</p>
    <ul class="space-y-2 text-slate-300 list-disc pl-5">
      <li><strong class="text-white">Processing requests</strong> &mdash; Your messages are processed through Maxim's agentic pipeline to understand intent and generate responses.</li>
      <li><strong class="text-white">Conversation continuity</strong> &mdash; Message history is maintained for the duration of a conversation session (30-minute inactivity timeout) to provide contextual responses.</li>
      <li><strong class="text-white">Internal learning</strong> &mdash; Interaction patterns are used by Maxim's reward learning systems to improve future responses. This is local, on-device learning&mdash;not shared externally.</li>
      <li><strong class="text-white">Memory systems</strong> &mdash; Salient interactions may be stored in Maxim's episodic memory for future reference, following the same memory lifecycle as all other perceptual inputs.</li>
    </ul>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Data Sharing</h2>
    <div class="bg-slate-800 border border-slate-700 rounded-xl p-6">
      <p class="text-slate-300 leading-relaxed mb-3">We do not sell, rent, or share your personal information with third parties for marketing purposes. Your data may be processed by the following service providers solely for message delivery:</p>
      <ul class="space-y-2 text-slate-300 list-disc pl-5">
        <li><strong class="text-white">Twilio</strong> &mdash; Provides SMS/MMS transport. Subject to <a href="https://www.twilio.com/legal/privacy" class="text-indigo-400 hover:text-indigo-300">Twilio's Privacy Policy</a>.</li>
      </ul>
      <p class="text-slate-300 leading-relaxed mt-3">We may disclose information if required by law or to protect the safety of users.</p>
    </div>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Data Security</h2>
    <p class="text-slate-300 leading-relaxed">We take security seriously. Measures include:</p>
    <ul class="space-y-2 text-slate-300 list-disc pl-5">
      <li><strong class="text-white">Webhook verification</strong> &mdash; All inbound Twilio webhooks are validated using HMAC signature verification to prevent spoofing.</li>
      <li><strong class="text-white">Local binding</strong> &mdash; The API server binds to localhost only. External access requires an encrypted tunnel (ngrok or Cloudflare Tunnel).</li>
      <li><strong class="text-white">Token authentication</strong> &mdash; Control endpoints are protected by bearer token authentication.</li>
      <li><strong class="text-white">Fixed trust boundaries</strong> &mdash; External message content never controls internal system fields like salience or override commands.</li>
    </ul>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Data Retention</h2>
    <p class="text-slate-300 leading-relaxed">Conversation sessions expire after 30 minutes of inactivity. Expired conversations are archived as summaries in Maxim's memory systems and the original message content is not retained in full. Memory items are subject to natural decay over time as part of Maxim's biologically-inspired memory lifecycle.</p>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Your Rights</h2>
    <p class="text-slate-300 leading-relaxed">You have the right to:</p>
    <ul class="space-y-2 text-slate-300 list-disc pl-5">
      <li>Opt out of SMS messaging at any time by texting <span class="font-mono text-indigo-400">STOP</span></li>
      <li>Request information about the data we hold about you</li>
      <li>Request deletion of your data</li>
    </ul>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Children's Privacy</h2>
    <p class="text-slate-300 leading-relaxed">Maxim is not intended for use by individuals under the age of 13. We do not knowingly collect personal information from children. If you believe a child has provided us with personal information, please contact us and we will delete it.</p>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Changes to This Policy</h2>
    <p class="text-slate-300 leading-relaxed">We may update this privacy policy from time to time. Changes will be posted on this page with an updated revision date. Continued use of our services after changes constitutes acceptance of the updated policy.</p>
  </section>

  <section class="space-y-4">
    <h2 class="text-2xl font-semibold text-white border-b border-indigo-500/50 pb-2">Contact</h2>
    <div class="bg-slate-800 border border-slate-700 rounded-xl p-6">
      <p class="text-slate-300 leading-relaxed">If you have questions about this privacy policy or wish to exercise your data rights, contact:</p>
      <p class="text-slate-300 mt-3">
        <strong class="text-white">Denny Schaedig</strong><br>
        <a href="mailto:dennys25@pm.me" class="text-indigo-400 hover:text-indigo-300">dennys25@pm.me</a>
      </p>
    </div>
  </section>

  {% include "_maxim_footer.html" %}
</div>
{% endblock %}
