For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /docs/transformer-pipelines/index.md.

Configure a Transformer Pipeline

Define a Transformer once in decoy.yaml to reuse it across named Pipelines. In the example below, gzip runs a command and approvals uses a persistent worker. The approvals-feed Pipeline decompresses incoming data before passing it to the worker. On output, it runs the worker first and compresses the result.

decoy.yaml (excerpt)
transformers:
  approvals:
    worker: [node, ../workers/approvals.ts]

  gzip:
    input: [gzip, -dc]
    output: [gzip, -c]

pipelines:
  approvals-feed:
    input: [gzip, approvals]
    output: [approvals, gzip]

Select a Pipeline on a Route

Set pipeline alongside id, transport, and match in the Route file. Both directions run in the listed order. Several compatible Routes can share one named Pipeline.

Route excerpt: select a named Pipeline
pipeline: approvals-feed
TransportWhat the Pipeline transforms
HTTPRequest and response bodies.
gRPCFramed request bytes and replies. Include grpc-frame and protobuf in the appropriate order if your Transformer works with decoded messages.
WebSocketIncoming frame payloads and outgoing messages, including Control API pushes.

In a named gRPC Pipeline, a configured Transformer takes precedence over a built-in step with the same name. For working configurations, see the shared HTTP and WebSocket example and the gRPC example.

Validation and execution limits

Decoy validates referenced Transformers and directions when loading Routes. A worker can also check the authored output literal at startup when it is the first output step. Restart Decoy to apply worker config changes.

A one-shot Transformer command has 5 seconds to finish. Decoy fails the transform if stdout exceeds 16 MiB or stderr exceeds 64 KiB. At most eight one-shot commands can run at once in the Decoy process. When all slots are busy, the next command fails the transform before spawning.