Compliance

GDPR and AI Memory: What You Need to Know

LegalDecember 28, 20257 min read

If you're building AI applications that serve European users, GDPR compliance is essential. Here's what you need to know about AI memory systems.

Key GDPR Principles

1. Lawful Basis

You need a legal basis to process personal data:

  • **Consent** - User explicitly agrees
  • **Contract** - Necessary to fulfill a contract
  • **Legitimate Interest** - Reasonable business need
  • 2. Purpose Limitation

    Data collected for one purpose can't be used for another without consent.

    3. Data Minimization

    Only collect and store what you need.

    AI-Specific Considerations

    Training Data

    If you use personal data to train AI models, you need consent or another lawful basis.

    Automated Decisions

    Users have the right to human review of decisions made purely by AI.

    Right to Erasure

    Users can request deletion of their data. This includes:

  • Stored memories
  • Vector embeddings
  • Any cached responses
  • PiyAPI GDPR Features

    // Delete user's data

    await client.memories.deleteByNamespace({

    namespace: `user_${userId}`,

    includeEmbeddings: true,

    });

    // Export user's data (portability)

    const export = await client.memories.export({

    namespace: `user_${userId}`,

    format: 'json',

    });

    Getting Compliant

    1. Sign our [DPA](/dpa)

    2. Enable EU data residency (Enterprise)

    3. Configure retention policies

    4. Enable audit logging

    See our [compliance dashboard](/settings/safety) for more.

    AI
    Memory
    Compliance

    Related Posts

    Product

    Introducing PiyAPI v2.0: The Memory Layer for AI

    Today we're announcing PiyAPI v2.0 with hybrid search, knowledge graphs, and enhanced PHI protection.

    Read more
    Technical

    Semantic Search Explained: Beyond Keyword Matching

    How vector embeddings enable meaning-based search and why it matters for AI applications.

    Read more

    Ready to build with PiyAPI?

    Start adding intelligent memory to your AI applications today.