Agent skill · data analytics · jeremylongshore

langfuse-data-handling

Manage Langfuse data export, retention, and compliance requirements.

Why this skill is useful

Includes executable scripts for data export and retention management specific to Langfuse that enhance compliance and observability capabilities.

What it needs

Requires @langfuse/client installed locally. Requires langfuse account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Langfuse Data Handling Overview Manage the Langfuse data lifecycle: export traces and scores via the API, configure retention policies, handle GDPR data subject requests, anonymize data for analytics, and maintain audit trails. Prerequisites @langfuse/client installed Langfuse API keys with appropriate permissions Understanding of your compliance requirements (GDPR, SOC2, HIPAA) Instructions Step 1: Export Trace Data via API Step 2: Export Scores Step 3: Data Retention Configuration Self-hosted: Set retention via environment variable: Cloud: Programmatic cleanup of old data: Step 4: GDPR Data Subject Requests Step 5: Data Anonymization for Analytics Data Categories and Retention Category Contains PII? Default Retention Compliance Note ---------- -------------- ------------------- ----------------- Traces (inputs/outputs) Likely 90 days Scrub PII before tracing Generations (LLM I/O) Likely 90 days May contain user data Scores Rarely 1 year Typically safe to retain Sessions User ID linked 90 days Link to user data requests Prompts No Indefinite Template data only Datasets Maybe Per use case Review test data for PII Error Handling Issue Cause Solution ------- ------- ---------- Export timeout Too many traces Reduce date range, use pagination Missing user data Different userId format Verify exact userId used in traces Deletion not immediate Async processing Allow time for propagation Rate limited during export Too many API calls Add 200ms delay between pages Output Produce either a redacted, access-controlled export with its date range and trace count, or a deletion receipt containing only the request identifier, affected-user identifier, and deleted-record count. Never place raw prompts, outputs, or API keys in the completion report. Examples For a subject-access request, export one user's records to an encrypted controlled location, verify the trace count against the dashboard, and record the export date and retention deadline. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/langfuse-data-handling--031aa8

View the source on GitHub

Browse the @skills marketplace