ACP TypeScript SDK example client
Connects to PiG over ACP through pig-acp. Ran on PiG 0.7.0 with a scripted model.
What works and what you need
Needs: PiG ACP adapter. pig-acp, PiG’s ACP adapter, which ships as its own archive in every PiG 0.8.0 release. ACP TypeScript SDK example client ran on PiG 0.7.0 with pig-acp 0.2.1 and a local scripted model, and has not been rerun on 0.8.0.
Uses pig-acp. Complete the one-time pig-acp setup first, then add the configuration below.
Setup
Connection: ACP, through pig-acp.
Configuration: n/a (library; the example client spawns an agent command)
Format: TypeScript: spawn(cmd, args) then acp.ndJsonStream + acp.client(...).connectWith(...)
// adapted from src/examples/client.ts: replace the spawn of the example agent with
const agentProcess = spawn("pig-acp", ["--pig", "/path/to/pig"], { stdio: ["pipe", "pipe", "inherit"] });Test record
PiG 0.7.0 run
Ran (2026-11-06). @agentclientprotocol/sdk 2.4.0, example client adapted to spawn pig-acp, via tsx on Node 24; pig-acp 0.2.1 and pig 0.7.0 (pig --version prints 0.7.0+1.5.0), Linux amd64 in a container, with a local scripted model (no real model, no key).
Not run. No screenshot: it is a library example, not an app.
Notes. Reference client, not a product. The example hard-codes spawning its own example agent, so the spawn line and the prompt text were changed; everything else is the upstream example.
Sources and project
ACP TypeScript SDK example client documentation
The name and logo belong to ACP TypeScript SDK example client’s owners. PiG is independent of ACP TypeScript SDK example client; no endorsement is implied.