Skip to content

agentsctl request and record commands

These commands call an instance’s API, read its database, and send or read files the way a person or a machine does. Every command here takes the flags that every agentsctl command takes, listed on agentsctl instance commands.

Calls the API as a person, the machine or a webhook, and keeps the answer. The method is GET, POST, PUT, PATCH, DELETE or HEAD, and the path starts with /v1/, or is /.

Flag What it does
--as <value> The caller. One of person (the default), machine or webhook.
--login <value> Which person. One of ada (the default), ben, or a login.
--door <value> The port to call, people or machines.
--body <value> A JSON body.
--accept <value> The Accept header, such as the connector gateway’s application/json, text/event-stream.
--expect <value> The status it must answer. The default is any 2xx.
--expect-text <value> Text the answer must hold.
--expect-no-text <value> Text the answer must not hold.

Reads the record with one read-only query. The placeholders {team}, {owner}, {teammate} and {machine} name the instance’s rows.

Flag What it does
--expect-rows <value> How many rows there must be.
--expect <value> A column=value that every row must have. Repeatable.
--wait <value> Seconds to keep reading until the expectations hold.
--value Print the one value alone, for use in another command.

Applies this checkout’s pending migrations to a copy of a database in a postgres:17 container of its own, and prints each migration applied and each table’s row count before and after, or the migration Postgres refused with its SQLSTATE and the objects it named. With no --dump it copies the instance’s test database. It exits 1 on a refusal, 2 on a usage error and 3 when Docker’s disk has too little room.

Flag What it does
--dump <value> A file pg_dump --format=custom made. It reads no env file.
--migrations <value> A folder of migrations in place of server/migrations.

Lists the ship wakes of the instance’s team, oldest first. Each row has the pull request’s number, the first 7 characters of the head, the stage, the kind, the status, the outcome, the age in minutes, whether a person was told, and a reason. The reason is - unless the push failed. Then it names the rule that stopped the push, as in stopped by the secret rule, or says the push failed. It never prints the findings, a file’s path or the push’s error.

Flag What it does
--pull <value> Only the wakes of the pull request with this number.

Sends a repo file as the body of POST <path>, the way the app uploads one or an agent shares one.

Flag What it does
--as <value> The caller. One of person (the default) or machine.
--login <value> Which person. One of ada (the default), ben, or a login.
--door <value> The port to call, people or machines.
--expect <value> The status it must answer. The default is any 2xx.
--expect-text <value> Text the answer must hold.
--expect-header <value> A header the answer must have, as name=value with the name in lowercase. Repeatable.
--same-as <value> A file in the repo whose bytes the answer must equal.
--file <value> The file to send, in the repo.
--name <value> The name to send it under. The default is the file name.
--type <value> Its content type. The default is application/octet-stream.

Sends GET to the path, and checks the status, the headers and the bytes that come back.

Flag What it does
--as <value> The caller. One of person (the default) or machine.
--login <value> Which person. One of ada (the default), ben, or a login.
--door <value> The port to call, people or machines.
--expect <value> The status it must answer. The default is any 2xx.
--expect-text <value> Text the answer must hold.
--expect-header <value> A header the answer must have, as name=value with the name in lowercase. Repeatable.
--same-as <value> A file in the repo whose bytes the answer must equal.

Reads a live shape as a person’s page does, to the end of what Electric has, and checks its rows and columns.

Fields are name, kind, seat_cap, columns. The output shows name, kind, seat_cap, columns unless --fields names others.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.
--where <value> Keep only rows with column=value. Repeatable.
--lacks <value> No row may have this column. Repeatable.
--expect-rows <value> How many rows must be left.
--expect <value> A column=value that the first row left must have. Repeatable.
--param <value> An argument the shape takes, as name=value, such as project=<id> for project_artifacts. Repeatable.
--fields <value> The fields to show, comma separated.

Reads a file on the instance’s machine, waiting for it to appear.

Flag What it does
--expect-text <value> Text the file must hold.
--missing Wait for the file to be absent instead.
--timeout <value> Seconds to wait. The default is 15.

Lists the team’s turns that are not over, oldest first, with each one’s agent, who asked for it, its status and why it waits, with the reset time for one held at the plan’s usage limit. The turns are under data in JSON output.

Flag What it does
--agent <value> Only this agent’s turns, by name.

Secrets, voice, calls, history, notices, usage and races

Section titled “Secrets, voice, calls, history, notices, usage and races”

Gives the machine a secret’s value, where a person keeps it.

Flag What it does
--value <value> The value, which no log or output repeats.

Takes a secret’s value off the machine.

Opens voice chat to a conversation as a page of the app does, sends what --send names, and checks what the API says back.

Flag What it does
--login <value> Which person. One of ada (the default), ben, or a login.
--origin <value> The page’s origin. The default is the people port on 127.0.0.1.
--wait <value> Seconds to listen after the last send. The default is 5.
--send <value> What to send, in order. end, stop, text:<raw text>, or audio:<WAV file in the repo>, which goes as 100 ms frames. Repeatable.
--expect-message <value> A message the API must send, as type or type=text, where text is what the message holds, such as error=There was no audio. Repeatable.
--expect-close <value> The code the API must close the socket with.
--expect-refused <value> The status the API must refuse the upgrade with.

voice measure <conversation id> <WAV file in the repo>

Section titled “voice measure <conversation id> <WAV file in the repo>”

Asks a voice chat the WAV’s question many times on one socket, as a microphone would say it, and prints p50 and p90 in milliseconds for each leg: the end sent to the words heard, the words heard to the post stored, the post stored to the agent’s first sentence in the record, that sentence to the first audio frame, and the end sent to the first audio frame. The legs that start or end in the record are read on the database’s clock, so a gap between it and this machine’s clock cancels out. It writes every try and the summary as JSON in the evidence folder, and fails when an answer did not arrive.

Flag What it does
--tries <value> How many answers to time. The default is 50.
--warm <value> How many answers to take first and not time, so the agent’s session has taken a turn. The default is 1.
--reply-wait <value> Seconds each answer may take to end. The default is 120.
--login <value> Which person. One of ada (the default), ben, or a login.
--origin <value> The page’s origin. The people port on 127.0.0.1 by default.

Gives one of the team’s agents a voice through POST /v1/agents/<id>, as its panel’s Voice does: Talia, Maisie, Elara, Alicia, Warren, Darian, Eldrin or Baxter, or default for Talia. The instance’s stand-in speech service writes each sentence it speaks, with the ElevenLabs id of its voice, to speech-spoken.txt in the machine’s home.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.

Starts a call in a chat, or is handed the one going on there, through POST /v1/conversations/<id>/calls.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.

Joins a call through POST /v1/calls/<id>/join, and says the LiveKit address, the person’s identity and their stretch in the call, which call leave takes. The token is in the evidence file, scrubbed.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.

Joins a call as two people at once, each with a token of their own and a LiveKit client, which sends a tone. It counts the audio frames each hears from the other, then both leave.

Flag What it does
--as <value> The first person. One of ada (the default), ben, or a login.
--with <value> The second person, as --as names one.
--listen <value> Seconds to listen. The default is 5.
--expect-heard Fails unless each heard the other.

Joins a call as a person, waits until the call worker hears their microphone and has measured the room on it, says one sentence into it, and listens. It says how many captions of the person’s words the call worker sent them, and fails unless their last held the whole sentence. It says which agents in the call spoke aloud after the sentence, with how many loud audio frames each sent and how soon the first came after the sentence ended. The sentence is one the instance’s speech stand-in hears by the tone under it, the list TONE_SENTENCES in test/fake-speech.ts: “fixer, what is the plan for today?” names fixer, “What should we ship first?” asks the room, and “Hold on, let me stop you there and ask something else.” takes the floor from an agent it is said over.

With --over, the person says a second sentence as soon as an agent starts to speak after the first, talking over it, and the command says how many milliseconds after they started each agent’s voice made its last sound, for a voice that has been silent for a second since.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.
--line <value> The sentence.
--over <value> A second sentence, said over the first agent to speak after the first.
--listen <value> Seconds to listen after each sentence. The default is 20.
--expect-voice <value> Fails unless this agent spoke aloud.
--expect-silent Fails if any agent spoke aloud.
--expect-stopped <value> With --over, fails unless this agent was the one talked over and its voice stopped within 3.5 seconds of the person starting.

Reads a call’s transcript through GET /v1/calls/<id>/transcript: each line said in it, a person’s whole turn or an agent’s reply, with its speaker and when the chat stored it.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.
--expect-line <value> Fails unless a line says exactly this.

Leaves the call through POST /v1/calls/<id>/leave, which ends it when no one else is in it.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.
--member <value> The stretch call join answered with.

Ends the call for everyone through POST /v1/calls/<id>/end, which only its starter or a team admin may do.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.

Lists the calls in the chats the person may post in, newest first, through GET /v1/calls.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.
--conversation <value> One chat’s calls.
--live Only the calls going on now.

Opens the person’s DM with an agent from several requests at the same moment. It checks that every request answers 200 with the same conversation.

Flag What it does
--as <value> Which person. One of ada (the default), ben, or a login.
--times <value> How many requests at once, 2 to 20. The default is 2.
--text <value> Words each request posts as the person’s first message, none.

Starts a chat in one request, as the New chat page does. One agent alone is the person’s DM with it, and anything else is a room named for its members.

Flag What it does
--with <value> Who is in it: an agent’s name, a person such as ben, or a login. A name that is both an agent and a person is refused. Repeatable.
--text <value> The person’s first message. A chat needs one.
--as <value> Which person. One of ada (the default), ben, or a login.

Moves a chat inside its group in Chats through its row’s menu, loads the page afresh and reads the group back. That browser session keeps the order, so browser reset forgets it. It reads the rows on screen, so it suits a group short enough to show whole. It fails for a chat that is not in --group, and with --to auto while the chat’s menu still offers Sort by recent activity for the group after the reload. Also takes --engine and --width, described on agentsctl browser and desktop commands.

Flag What it does
--group <value> The group the chat is in, such as DMs.
--to <value> top, end, or auto, which puts the group back in the order of last activity.

Answers no to each open ask for one tool, as a person, and keeps going until a read-only query finds a row. It suits a real Claude session that may ask to run a command a step never told it to, any number of times. It fails when the query finds no row within --wait seconds, and says how many asks it denied. {team}, {owner}, {teammate} and {machine} in the query name the instance’s rows, as in db.

Flag What it does
--tool <value> The tool whose asks are denied, such as Bash.
--until <value> The query that ends the command once it returns a row.
--wait <value> Seconds to keep going before the command fails.
--as <value> Which person answers. One of ada (the default), ben, or a login.

Saves the History a person may see as a JSONL file, as the export download does.

Flag What it does
--since <value> The last n days, such as 7d. The default is everything.
--from <value> The first day, YYYY-MM-DD.
--to <value> The last day, YYYY-MM-DD.
--agent <value> Only that agent’s sessions, by name, and the runs it worked in.
--out <value> Where to save the file, under .scratch. The default is the evidence folder.
--expect-sessions <value> Fail unless the file holds this many sessions.
--expect-runs <value> Fail unless the file holds this many runs.
--as <value> Which person. One of ada (the default), ben, or a login.

Reads a plain summary as a person, through GET /v1/history/summary, and prints it in the words an agent’s read_summary answers. Give one of --session, --agent or --day.

Flag What it does
--session <value> One session, by id.
--agent <value> An agent’s name, for its latest 30 sessions of the last 24 hours.
--day <value> A UTC day, YYYY-MM-DD, for its latest 30 sessions.
--expect-text <value> Fail unless the words hold this text.
--as <value> Which person. One of ada (the default), ben, or a login.

Reads a person’s notice settings through GET /v1/me/notices, after changing them through PUT when --kinds or --phone is given, and says the kinds, whether the phone gets notices and the link it subscribes to.

Flag What it does
--kinds <value> The kinds to get, comma separated, from approval, answer, stopped, finished and stuck, or none.
--phone <value> on or off.
--as <value> Which person. One of ada (the default), ben, or a login.

Sends a person’s phone a test notice through POST /v1/me/notices/test. The instance’s stand-in ntfy writes it to phone-notices.txt in the machine’s home, which machine read shows.

Flag What it does
--agent <value> One of the person’s agents, by name, to send what its notice says. Needs --kind.
--kind <value> With --agent, the kind of notice.
--as <value> Which person. One of ada (the default), ben, or a login.

Reads what agents cost between two UTC days as a person, through GET /v1/usage, and prints it in the words an agent’s usage_summary answers. The report is under data in JSON output. The route checks the days and answers 400 in words.

Flag What it does
--by <value> agent, person, day, source or model.
--from <value> The first UTC day, YYYY-MM-DD.
--to <value> The last UTC day, YYYY-MM-DD. A range holds at most 366 days.
--expect-text <value> Fail unless the words hold this text.
--as <value> Which person. One of ada (the default), ben, or a login.