Build
Edit with curl
Read a document, edit the JSON, and replace it with curl and jq.
TOKEN=$(jq -r .accessToken ~/.spinrun/credentials.json)
curl -s https://spinrun.ai/api/build/agents/triage-bot \
-H "Authorization: Bearer $TOKEN" | jq .data > agent.json
STAMP=$(jq -r .updated_at agent.json)
jq '.instructions = "Triage, then label."' agent.json > edited.json
curl -s -X PUT https://spinrun.ai/api/build/agents/triage-bot \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "If-Match: \"$STAMP\"" \
--data-binary @edited.json