BBramaDocs
Browse documentation

Brama CLI command reference

brama test

Run one test inference through the named agent’s subscription credential, not the deployment’s direct provider capability: a canonical route, or best, the selector the gateway walks for that agent, so what the gateway would answer the agent can be read without a listener.

Invocation

brama test (-m <ROUTE>|--model <ROUTE>) --agent-id <ID> [--json] --allow-provider-cost
InputRequired/defaultMeaning
-m, --model <ROUTE>requiredCanonical route to test, or best: the ranked walk over the shared subscription pool the HTTP edge runs for model: "best", with no preferred route. There is no built-in route; without it the command exits 2.
--agent-id <ID>requiredAgent whose provider credential is used. There is no built-in agent; without it the command exits 2.
--allow-provider-costrequiredAcknowledge the billable provider request. Without it the command exits 2 before any request.
--jsonoptional; offPrint the answer as one JSON document instead of key: value lines.

Output and state

Success prints model, response, input_tokens, output_tokens and latency_ms as key: value lines, or as one JSON document with --json, then exits 0. A token count the provider did not state is null, never zero, and no cost is printed: a subscription call states no price. It performs one billable request and may update normal subscription usage state; it does not print credentials.

Refusals

error: refusing billable inference without explicit --allow-provider-cost

That refusal is a usage error and exits 2 before a request. A dispatch refusal prints Error [<code>, attempts <n>]: <dispatch reason> and exits 1, where <code> is the stable client code the HTTP edge would answer with (errors) and <n> the provider attempts the walk made; with --json the same refusal is first printed to standard output as one document with model, code, attempts and error. For example: Error [credential_unauthorized, attempts 0]: no active 'openai' credential for agent, or, for best over a pool the ledger refuses entirely, Error [subscription_reauthorization_required, attempts 0]: no working subscription model for signed agent; every subscription is refused by the ledger before any is read: ….

Back to the complete CLI command tree.