Skip to content

CLI reference

briar agent

Run an autonomous LLM tool-use loop against a target. Two operations ship: implement (the engineer archetype — pick a ticket, write the code, open a PR) and prfix (the pr-fixer archetype — read PR review comments, push fixes, reply).

Flags common to both subcommands

Both implement and prfix share a large set of flags. Documented once here, elided from each subcommand below.

--company COMPANY
Company key. Required, but it can come from BRIAR_COMPANY or company = in .briar.toml. Must match a runbook YAML if you pass --runbook.
--owner OWNER
Repository owner (GitHub) or workspace (Bitbucket). Inferred from the git origin remote if omitted.
--repo REPO
Repository as owner/repo, or a bare name with --owner. Inferred from git if omitted.
--provider {bitbucket,github}default: github
bitbucketgithub
Repository provider.
--store {file,postgres}default: postgres if BRIAR_DATABASE_URL is set, else file
filepostgres
Knowledge-store backend used to read the company knowledge blob.
--root ROOTdefault: ./knowledge
File-store root (ignored for postgres). The old spelling --knowledge still works as a hidden alias.
--model MODELdefault: claude-sonnet-4-5
Override the Anthropic model. The agent loop always runs on Anthropic.
--max-iter N
Iteration ceiling. Defaults to AgentRunner.DEFAULT_MAX_ITERATIONS (30).
--git-user-name NAME
git config user.name on the worktree. Falls back to the runbook's git_identity.name, then your local git config (outside CI).
--git-user-email EMAIL
git config user.email. Same fallback rule.
--keep-worktree
Leave the temp worktree in /tmp after the run for inspection.
--no-default-mcp
Skip briar's built-in default MCP servers (think, which needs npx, and time, which needs uvx). Also turned off by BRIAR_NO_DEFAULT_MCP. Use on hosts without npx/uvx.
--dry-run
Build + print the system prompt, user message, and tool list. Skip the LLM call. Validates the JIT context wiring without spending tokens.
--runbook YAML
Runbook YAML to read this company's messages: block from. When set, the agent gets a send_message tool bound to the configured channels instead of having to shell out via gh / curl.
--meeting PROVIDERdefault: fireflies
fireflies
Meeting provider for transcript fetch. Hidden from -h, like the two sizing knobs below.
--meeting-key ID
Specific meeting ID to splice into the agent prompt.
--meeting-query STRING
Keyword search across recent meetings. When omitted, defaults to the ticket key (for implement) or owner/repo#pr (for prfix).
--meeting-top-k Ndefault: 3
Max meetings to fetch in search mode.
--meeting-max-bytes Ndefault: 50000
Per-meeting transcript byte cap.
--slack-query STRING
Keyword search across Slack (read-only, browser web-session creds SLACK_<COMPANY>_TOKEN + SLACK_<COMPANY>_COOKIE_D). Same default as --meeting-query. Hidden sizing knobs: --slack-top-k (3), --slack-max-bytes (30000).

$ briar agent implement

briar agent implement --ticket-key K [--company C] [--owner O] [--repo R] [--ticket-project P] [--tracker {...}] [common flags]

Pick a tracker ticket, clone the repo into a temp worktree, run the engineer archetype until it opens a PR. Reads the company knowledge blob + a JIT ticket-context extractor for live ticket detail.

--ticket-project KEY
Tracker project key. Jira: PROJ; Linear team: ENG; GH / BB Issues: owner/repo. When omitted, it is taken from the ticket key (Jira / Linear) or from owner/repo (GH / BB).
--ticket-key KEYrequired
Ticket identifier. Jira: PROJ-123; GH / BB: #42; Linear: ENG-7.
--tracker {bitbucket-issues,github-issues,jira,linear}default: jira
bitbucket-issuesgithub-issuesjiralinear
Tracker provider for the ticket.
$ briar agent implement \
--company acme --owner acme --repo widgets \
--tracker jira --ticket-project KAN --ticket-key KAN-42 \
--runbook runbooks/acme.yaml

$ briar agent prfix

briar agent prfix --pr N --branch BRANCH [--company C] [--owner O] [--repo R] [common flags]

Read open review comments on a PR, apply fixes, push the branch, and reply inline. Reads the company knowledge blob + a JIT pr-review-context extractor for the full review thread state.

--pr NUMBERrequired
PR number to address.
--branch BRANCHrequired
PR head branch name. Required because some providers don't expose it cheaply.
$ briar agent prfix \
--company acme --owner acme --repo widgets \
--pr 482 --branch briar/kan-42 \
--runbook runbooks/acme.yaml

Run prfix from cron

There is no code-level skip for comments prfix already answered: the JIT pr-review-context gives the agent every thread, including its own earlier replies, and the agent decides what is left. Wire it to a schedule_cron trigger or a webhook after checking a run with --dry-run.

See also

  • briar plan run — wraps agent implement in the selector → implement → writeback loop.
  • briar scaffold — emit a JSON config bundle wiring implement / prfix to a downstream orchestrator.
  • Core concepts: Agents — what archetypes, shapes, and JIT extractors are.