Skip to content

Pipelines

Studio turns an Anvia pipeline into a runnable development surface. Register a pipeline once, then use the browser to inspect its graph, supply input, watch stages change state, read runtime logs, and rerun saved inputs.

Studio does not replace the pipeline API. Build and type the workflow with PipelineBuilder; use Studio to understand how that workflow behaves while you develop it.

Studio pipeline inspector showing a branching pipeline graph

Register a pipeline

Pass built pipelines alongside any agents that Studio should expose:

ts
import { PipelineBuilder } from '@anvia/core/pipeline'
import { Studio } from '@anvia/studio'
import { z } from 'zod'

const ticketPipeline = new PipelineBuilder(z.string(), {
  id: 'ticket-triage-pipeline',
  name: 'Ticket triage',
  description: 'Normalizes a ticket and prepares a routing decision.',
  metadata: { owner: 'support-operations' },
})
  .step((ticket) => ticket.trim(), {
    id: 'normalize-ticket',
    name: 'Normalize ticket',
  })
  .step(
    (ticket) => ({
      ticket,
      priority: ticket.toLowerCase().includes('outage') ? 'high' : 'normal',
    }),
    {
      id: 'classify-priority',
      name: 'Classify priority',
    },
  )
  .build()

new Studio([ticketPipeline]).start({ port: 4021 })

Open http://localhost:4021/ui/pipelines. The Pipelines item remains available even when no pipeline is registered; in that case Studio shows an empty state explaining what to configure.

You can register several pipelines, or mix pipelines and agents in the same target list:

ts
new Studio([
  supportAgent,
  orderStatusPipeline,
  ticketRoutingPipeline,
]).start()

Use a stable, descriptive pipeline id. Studio uses it to address the pipeline, associate logs and runs, and locate the original input during replay.

The Studio workflow

text
Select pipeline

Inspect graph and node metadata

Enter JSON-compatible input

Run and watch stage state

Inspect output, logs, and saved run

Change the implementation or rerun the saved input

The pipeline inspector has four tabs:

TabWhat it shows
InputA JSON editor and the control that starts a run.
MetadataGraph counts plus details for the selected node.
RunsSaved run status, timing, output or error, and the Rerun action.
LogsOrdered pipeline and stage lifecycle events.

Choose the next page

GoalPage
Understand the graph, node details, and JSON input rulesGraph and inputs
Inspect stage events, outputs, failures, persistence, and replayRuns, logs, and replay
Learn how to construct typed pipelinesAnvia SDK pipelines

Studio is most useful for a pipeline with meaningful stage names and descriptions. They become the labels and explanations in the inspector, so operational names such as Load account or Draft response are more useful than generic names such as Step 2.

Built for Anvia.