← 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.
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
Print mode
pig -p "Say hello"JSON mode
pig --mode json -p "Say hello"
Files: MP4 · WebM · Captions (VTT) · PiG source
Next: Drive pig over RPC