Roles
| Role | Direction | What gets moved |
|---|---|---|
INVENTORY_SOURCE | Inbound | CSV / JSON / XLSX files pulled on a schedule, uploaded via the existing inventory pipeline. |
RESULTS_SINK | Outbound | Mapping job results pushed on job complete (opt-in). |
Inbound: pulling inventory
- S3
- HTTPS webhook (inbound)
Required config:
bucket— bucket name (e.g.acme-inventory).prefix— key prefix to watch (e.g.daily-uploads/).region— AWS region (e.g.us-east-1).secretRef— vault id containingaccessKeyId+secretAccessKey(IAM keys withs3:GetObject+s3:ListBucket).
pull_inventory_from_source(sourceId) either on its scheduleCron (default the agent’s cron) or on demand. New files since lastSyncedAt are downloaded, uploaded via the standard inventory pipeline, and recorded in agent_data_source_sync.manifest_json.Auto-pull on schedule
Controlled by the rule set:DATA_SOURCE_PULL_FAILED pending item is filed, and configured channels are notified.
Outbound: pushing results
- S3
- HTTPS webhook (outbound)
Same shape as the inbound config (
bucket + prefix + region + secretRef), plus IAM keys with s3:PutObject permission. The agent writes {prefix}/job-{jobId}.{format} on successful job completion.Push actions are not undoable — outbound webhooks are external side effects. Use the test endpoint before flipping auto-push on.
Secret handling
All credentials live in the existing secret vault used byBillingService. They are:
- Never logged.
- Never returned in full from the API (
mt_byo_****1234redaction). - Encrypted at rest.
- Validated at save time via a low-cost ping (
OPTIONSfor webhooks,ListBucketfor S3).
Testing a source / sink
Every source has a Test button (and aPOST /api/v1/agents/{id}/data-sources/{sid}/test endpoint). It runs a read-only smoke check — no data moved, no sync record created. Returns a verbose pass/fail with the diagnostic message.
Sync history
The Inbound / Outbound subsections show the last N syncs per source. Per-row manifest, byte counts, errors. Drill in viaGET /api/v1/agents/{id}/data-sources/{sid}/syncs.
Related
- Agents overview — broader context.
- Recipes: Pull inventory from S3
- Recipes: Push results to webhook