BBramaDocs
Browse documentation

Brama CLI command reference

brama tasks

A named task is what a caller selects as model="task:<KEY>": Brama serves it from the active route with the best recorded checks. measure sends one deterministic check to each selected route and, with --persist, records what each answered; show and list read back those records from the same journal selection reads.

brama tasks measure

brama tasks measure <KEY> --agent-id <ID> --prompt <TEXT> --max-models <N> [--expected-exact <TEXT>] [--expected-contains <TEXT>] [--persist] [--json] --allow-provider-cost
InputRequired/defaultMeaning
<KEY>required, nonemptyKey later selected as task:<KEY>.
--agent-id <ID>requiredAgent whose subscription routes are checked.
--prompt <TEXT>required, nonemptyPrompt sent to every selected route.
--expected-exact <TEXT>one expectation requiredFull score only for an exact response.
--expected-contains <TEXT>one expectation requiredFull score when the response contains the text.
--persistoptional; offRecord each check, so task:<KEY> selection reads it.
--max-models <N>requiredHow many active models to check; each is one billable request. No count is assumed.
--allow-provider-costrequired by runtime; offAcknowledge all billable requests.
--jsonoptional; offPrint the report as one JSON document instead of key: value lines.

The report holds agentId, task, persistence flag, bounds, per-model checks and the best model. Without --persist nothing is recorded.

brama tasks show

brama tasks show <KEY> --agent-id <ID> [--json]

Prints agent_id, task and checks: every check recorded for that task, as the journal holds it. Reads only; sends nothing to a provider.

brama tasks list

brama tasks list --agent-id <ID> [--json]

Prints agent_id and tasks: each task the agent has recorded checks for, with checks (how many) and newest (when the latest was taken). Reads only.

Exact refusals

  • refusing billable task-quality collection without explicit --allow-provider-cost — measure without the acknowledgement; exits 2 before any provider request.
  • max_models must be at least one, task is required, prompt is required, expected_exact or expected_contains is required — measure input refusals.
  • no checks are recorded for task <KEY> of agent <ID>; `brama tasks measure <KEY> --agent-id <ID> --persist …` records them — show of a task nobody measured; selection refuses that task too.
  • the journal holds a check without its task or time: <record> — list met a malformed journal record; the record is printed whole.
  • cannot read the journal <path>: <cause> — the journal exists but cannot be read as a file; show and list refuse instead of reading it as empty. Only a journal that does not exist yet is empty.
  • the journal <path> holds a line that is not JSON (<line>): <cause> — a record the reader cannot decode; the line is printed whole and nothing after it is guessed.

Except where stated, each refusal prints to stderr and exits 1; Clap separately refuses omitted required flags before the handler runs.

See task selectors or the CLI tree.