Some AI platforms push events to LangWatch via webhook or OTLP (see ingestion sources). Others expose a paginated audit-log REST API or drop NDJSON files in an S3 bucket on a schedule, and you’re expected to pull. Pull-mode connectors are LangWatch’s universal abstraction for those, you declare the source shape, the framework handles polling + pagination + parsing + cursor-based resume.Documentation Index
Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Pairs with: Ingestion sources (the broader substrate that pull-mode lands events into) and CLI debugging (
langwatch ingest tail shows pulled events alongside pushed ones).Two universal adapters + reference implementations
| Adapter | What it polls | When to use |
|---|---|---|
http_polling | Paginated REST APIs with cursor-based pagination | Microsoft Copilot Studio audit logs; Anthropic compliance API; Workato job-history endpoint; any custom enterprise audit-log API |
s3_polling | S3 buckets containing NDJSON, CSV, JSON-array files | Anthropic compliance dump; OpenAI enterprise audit export; custom S3-to-archive pipelines; on-prem object storage with S3-compatible interface (MinIO, etc.) |
http_polling ship for:
- Microsoft Copilot Studio: one-click admin enable, credentials only
- OpenAI compliance API: one-click admin enable, credentials only
- Anthropic compliance API: one-click admin enable, credentials only
How the framework works
IngestionSource.lastCursor in PG, persisted only after a successful
runOnce. If the worker crashes mid-run, the next run resumes from the
last persisted cursor (worst case = small re-pull window if the source
is at-least-once).
http_polling config shape
headerssupports template substitution:${{credentials.<key>}}pulls from the credential ref;${{ingestionSource.<field>}}pulls from the IngestionSource row (organizationId, name, etc.).cursorJsonPath+eventsJsonPathuse JSONPath to locate the next-page cursor + the events array in the response body.scheduleis a standard cron expression.eventMappingdeclares how to extract LangWatch’s normalized event shape from each event in the array.
s3_polling config shape
- Cursor = lexicographic-max key seen so far. New runs LIST the bucket
- prefix and only read keys lexicographically AFTER the cursor.
parser∈"ndjson" | "csv" | "json-array", applied per-file.- Credential rotation is honored on every run (no in-process caching).
Normalized event shape
Every adapter returns events in the same canonical shape, so the worker handoff to the trace-store ingest path doesn’t care which source produced them:| Field | Type | Notes |
|---|---|---|
source_event_id | string | Adapter-specific stable ID; used for deduplication on re-pull |
event_timestamp | ISO 8601 string | When the event happened in the source |
actor | string | Typically user email or service-account name |
action | string | Event type (e.g. "completion", "audit.update") |
target | string | Model name or resource being acted on |
cost_usd | number | 0 if the source doesn’t expose cost |
tokens_input | number | 0 if unknown |
tokens_output | number | 0 if unknown |
raw_payload | string | Full original event for audit, debugging |
Writing a custom puller (TypeScript module)
If neitherhttp_polling nor s3_polling fits your source, you can
ship a custom adapter:
Reference impl: Microsoft Copilot Studio
The Copilot Studio reference puller wrapshttp_polling with a
locked-down config matching Microsoft’s documented audit-log API
shape. Admins enable it at Settings → Governance → Ingestion
sources → Add → Microsoft Copilot Studio, enter their tenant
credentials, and the framework handles the rest. URL + auth shape are
fixed (only credentials are admin-editable).
The same one-click pattern applies for openai_compliance and
claude_compliance once those reference impls land alongside.
Where to next
- Ingestion sources: the broader substrate; push-mode and pull-mode both feed the same trace store
- CLI debugging:
langwatch ingest tailfor live inspection of pulled events - Compliance architecture — how pulled events flow through the unified observability substrate