Sources & batch data
Dashboard → Tools → Sources (/dashboard/sources) is for data only:
upload or connect rows, preview, edit, and save column mapping. Running an agent in batch happens on
AI Agents → [your agent] → Batch, not on the Sources page.
Do not confuse these pages
| Where | Purpose |
|---|---|
| Sources | Store CSV (in app DB, max 5 MB) or Postgres query config; preview; save default_mapping for batch. |
| CRM → Import & export | Import leads/contacts into the CRM (CSV, JSON bundle, Google Sheets). |
| Settings → Integrations | OAuth credentials (Gmail, Slack, Google Sheets for CRM import, etc.). |
| AI Agents → Batch | Submit batch jobs (AgentBatchExecution): load a saved source or paste JSON items. |
| Agent templates | Define behavior blueprints; deploy agents from templates—no batch execution on the templates list. |
End-to-end flow (dashboard)
- Sources — create CSV or Postgres source; Edit / preview; map columns; Save changes.
- Choose an agent → Open agent Batch tab → (URL includes
?tab=batch&data_source_id=…). - On the agent Batch tab — Batch from saved source → set row limit → Load source into batch → review items JSON → Submit batch.
- Track progress on the same tab (status, table, CSV/XLSX export, webhooks
agent.batch.completed).
What is stored
- CSV sources: full file text in
data_sources.csv_datafor your organization. - Postgres sources: env key name +
SELECTquery only; rows are read at preview/batch time. - Mapping:
config.default_mapping.fieldson the source (agent field → CSV/DB column). - Batch runs: standard agent batch records and per-row agent executions—not CRM leads unless your agent/workflow writes them.
API (authenticated)
GET /api/v1/data_sources
POST /api/v1/data_sources
PATCH /api/v1/data_sources/:id
DELETE /api/v1/data_sources/:id
POST /api/v1/data_sources/:id/preview # body: { "limit": 20 }
POST /api/v1/agents/:id/batch_executions # batch execution (use after loading rows client-side or from preview)
Legacy POST /api/v1/data_source_runs still exists for server-side row iteration but is not used by the current dashboard UI.