← Demos

Embedding and integrations

Script pig: print and JSON modes

pig -p prints an answer and exits; --mode json prints every event as a line of JSON.

0:13 · pig 0.7.0 · recorded 2026-11-08 · model replies are scripted; tool calls and commands are real · captions in English, under the clip

What you are seeing

  • pig -p "Say hello" prints the answer as plain text and exits.
  • The same prompt with --mode json prints each event as one JSON line. The lines are cut to the width of the terminal with cut -c1-48.
  • A run starts with agent_start and ends with agent_settled. The model is scripted.

Try it yourself

  1. Print mode

    pig -p "Say hello"
  2. JSON mode

    pig --mode json -p "Say hello"

Files: MP4 · WebM · Captions (VTT) · PiG source

Next: Drive pig over RPC