#!/usr/bin/env bash
# List the agents in your workspace. Needs: curl, jq.
set -euo pipefail
BASE="${RELATIONSAI_API_BASE:-https://voice-api.relationsai.com/v1}"

agents=$(curl -sS --fail-with-body "$BASE/agents?limit=100" \
  -H "Authorization: Bearer $RELATIONSAI_API_KEY") || { echo "$agents" >&2; exit 1; }

jq -r '.data[] | "\(.id)  \(.name)  status=\(.status) published=\(.published) sample=\(.sample)"' <<<"$agents"
