Waddle docs

Reference

Sessions

POST /session tells the creek what an agent session is doing. Every field, and the errors.

The request

POST localhost:4404/session, with content-type: application/json.

FieldTypeWhat it is
sessionstringThe session's id: 8 to 64 letters, digits and dashes. Required.
eventstringstart, prompt, tool, turn or end. Required.
cwdstringThe session's folder, from /. Its last part names the duckling. Required.
pidnumberThe agent's process id. Send it if you can: Waddle drops the duckling when that process exits (without it and without end, a duckling stays up to 12 hours).
agentstringWhich agent: claude, codex, opencode or pi. Leave it out for your own agent: Waddle then counts it as Claude Code (it predates the field), so Claude Code shows as heard in Preferences.
termobjectWhere it runs, so a click can jump there: app (the terminal's bundle id), program ($TERM_PROGRAM), iterm ($ITERM_SESSION_ID), tty (like ttys004). Each is optional and checked.
webbooleanOn a tool event: the step read the web. Only that it did, never what.

The events

EventWhenThe duckling
startA session beginsSwims in
promptSomeone asks it somethingWorks
toolIt takes a stepWorks
turnIt's done, or waiting on youUp on the bank
endThe session is overLeaves

Replies

sh
curl localhost:4404/session -H 'content-type: application/json' -d '{"event":"start","cwd":"/tmp"}'
json
{ "ok": false, "error": "Send \"session\": the session id" }

A good request answers { "ok": true }. A bad one answers 400 with what to send instead: a missing event lists the five, a missing or relative cwd asks for the session's folder.

A session event only moves the duckling. For Waddle to walk over, send news to /quack with a phrase.