Skip to main content

Quickstart

What pipelines are for​

Use a pipeline to keep a corpus in sync with content that lives somewhere else: an S3 bucket, a SharePoint site, a Confluence space. The pipeline fetches records from the source on a schedule and passes each one to an agent. In this guide, that agent indexes each record into a corpus.

Because an agent handles every record, a pipeline can do more than copy:

  • Enrich records as they arrive. The agent can extract, reshape, or summarize content before indexing it.
  • Catch records that fail. Verification defines what counts as success for a record, and failures land in the dead letter queue for inspection and retry. Verification reports on the result; it does not prevent the agent's writes.

Each record arrives with the source system's metadata, including the permissions the source resolved at fetch time. Vectara does not enforce those permissions automatically. To apply them, map them into document metadata at index time and filter on them at query time. See session metadata.

To read from a system at request time instead of copying its content, use a tool. See integrations.

How it works​

You define a pipeline with three things: where the data comes from (the source), when it should run (the trigger), and which agent processes each record (the transform). The pipeline handles the rest — fetching records from the source, creating an agent session per record, tracking progress, and retrying failures.

Every record gets its own fresh agent session, and the agent decides what to do with it: index it into a corpus, extract structured information, or discard it. That is what gives you the flexibility of an agent applied to bulk data without writing orchestration code yourself.

Incremental sync, the default, is what keeps later runs cheap: the pipeline stores a watermark for each record — a version marker such as a modified timestamp or etag — and compares against it on the next run to decide whether the record needs reprocessing. Retries and full-refresh runs can reprocess records.

This guide walks through creating a pipeline that reads records from a source every 6 hours and sends each one to an agent for processing. For a deeper explanation of sources, triggers, transforms, verification, and sync modes, see concepts.

Prerequisites​

  • An agent that knows how to process a record (for example, one that uses the structured_document_index tool to index documents into a corpus). In the Console you can create this agent while setting up the pipeline.
  • A source with read permissions for the records you want to process.

Create a pipeline in the Console​

Open Dev tools > Pipelines in the Console and click + Create pipeline. The wizard has five steps: General, Source, Transform, Schedule, and Advanced. You can move between steps before every field is filled in. Until they are, the wizard shows a Some fields have errors banner naming the steps that still need attention, with a See errors link. Edit JSON in the top right configures the same pipeline as a JSON document instead.

  1. General — enter a Name and a Key. The key is a unique identifier for the pipeline; valid characters are letters, numbers, hyphens, and underscores. Description is optional.
  2. Source — choose a Source type, then fill in the fields that source needs. See data sources for each source's configuration and credentials.
  3. Transform — choose the Agent that processes each record. One agent session is created per source record. If you have not built the agent yet, + Create transformation agent starts one from here. Optionally set a Verification type to evaluate the agent's results; see verification.
  4. Schedule — pick a Sync mode. Incremental, the default, syncs only new or modified data since the last run; Full refresh reprocesses all records listed by the source on each run, and source-reported deletions are not processed. Then pick a Trigger: Interval (the default, entered as a duration such as 6 Hours), Cron, or Manual.
  5. Advanced — attach optional JSON Metadata to the pipeline, and use the Enabled toggle to set it active or inactive. It is enabled by default.

The pipeline then appears in the Pipelines list with its Key, Name, Description, Source, Status, and Watermark. Expanding a row shows its trigger, agent key, sync mode, and creation time.

Create a pipeline with the API​

Send a POST request to the pipelines endpoint with the source, trigger, and transform configuration:

Create a pipeline

Code example with bash syntax.
1

The body fields:

  • source — where data comes from. The source credentials are encrypted at rest and never returned in API responses. See data sources for details.
  • trigger — when the pipeline runs. cron uses a standard 5-field cron expression in UTC.
  • transform — the agent that processes each record. Each source record creates a fresh agent session.
  • sync_mode — incremental only processes new or changed records since the last run; full_refresh reprocesses all records listed by the source on each run, and source-reported deletions are not processed.
  • verification — optional, inside transform. Defines what counts as success beyond the agent session not throwing. See verification.

Trigger a run​

A pipeline with a cron or interval trigger runs on its own schedule. Whatever the trigger, you can start a run immediately from the Console or the API.

In the Console​

Open Dev tools > Pipelines, select your pipeline, and go to Run history. Select Trigger run in the top right.

The header also has Reload, which refreshes the run list, and Disable agent, which disables the pipeline's transform agent.

With the API​

Trigger a pipeline run

Code example with bash syntax.
1

Check progress​

In the Console​

The Run history view lists every run of the pipeline. Before the first run it reads No runs yet.

Each row shows:

ColumnWhat it tells youAPI field
Run IDThe identifier for the run, which includes the pipeline name and how it was triggeredid
StatusWhether the run is Running, Completed, Failed, or Cancelledstatus
Success raterecords_processed / (records_processed + records_failed), displayed as a percentagecalculated
Total recordsHow many records the source returnedrecords_fetched
Processed recordsHow many completed successfully or reused a prior successful session at the same watermarkrecords_processed
Failed recordsHow many failedrecords_failed
Started at / Completed atRun start and finish timestampsstarted_at / completed_at
Run timeHow long the run tookcalculated

Use the search box and the All statuses dropdown to filter the list.

Success rate is records_processed / (records_processed + records_failed). It does not measure new worker executions or documents written during the run. records_processed includes records that reuse a prior successful session at the same watermark. Skipped outcomes are excluded, including records whose worker ran but whose judge was filtered out. A run that skipped most of its records can still show 100%. Compare it against Total records rather than reading it alone. When records_processed + records_failed is zero, the column shows -.

note

Completed means the run finished, not that the data landed. A run can finish with a 0% success rate and every record counted under Failed records. Read the success rate and the record counts, not the status alone.

With the API​

List the runs to see status and record counts:

List pipeline runs

Code example with bash syntax.
1

The response includes each run's status and record counts. records_skipped includes records filtered out by the worker's run_condition and records whose worker ran but whose judge was filtered out. Records that reuse a prior successful session at the same watermark count as records_processed, not records_skipped. See when verification does not run:

Pipeline runs response

Code example with json syntax.
1

Next steps​

  • Read pipeline concepts for a full explanation of sources, triggers, transforms, verification, and sync modes.
  • See data sources for every available source and its incremental sync behavior.
  • Learn how to handle failed records with the dead letter queue.