Skip to main content

Agents

An agent is the atomic unit of work in a Modulo pipeline – a configured node that performs one step: read a file, call an LLM, write a PR comment, or wait for human review.

Agent configuration

Pipeline config
{
  "name": "draft-pr-description",
  "type": "llm",
  "model_backend": "anthropic",
  "prompt": "Write a PR description for the attached diff.",
  "schema": "pr-description-v1",
  "connector": "github"
}

Each agent has:

Agent configuration
Field Description
name Unique identifier within the pipeline
type llm, connector, transform, gate, trigger
model_backend Which model backend to route through (for llm type)
prompt System prompt for the agent
schema Schema that validates the agent’s output
connector Connector binding for tool access
timeout Max execution time before cancellation

Prompt versioning

Every prompt change creates a new version. Modulo preserves all versions and allows restoring any previous one. The audit log records which prompt version produced each run output.

Schema assignment

Agents produce typed artifacts. A schema defines the expected shape and constraints. Schemas are versioned independently from agents, so a schema update can affect multiple agents at once.

Gate agents

Gate agents don’t produce output – they evaluate a condition and either pass or block the pipeline:

Pipeline config
{
  "name": "check-approval",
  "type": "gate",
  "condition": "{{ run_context.approved == true }}"
}

Human-only gates

Mark an agent as human_only: true to prevent automated execution. The pipeline pauses at this node until a human manually completes the step through the UI.