> ## Documentation Index
> Fetch the complete documentation index at: https://docs.negentro.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory Essentials: 4 Foundational Pillars

> Architectural principles for managing persistent agent state across weeks of interaction.

`POST /api/v1/bulk/memories/tag`

## 1. Entity Partitioning Strategy

Separate memory into distinct layers using metadata scoping: user\_id (personalization), agent\_id (agent persona and guidelines), and session\_id (short-term thread context).

## 2. Bulk Memory Operations

Manage memory datasets efficiently at scale using bulk tagging and bulk deprecation endpoints.

### Tag Memories in Bulk

```bash theme={null}
curl -X POST https://api.piyapi.cloud/api/v1/bulk/memories/tag \
  -H "Authorization: Bearer sk_live_prod_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "memory_ids": ["8a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", "9b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e"],
    "add_tags": ["verified", "q3-review"]
  }'
```

## 3. GDPR & Compliance Memory Exports

Export entire tenant or user datasets atomically for audit compliance or data migration:

### Export Tenant Dataset

```bash theme={null}
curl -s https://api.piyapi.cloud/api/v1/compliance/export?user_id=usr_9918 \
  -H "Authorization: Bearer sk_live_prod_key_here"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.