Agent Recipes
These workflows are designed for coding agents and shell automation. Every example is safe to convert into CI jobs, local scripts, or ad hoc operational tooling.
Work a Ticket Queue
List active tickets with only the fields you need:
zeyos list tickets \
--fields ID,ticketnum,name,status,priority,assigneduser,lastmodified \
--filter '{"visibility":0,"status":4}' \
--sort -lastmodified \
--limit 50 \
--json
Count the backlog before acting:
zeyos count tickets --filter '{"visibility":0,"status":0}' --json
Move a ticket to a new status:
zeyos update ticket 42 --data '{"status":7}' --json
Create a Follow-up Ticket
zeyos create ticket \
--data '{"name":"Escalate billing issue","status":0,"priority":3,"account":15,"visibility":0}' \
--json
Use zeyos get ticket <id> --json immediately after creation if the workflow needs server-confirmed fields or related data.
Query Accounts for an Agent-Facing CRM View
Use field aliases and joins when you need a compact response:
zeyos list accounts \
--fields '{"Id":"ID","Name":"lastname","City":"contact.city","Agent":"assigneduser.name"}' \
--filter '{"visibility":0}' \
--sort +lastname \
--limit 25 \
--json
Pull Tasks for a Project or Ticket
zeyos list tasks \
--fields ID,tasknum,name,status,priority,duedate \
--filter '{"visibility":0,"project":123}' \
--sort +duedate \
--json
zeyos list tasks \
--fields ID,tasknum,name,status,priority,duedate \
--filter '{"visibility":0,"ticket":42}' \
--json
Paginate Deterministically
zeyos list tickets \
--filter '{"visibility":0}' \
--sort -lastmodified \
--limit 100 \
--offset 0 \
--json
Advance by incrementing --offset yourself. For long-running jobs, always keep the sort explicit so the ordering stays stable.
Pipe to jq
Extract IDs:
zeyos list tickets --fields ID,name --filter '{"visibility":0}' --json | jq '.[].ID'
Extract the current access token for another tool:
zeyos whoami --show-token --json | jq -r '.accessToken'
Treat printed access tokens as secrets. Avoid writing them to logs, shared shell history, or agent transcripts.
Destructive Guardrails
zeyos deleteprompts by default. Keep that behavior in human-in-the-loop sessions.- Use
--forceonly in automation that already has a clear selection rule. - Prefer
countor a dry-runlistbefore a bulk action. - If a workflow needs unsupported resources, raw request control, or custom retry logic, move it to
@zeyos/client.