Storage & privacy
Everything Briglia knows lives in three folders in your home directory. Nothing is sent anywhere except to the providers you configured, and one command removes it all.
Where things live
| Path | Contents |
|---|---|
~/.config/briglia/ | user-editable configuration: secrets.json (mode 0600, multi-process safe), mcp.json, mcp-routing.json, agents/ (your subagent definitions), skills/<name>/SKILL.md (hot-reloaded skills) |
~/.local/share/briglia/ | state: conversation, long-term archive, conversation snapshots (prune-archives/), logs, images and documents received, projects, reminders and watcher scripts, trigger events, subagent sessions, Web research reports (research/), the release trust floor, the app-chat socket, the userdata toolchain |
~/Documents/Briglia/ | landing zone: files Briglia receives, downloads or generates for you |
Paths follow the XDG convention (honouring XDG_CONFIG_HOME / XDG_DATA_HOME) and are distinct from the macOS Ada.app's, so both can coexist on one Mac.
Since CLI 0.2.42, logs/stage-markers.log records each internal step of every tool call (Git checkpoint, file write, tracking, diagnostics, MCP start-up) as it starts and finishes, so a tool call that stops making progress shows which step is still open: briglia __stage-markers --unclosed lists them, and a step open for more than 120 seconds writes one "stall suspected" report to the log and to stderr (it only reports; nothing is cancelled). No file contents, command text or secrets are recorded; the file is owner-only, rotated at 8 MB and removed by /deleteuserdata. BRIGLIA_STAGE_MARKERS_PATH moves it (useful in Docker when the data folder is a mounted host volume) and BRIGLIA_STAGE_MARKERS=0 turns it off.
Since CLI 0.2.46, a near-total rewrite of a large file no longer leaves write_file, edit_file or apply_patch stuck on an open fs.diff step: Briglia reads the diff while it is produced instead of after, with a 10-second backstop that returns "no diff". The same fix covers unpacking zip archives with thousands of files in the projects/ folder (30-minute limit per unzip run), large gws/brew/pip output (no more false "timed out") and macOS Shortcuts, whose output is either returned in full or reported as output_incomplete, never silently cut.
Since CLI 0.2.51, a background command that prints a huge amount of output — for example millions of characters without a single line break — no longer freezes Briglia: asking for its output with bash_manage answers right away instead of waiting behind a backlog. Every byte still goes to the job's output file. Three things behave slightly differently: a background job that floods output is slowed down to the speed Briglia can process it instead of running ahead; for regex watches a single line longer than 64 KiB is cut (after secrets are redacted) and ends with …[line truncated for watch matching], while the full line stays in the output file; and lines ending in Windows-style CR-LF now reach watches like ordinary lines (before, they were never matched).
What leaves your machine
- Your messages, attachments and the results of Briglia's tool calls go to the model provider you chose (OpenCode, OpenRouter, your endpoint, or nowhere if it is a local server), plus OpenAI for voice/OCR/images if configured, Serper and Jina for web research, and your email provider if enabled.
- Briglia has no telemetry, no analytics, no accounts. Updates are fetched from GitHub Releases.
- Secrets are injected into commands only when a tool needs them, and the Telegram bot token and any labelled service keys are redacted from command output before the model sees it.
- Both folders are owner-only (directories 0700, files 0600 —
projects/andtoolchain/excepted): other accounts on the machine cannot read your history, attachments or configuration. Anything running as you still can.
Conversation snapshots
Briglia's working memory has a budget. When it is reached, older tool calls and results, reasoning and media are pruned from the live context and replaced by a short summary; independently, once enough text has accumulated, older messages are archived into summarised chunks that keep only the visible messages (the long-term memory itself is explained in How Briglia remembers). Since CLI 0.2.13 nothing is discarded blind: before either step drops details, Briglia writes a plain-text snapshot of the whole conversation as it stood — every message, tool call and result, readable reasoning, file names and the descriptions it generated for them — to ~/.local/share/briglia/prune-archives/. No image or audio bytes and no encrypted reasoning go in; links to attachments do not keep those files alive. The pruning summary and the archived-history table point to the files, so the agent can search or read them when you ask about something it no longer holds in context.
The newest 300 snapshots are kept (typically up to about 1 MB each). /status and briglia doctor show their count and size; /deleteuserdata removes them; Mind backups, full and lite, carry them. If a snapshot cannot be written — typically a full disk — Briglia refuses to prune and tells you; free space and retry, or send /prune nosnapshot to discard details for that one prune only. Pruning-summary text never enters the archived chunks; chunks stay messages plus a one-line reference. Since CLI 0.2.15, a chunk recovery record left behind by a failed write is settled on the next attempt or at startup once its content is known to be archived, and a record whose raw file cannot be read keeps its warning without blocking the recovery of the records behind it. Since CLI 0.2.17, a raw archive file that a crashed index write left referenced by neither index is removed at startup together with its sidecar, only once both indexes are present and decode, only when the file is older than an hour, and never as a consequence of a failed save; a missing or dangling index counts as missing metadata, not as an empty index, so recoverable history stays on disk.
Long turns
A single turn can run for hours. Since CLI 0.2.14, when the current turn's own tool calls fill the working-memory budget and older history has nothing left to prune, Briglia no longer cuts the turn short: it summarises the oldest completed tool rounds of the running turn, keeps the newest ones intact, and continues, as many times as needed. Each compaction writes a snapshot to prune-archives/ first and commits a checkpoint, so a crash, /stop or an error mid-compaction leaves a consistent turn backed by the snapshot; tools are never restarted on their own. Messages you send while the agent is working are carried across a compaction verbatim. A finished turn that alone exceeds the budget no longer blocks the next one. The main agent's tool-round backstop is 5,000 rounds per turn (a runaway stop, not a budget; reaching it ends the turn gracefully and continue resumes it); ~/.config/briglia/agent-turns.json can override it. Since CLI 0.2.15, when the backstop or a per-turn spend cap stops a turn that has already been compacted, the wrap-up request carries the same history the tool loop saw: the compaction summary and your mid-turn messages, verbatim. Since CLI 0.2.19, history is pruned oldest first including the previous turn: a large previous turn is summarised into the usual prune note and snapshot before the running turn's own rounds are compacted (a small one is untouched, as before), and a compaction that shrinks the context is judged against the full working-memory budget rather than a stricter estimate, so a turn no longer stops with “Compacted context still exceeds configured input budget” after a compaction that helped. Since CLI 0.2.40, a compaction summary may be up to 65,536 bytes (was 36,000, which rejected summaries that followed the length the model is asked for, especially in Italian or code), and the room reserved for it grows to match. A reply the provider cut off is never accepted as a summary. An empty, cut-off or too-long summary gets one plain retry; if that also fails, the turn stops as before, and the error names the reason (for example “Compaction summary rejected after 2 attempts: the reply was cut off by the provider”) instead of “missing or larger than the bounded output policy”. When an earlier turn is pruned, an empty or cut-off summary also gets one retry before Briglia falls back to the plain list of the tools that ran, and those summary requests now count towards your spend and limits.
Subagents
A subagent has its own working memory (250k tokens per run and 200 tool rounds per run; a run that hits a limit wraps up gracefully and can be resumed by session id with fresh limits). Since CLI 0.2.22 its compaction protects the dialogue with the main agent: the most recent 30k tokens of task prompts and replies are kept verbatim, the rest of the retained tail goes to the newest tool work (never fewer than the newest three rounds), and everything older is summarised into one summary that carries a dedicated section for the instructions, corrections, commitments and open questions exchanged so far. Evicted material reaches the summariser in its original order, and the summary is replaced, never stacked, on each compaction. Watcher triage sessions use the same code path. Since CLI 0.2.23 the retained tail is bounded by tokens, not only by count: the newest round is always kept, the two before it only while they fit the work allowance, so three large results can no longer hold the context above the target. A compaction that would only rewrite the existing summary, or that would not shrink the context by at least one percent, is skipped without a summariser call and without using a compaction allowance, and the same context is not compacted twice in a row. When a single result really must be dropped to finish, the subagent is told which tools ran and that the result was cut for context, not that it hit a round limit. Since CLI 0.2.24 a newest batch that is too large to keep on its own (for example several large limited reads in one round) is summarised in bounded slices rather than dropped, as long as a compaction allowance remains and the results carry no images or typed attachments; the batch is replaced only when every slice succeeds. Stopping a subagent while a summary is being produced keeps the executed batch: the run ends as cancelled with its results persisted, and a resume replays them in full. Since CLI 0.2.25 there is no fixed ceiling of three compactions per run: each executed tool batch permits one ordinary and one emergency compaction, a summary never renews that allowance, and only new work does, so a productive run can compact as often as it needs while a run without new work cannot loop; the round limit still bounds the run. After an emergency summary the summariser records cumulative progress (for file reads, the exact ranges covered) and the next unfinished step, and the following request tells the subagent to resume there rather than repeat the task's opening steps. Since CLI 0.2.26 every subagent, on both the Chat Completions and Responses transports, sees the same chronology as the main agent: the day header at the start and on each day change, the time on task messages, the time each round of tool calls was issued and each result delivered, and its own reply times; a resumed session keeps the original time of its last reply, each request of a run carries the run's start time so replayed notes are never mistaken for now, and compaction summaries record when they were written and the period they cover with the UTC offset on each endpoint. The main agent gains a reply-time line after its past replies, the date on a tool batch that crosses midnight, a clock-offset line at a daylight-saving change, and on the Responses transport the date headers and time prefixes it lacked. Since CLI 0.2.27 an optional Web researcher subagent is available behind /websubagent on (default off; requires subagents on and web search configured). It has three tools, web_query, web_extract and web_fetch, its own research prompt, and runs on the /websearch backend rather than the main model. Every result it hands back to the main agent is labelled with what was actually retrieved in that run (retrieved_this_run, attempted_no_results, prior_sources_only with how many earlier extracts are still in context, or no_evidence), with the queries used and the pages read, so an answer built from retained history is never presented as freshly verified. Web sessions live in their own pool (40 sessions, 14 days, listed separately by subagent_manage) and can be resumed for follow-up questions in the foreground or in the background; a report deliverable is written in full to ~/.local/share/briglia/research/ and the file path handed back. While the switch is on, the Agent tool tells the main agent to use Web for any lookup, fact check or reading of public pages and Browse only to operate a browser; with the switch off nothing changes, down to the request bytes. Since CLI 0.2.28, while the switch is on, ordinary subagents (general-purpose, Browse and custom agents that had web_search or web_research_sweep) hand their web research to a Web subagent instead of running the legacy tools: one level only, in the foreground, inside the parent's tool batch (cancelling the parent cancels it; its progress keeps the parent's staleness clock alive, with a 60-minute ceiling per batch); its session lands in the Web pool as via <parent session> and can be resumed later, and a stored session can only be resumed by a compatible agent (Web sessions by the researcher, ordinary sessions by ordinary agents). The research prompt carries only the assistant's name — no user name, no profile and no status of other running work — on every request of a run including compaction summaries; the researcher runs at high reasoning effort while page extraction stays at medium; and the result packet lists the pages actually read with their retrieval times while the search results merely seen are reported as a count, which roughly halves what reaches the caller without dropping any page the researcher relied on. Since CLI 0.2.29 the switch is on by default; the legacy implementation is kept, so /websubagent off still restores the previous tools and prompts byte for byte. The same release adds a reply policy for requests that ask to find something (a product, a place, a service, a document, an offer): the answer carries each item's link or location next to its name when it is available — the one bare URL or address that lets you act on it, not a list of sources — says when it could not be established, never guesses one, and adds no unnecessary links; the researcher is asked for the direct page (never a search page) and, for places, the street address or coordinates when the page gives them. /status now names the subagent by role — Agent (Web research): …, Agent (Browser use): …, Agent (general-purpose): … — derived from the built-in identity, so a custom agent named Web is shown as Agent (Web); a resumed session shows its id's short form.
Skills, agents and MCP
Extend Briglia without touching code: drop a SKILL.md package in ~/.config/briglia/skills/<name>/ (agentskills.io format; user skills override bundled ones of the same name), define subagents as Markdown in ~/.config/briglia/agents/, and register MCP servers in mcp.json (/restart reloads it). The bundled playwright server is managed for you: Briglia installs its pinned version under ~/.local/share/briglia/mcp/playwright-<hash>/ and points the entry at it; edit the entry by hand and Briglia leaves it alone, delete it and it is not re-added.
Since CLI 0.2.55 the first browser action starts at once (it used to wait about 60 seconds): Briglia answers every request an MCP server sends instead of ignoring it, and no longer advertises features it does not implement. Messages to each server go through their own queue, so a server that stops reading can never freeze timeouts or shutdown — after 15 seconds without reading, or 16 MB unsent, Briglia shuts that server down and the waiting calls fail with a clear error.
Delete everything
/deleteuserdataAsks for confirmation, then: stops all running work (Bash jobs, subagents, watchers), revokes and removes connected email credentials (AgentMail key, gws OAuth tokens) and cached email/calendar data, deletes memory, documents, reminders and the rest of the state, sweeps stragglers and reports honestly if anything could not be removed. LLM, web and image keys stay so Briglia can still start; server-side mailboxes are never touched.
/setname changes what Briglia calls you (two-step, with confirmation). Briglia also builds a small learned persona over time; it is part of what /deleteuserdata removes and what a Mind export carries.