| name | tenant-ingestion |
| description | Use this skill when ingesting business data into a tenant's Pi memory. Trigger when: a client provides documents, FAQs, website URLs, phone transcripts, business hours, service offers, prices, or policies that need to be normalized and stored in tenant memory. |
Tenant Ingestion
Role
Tenant ingestion transforms raw business data into structured tenant memory that Pi uses to answer questions, route leads, and execute skills on behalf of the business.
Supported Content Types
| Type | Description | Example |
|---|
document | PDF, DOCX, TXT | Service menu, employee handbook |
url | Website page | About page, service list |
faq | Question-answer pairs | "Do you offer emergency service?" |
transcript | Phone or chat transcript | Sales call recording (text) |
hours | Business hours | Mon-Fri 8am-6pm, Sat 9am-2pm |
offer | Current promotions | 10% off first HVAC service |
policy | Terms, refund, privacy | No refund within 24h of appointment |
Ingestion Pipeline
- Receive content via
POST /v1/tenants/{tenant_id}/ingest or factoryctl tenant ingest
- Detect content type and normalize to structured JSON
- Split into chunks (max 512 tokens per chunk)
- Embed each chunk using the configured embedding model
- Store in tenant namespace:
tenant:{slug}:docs:{chunk_id}
- Update
tenant:{slug}:meta:index with document list and last-ingested timestamp
- Return
job_id and status: queued
Rules
- Never mix tenant memory. All writes are prefixed with tenant namespace.
- Duplicate detection: if the same URL or document hash has been ingested, skip and log.
- PII handling: phone numbers, emails, and names in transcripts are flagged. Do not embed raw PII without operator acknowledgment.
- Ingestion does not require human approval, but destructive re-ingestion (full wipe + re-index) does.