What does Tomosu Agent do?
One routing point decides what the model is asked, in three cases:
| The rules found | The model is asked to | You see |
|---|---|---|
| A finding with a template fix | Check that the finding is real and the fix suits this code | A verdict: confirmed, doubtful (ranked lower, still shown) or fix does not suit. The template fix never changes. |
| A finding with no template fix | Give a verdict and draft a fix | A fix labeled AI-drafted, only if it passes the same checks as a template fix (Fixes drafted by Tomosu Agent) |
| Nothing, in some functions | Review the riskiest functions and name a rule category and the exact lines | Findings labeled AI-suggested, ranked below rule findings. Each claim is checked against the code facts; contradicted claims are dropped. |
With model assist off, or the provider failing or slow, the findings and template fixes are exactly the same. This is enforced by tests.
How do I turn it on?
Open Settings → Tomosu Agent, choose a provider, a model and its key, save, and press Restart now. Load models asks the provider for its current list; only your key is sent. Keys are never shown again after saving.
In a .env file, config.yaml (llm:) or environment variables:
TOMOSU_LLM_ENABLED=true
TOMOSU_LLM_PROVIDER=anthropic
TOMOSU_LLM_MODEL=claude-sonnet-5-5
TOMOSU_LLM_ANTHROPIC_API_KEY=…
On a running engine: tomosu settings set llm.enabled=true llm.provider=anthropic llm.model=claude-sonnet-5-5 --engine URL, then tomosu settings restart --engine URL.
Which models can it use?
Your free Tomosu account (no key of your own), any major provider with your key, your cloud account, or a model on your own machine. The engine speaks the three request formats almost every provider uses: OpenAI chat completions, Anthropic messages and Google Gemini.
| Kind | llm.provider |
|---|---|
| Tomosu free account | tomosu |
| Major providers | anthropic, openai, gemini |
| Other hosts | deepseek, mistral, groq, xai, moonshot, qwen, zai, openrouter, together, fireworks, cerebras |
| Your cloud account | bedrock, azure-openai |
| On your machine | ollama, lmstudio |
| Anything else | openai-compatible or anthropic-compatible, with llm.base_url |
What is sent, and where?
Only to the provider you choose, straight from the engine; Tomosu never proxies your provider. Per request: the functions involved (lines numbered, credential-looking values replaced by placeholders and restored locally), the file’s import lines, and the rule’s public name, risk and guidance. Never other files, raw telemetry, or any rule’s detection logic. The Tomosu free account sends the same minimal context to Tomosu Cloud, which keeps nothing.
Every run opens with a notice of what is sent and to which provider, and ends with a line counting what the model did.
How much does it use?
One budget per run: llm.max_calls requests, llm.max_functions functions reviewed, a token limit and llm.max_run_time (default 10 minutes). Many functions are packed into one request. When the budget runs out, the work already done is kept and the rest is reported.
And one budget per day: llm.max_daily_calls (default 200) caps the model requests the engine sends in a day, for everything it does with the model, and llm.max_daily_tokens can cap their estimated tokens too (default 0, no cap). Every request takes from it before it is sent. When it is used up, findings and rule fixes carry on unchanged and the agent starts again at midnight. A fix the agent has drafted is reused until the code changes, so a finding is not drafted twice.
When does it work in the running engine?
You choose, with llm.runtime_schedule. It applies at once, with no restart. The data the engine takes in and its runtime signals keep running whatever you choose.
| Schedule | What happens |
|---|---|
continuous (default) | The agent works on new findings as they appear. |
hourly, daily, every 6h | New findings wait. At each run the agent works through what is waiting, then stops until the next run. A waiting finding says when that is. |
on-signal | Only findings of at least llm.runtime_min_severity (default High) and, when llm.runtime_signals lists signal ids or categories such as R08, E02, only findings with one of those signals. |
manual | Only when someone asks on a finding. |
Whatever the schedule, a finding the agent is waiting on has Ask Tomosu Agent now on its page, and so has one whose last draft failed: the agent starts on it at once (the daily budget still applies). Setup health shows the schedule, the next run and today’s use of the budget, and so does the terminal:
$ tomosu agent status --engine http://localhost:7600
Schedule: continuous
Today: 9 of 200 model requests today
Ingest: on
tomosu agent schedule hourly --engine http://localhost:7600
tomosu agent schedule on-signal --min-severity critical --signals R08,E02 --engine http://localhost:7600
tomosu agent budget 100 --engine http://localhost:7600 # requests a day; 0 = no cap
tomosu agent ask <finding-id> --engine http://localhost:7600
What does it remember?
Verdicts, drafts and suggestions are kept locally for llm.memory_days (default 180) and never leave the machine. A finding that already has a verdict is not sent again while its code is unchanged.
$ tomosu memory stats
Agent memory: /tmp/tdocs/data/state/state.db (table agent_memory) (56 entries, 34272 bytes, kept 180 days; never leaves this machine)
From 2026-11-26 20:10 to 2026-11-26 20:19
What it stores, and why:
finding 33 The model's verdict on a rule finding (confirmed, doubtful, fix does not suit), its reason, the steps it took, and whether a drafted fix passed verification.
Why: So the same finding is not sent to the model again while the code is unchanged (verdicts are reused), and so past verdicts on a check can be shown to the model as examples.
suggestion 5 An AI-suggested finding where no rule matched: the pattern, the flagged function with its imports, the model's words, and the verified fix if there was one.
Why: So repeated suggestions count as one pattern, are kept in shadow until they prove themselves, and can become candidate rules with `rules propose`.
run 18 One model-assist run: the provider, how many requests and tokens, and what it confirmed, doubted, drafted and suggested.
Why: For the budget, the weekly digest and the dashboard's model charts.
Verdicts: confirmed 29 · doubtful 2 ·
Fixes drafted by source: ai-draft 24 ·
…
tomosu memory reset --yes (or Reset on the Memory page) deletes it.

How do I see what it did?
The Agent page lists recent work and this week’s numbers; tomosu digest prints the same summary:
$ tomosu digest
Agent digest 2026-11-19 – 2026-11-26
runs: 18 (model openai-compatible practice), 30 requests, about 83936 tokens
rule findings: 28 confirmed, 2 doubted, 0 with an unsuitable template fix, 6 verdicts reused from memory
drafts: 19 passed verification, 7 failed; 0 of 10 AI-drafted fixes accepted
new patterns: 5 (0 in shadow, 0 dropped as ungrounded)
reactions: 1 accepted, 2 rejected (false-positive 2)
pattern "Production reports an error from this line" (category 21): seen 3 time(s) in 1 repo(s), 0 accepted, 0 rejected

A pattern the agent finds and people accept repeatedly can become a candidate rule: tomosu rules propose, or Make a rule on Contributions. It starts in shadow; making it active is always a person’s decision.