Agent Pipelines
Platform

Agent Pipelines

How agents work on a ticket: domain experts on matching steps, an executor that runs on its own, a pair alongside, plus tool chaining and batch execution.

Agents work on a ticket in one of three roles. This page covers what each role does during execution, how you chain tools together, and how you run one agent across many tickets.

Pipeline overview

When a ticket enters execution, JuhJuh works through its steps one at a time. You choose each agent's role when you attach it to the ticket.

graph TD
    A[Ticket enters execution] --> B[Next step]
    B --> C{Domain expert matches this step?}
    C -->|Yes| D[Expert instructions added to the step]
    C -->|No| E[Step runs with its own agent]
    D --> E
    E --> F{More steps?}
    F -->|Yes| B
    F -->|No| G[Execution complete]
    P[Pair programming agent] -.->|briefs, then reviews| E
Role What it does
Domain expert Its expertise is added to every step it matches, such as frontend, backend, test or content work
Executor Runs on its own only when started by a trigger, Run now, a batch or Slack. The ticket's steps still run without it
Pair programming Plans each code step with the agent doing it, then reviews the work on a different provider

Domain experts

A domain expert brings one kind of expertise to the steps that need it. Attach one for each kind of work on the ticket: one for frontend steps, one for backend steps, and so on.

Each domain expert carries a condition, such as "only frontend steps". JuhJuh checks the condition against each step before it runs. When it matches, the expert's instructions join that step's prompt. When it doesn't, the step runs without them.

Pick automatically

Select Pick automatically on the ticket's Agents panel and JuhJuh chooses a domain expert for each kind of work the ticket needs:

  1. It reads the kinds of work in the ticket's steps, or the ticket type when there are no steps yet.
  2. For each kind of work, it attaches an expert only when it is confident in the match.
  3. When it isn't sure, it attaches nothing and shows a short list of likely agents for you to pick from.

If the ticket has no steps and no type, set the ticket type first or attach an expert yourself.

Executor agents

An executor runs on its own, as a self-directed reasoning loop. It evaluates the ticket, chooses tools, executes them, inspects the results, and decides whether to continue or stop. Each iteration is a complete think-act-observe cycle. A ticket has at most one executor, and attaching one does not replace the ticket's steps.

The loop follows this structure:

  1. Load ticket context, connected tools, matched skills, and relevant knowledge
  2. Build a prompt with all available context
  3. Call the AI model
  4. Parse the response for tool invocations
  5. Execute any tool calls (capped at 20 per session by default)
  6. Record the step with token counts, cost, and duration
  7. Check for a completion signal
  8. If not done, loop back to step 2 with updated context
  9. Finalize: save the summary, create artifacts, post comments

The maximum iteration count defaults to 10. You can adjust it per agent. If the agent hits the limit without completing, the session ends with a partial result.

Tool pipelines

Tool pipelines let you chain multiple tool calls into an ordered sequence. Each step's output feeds into the next step through input mappings.

Define a pipeline with named steps. Each step specifies a tool, its parameters, and an optional transform. Use $prev references to pull values from the previous step's output.

Input mappings

Reference previous output with $prev.field_name. If step 1 returns a list of PR IDs, step 2 can reference $prev.ids to process each one.

Transforms

Apply transforms between steps to reshape data:

Transform What it does
json_to_markdown_table Converts a JSON array into a Markdown table
extract_ids Pulls ID values from a list of objects
count Returns the count of items in a list
first Returns the first item from a list
flatten Flattens nested lists into a single list

Example flow

A three-step pipeline that finds open PRs, extracts their IDs, and posts a summary:

Step 1: list_pull_requests(status="open")
   ↓ output: [{id: 42, title: "..."}, {id: 43, title: "..."}]
Step 2: extract_ids($prev) → transform: extract_ids
   ↓ output: [42, 43]
Step 3: post_summary(pr_ids=$prev, channel="engineering")

Tool pipelines run within agent sessions. They respect the same tool call limits and timeout constraints as individual tool calls.

Skills in the pipeline

Skills inject learned capabilities into agent executions. When a ticket matches a skill's trigger patterns, the skill's instructions are added to the agent's prompt automatically.

Up to 5 skills can activate per execution, selected by relevance and usage history. High-performing skills surface more often. Skills that consistently produce poor results can be deactivated.

Skills compose with the rest of the pipeline. A domain expert adds its expertise to a matching step, a skill adds domain-specific instructions, and the step gets both.

Batch execution

Run a single agent across multiple tickets in one operation. Each ticket gets the agent as its executor. Batch execution is useful for bulk actions like running a code quality scan across an entire sprint or applying a formatting standard to all open tickets in a project.

Configure a batch by selecting:

  • The agent to run
  • Filters: project, status, type, sprint, or assignee
  • Whether to skip tickets that match certain conditions

The batch tracks progress across all tickets: total count, completed, failed, and skipped. Cost aggregates across the full run. A summary report generates when the batch completes.

Batches handle failures gracefully. If one ticket fails, the batch continues with the remaining tickets. The failed ticket is logged with its error, and you can retry it individually.

Pair programming

A pair programming agent works inside each code step. Before the step runs, it gives the agent doing the work a short brief: the risks and checks that matter. After the step, it reviews the change and approves it, sends it back with notes, or flags it for you.

The review always runs on a different AI provider from the agent writing the step, so one model's blind spot is another's catch. If no other provider is available, the ticket tells you before it starts.

Safety and limits

Every pipeline execution operates within defined boundaries.

Limit Default Configurable
Max iterations (executor) 10 Per agent
Max tool calls (per session) 20 Per agent
Execution timeout Hard limit per task Platform-level
Skill injection 5 skills max Per execution
Knowledge context 10 entries, 6000 characters Per execution

Conditions on domain experts keep them off the steps they don't match. Sandbox policies restrict executor agents to their connected resource directories. Every tool invocation is logged for audit, recording the tool name, resource type, success status, and duration.

Monitoring pipeline runs

Pipeline execution is fully observable. Every step broadcasts status updates in real time to the ticket view.

What you see Where
Step-by-step progress Ticket detail, live updates
Token usage per step Execution session log
Cost breakdown Per-step and total in session
Tool call results Session step detail
Batch progress Batch execution dashboard

Sessions record their trigger source: UI, API, Slack, schedule, webhook, or event. Trace any execution back to exactly what started it.

Designing effective pipelines

Start simple. One domain expert for the main kind of work on the ticket covers most needs. Add more only when the ticket spans several kinds of work.

One expert per kind of work. A frontend expert and a backend expert on the same ticket each take their own steps. Attach one expert for each kind of work, so every step gets one clear set of instructions.

Write clear conditions. A condition decides which steps an expert joins. Keep it to one kind of work, so the expert's instructions only reach the steps they help.

Mix providers. Put the pair agent on a different provider from the domain experts, so the review comes from a different model.

Test with dry runs. Attach agents to a low-priority ticket first. Review the session log to verify which steps each agent joined and how it used its tools before rolling the setup out to your team.

  • Agents: create and configure the agents that run in your pipelines
  • Tickets: the execution lifecycle that pipelines attach to
  • Automation: auto-classification, auto-triage, and auto-play workflows
  • Instructions: define the rules your agents follow at every level
  • Prompt Templates: reusable prompts that complement agent pipeline steps
  • Resources: connect the tools and services your pipeline agents need