Skip to main content

praesia request

Prints the sign-in link of an agent and its expiry on standard error, then exits.
Until you approve the agent, the same command gives the link again, and only the newest link counts. It takes no limit, currency or merchant: those come from the mandate.

praesia call

Runs one tool. On standard output, it prints the tool’s text, a blank line, then the structured result as one line of JSON. It exits 1 when the result carries an error flag. Otherwise it exits 0, even for a payment whose outcome isn’t known yet.
  • A tool that takes only agent takes no --arguments.
  • The object leaves out agent, or gives the same profile name as --profile.
  • The command refuses an object with a repeated key.
  • With -, use a quoted heredoc. Put the object on one line, and use a new closing word each time.
The result holds the sentences of its text in sentences, its first member, word for word. A JSON line after the sentences stays out of sentences. A read whose text is only JSON, such as get_mandate, has no sentences.
Two tools have no command. enroll is replaced by praesia request, and list_agents by praesia profiles.

praesia profiles

Prints one line for each profile that holds a badge. It takes no option.
With no such profile, it prints No agent on this machine holds a badge. If a profile can’t be read, it prints one line on standard error that names praesia doctor, and exits 1.

praesia doctor

Checks the profile of an agent. It prints a line that starts with Doctor passed or Doctor failed, which gives the reason. A profile that can’t start prints its refusal instead.

praesia operations

Lists the idempotency key and the state of each payment whose outcome isn’t known yet. It names get_status with that key as the next call.
A listed payment hasn’t failed, so don’t send it with a new idempotency_key.

praesia serve

Starts the one server of the machine for the harness. It takes no --profile.

praesia server-command

Prints the absolute command that starts the server. The output is one line of JSON with command and args. It takes no option.

Profiles

Each agent has its own profile in the Praesia home. Every agent on the machine uses the same server entry. A profile name has at most 64 characters. It starts with a letter or a digit, then uses letters, digits, dots, underscores and hyphens. For example: office-supplies. request, call, doctor and operations take the profile from --profile, then PRAESIA_PROFILE, then default. serve, server-command and profiles take no profile.

Environment variables

An empty value counts as unset.