Research tools
Research investigations read the outside world through research tools. This page covers enabling a tool for a workspace, and then each tool in turn. It covers Web search & page reader: where its searches go, how it reads a page, what it keeps, and the variables that bound it. It also covers the competitor tracker: who manages it, what it needs, and how it is scheduled. And it covers Codebase & git mining: what it reads, where its repository clones live, and how a bisect keeps going. It covers the Issue & PR history index: what it reads, and how an owner imports a document set. Last, it covers Build & test telemetry, which needs no setup.
Enabling a tool
A workspace uses a research tool once it is enabled: an Owner or a Maintainer presses enable on the tool's row of the Research tools card on Research, fills in the tool's form and presses Enable tool. See Enabling a tool for the card.
Since ouroboros-rest 0.41.14Until a tool is enabled its dot is a grey ring and investigations cannot use what it needs settings for. Everyone in the workspace can read the card; only an Owner or a Maintainer, signed in as themselves, can enable a tool. A service account's token cannot.
| Tool | What its form asks for | What else it needs |
|---|---|---|
| Web search & page reader | The Search provider, an optional SearXNG URL, and an API key for Brave, Tavily or Firecrawl. Nothing is required: with every field left alone it uses the deployment's SearXNG. See Search providers. | A reachable SearXNG, or a hosted provider's key |
| Competitor tracker | Nothing required | At least one rival with an enabled watch — see Competitor tracker |
| Codebase & git mining | Nothing required | An enabled repository, and the engine running — see Code & git mining |
| Issue & PR history index | Nothing required | A connected ticket source, or an imported document set — see Issue & PR history index |
| Build & test telemetry | Nothing required | Builds and tests that have run |
| Docs, standards & papers | Not available yet. Its enable says it arrives in v2. | — |
A tool that is enabled but has nothing to read yet — no rivals, no repositories, nothing indexed — keeps the grey ring, and its dot's detail says what is missing.
A key or token typed into a form is sealed with the workspace's encryption key before it is stored. It is never returned by the API or shown again in the form; saving the form with the field empty keeps the stored one. Saving is not audited in this release.
The card reads GET /api/v1/research/tools, which runs every tool's health check for the
workspace, and saves with PUT /api/v1/research/tools/<tool> and a body of
{"config": {…}} holding the form's fields. A field the tool's schema refuses is answered
422 research_tool_config_invalid, naming each field.
Search providers
The tool searches through one provider per workspace. Switching provider changes where searches go and nothing else: every provider's results are cited the same way, and pages are always read by Ouroboros' own reader, never by the provider.
| Provider | Key | Cost per search | Notes |
|---|---|---|---|
| SearXNG (default) | none | none | The deployment's own metasearch. The compose file ships it as the searxng service. |
| Brave Search | yes | about $0.005 | Hosted. Up to 20 results per search. |
| Tavily | yes | about $0.008, twice that at advanced depth | Hosted. Search depth is basic or advanced. |
| Firecrawl | yes | not priced per search | Hosted. Billed in credits per result, so cost estimates leave it out. |
A workspace's settings hold the provider, an optional SearXNG URL that overrides the
deployment's, the API key for a hosted provider, SafeSearch (off, moderate or
strict; moderate by default) and Tavily's search depth. The key is sealed in the vault and
never shown again.
The deployment's SearXNG lives at OURO_RESEARCH_SEARXNG_URL. A workspace
that names no SearXNG URL of its own searches there.
Health
The tool's health tells a broken configuration from a broken provider:
| Health | Means | Fix |
|---|---|---|
| not configured | The workspace has not set the tool up | Enable it from the Research tools card |
| misconfigured: … | The settings cannot work, for example a hosted provider with no key | Correct the settings it names |
| unreachable: … | The settings are fine, but the provider did not answer | Check the SearXNG container or the provider's status |
| slow: … | The provider answered, but took more than 2 seconds | Usually transient |
The health check never spends money. For a hosted provider it only checks that the API answers; a wrong key shows up on the first search, as a request to reconnect.
Reading a page
Whichever provider found a page, Ouroboros reads it itself, in this order:
- Only
httpandhttps, with no credentials in the URL. - PDFs are skipped with the note papers tool arrives in v2. A later research tool reads documents and papers.
- robots.txt decides. A disallowed page is skipped, never read.
- Pacing. The reader waits its turn for the host, then sends the request.
- Redirects are followed one hop at a time. Each hop is checked against robots.txt and
the address policy again, up to
OURO_RESEARCH_FETCH_MAX_REDIRECTShops. - The content type decides what is kept. HTML is reduced to its main content, without navigation, banners or footers. Plain text, JSON and XML are kept as they are. Anything else, such as an image, is skipped as not readable text.
Requests carry the user agent OuroborosResearch/1.0, so a site can address the reader in its
robots.txt as OuroborosResearch.
robots.txt and politeness
- robots.txt is honoured as RFC 9309 says. The longest matching rule wins, and
allowwins a tie. A group forOuroborosResearchtakes precedence over*. - A missing robots.txt allows everything. That covers any 4xx answer.
- An unreadable robots.txt disallows everything. A 5xx answer or no answer counts as unreadable, and the reader asks again after five minutes.
- Answers are cached per site for a day.
- One request at a time per host. Requests to a host start at least
OURO_RESEARCH_HOST_INTERVAL_MSapart, or further apart when the site'sCrawl-delayasks for more. The reader honours a crawl delay of up to 30 seconds. - A
429is respected. The reader backs off for as long as the site'sRetry-Aftersays.
Skipped pages are recorded
A page the reader will not read is not an error and not silent. The skip is recorded in the investigation, with the page's address and a note saying why, and the investigation goes on. There are two reasons:
| Reason | Note |
|---|---|
| robots.txt disallows the page | The rule that disallowed it, for example Disallow: /private/ |
| The page is not readable text | papers tool arrives in v2 for a PDF, or the content type it was |
A page that fails for another reason, such as a timeout or a server error, is a failed request. The investigation may retry it.
What is archived
Each page read becomes a source in the investigation's citation ledger, at the address it was finally read from. A source holds:
- a hash of every byte read, so a later reading shows whether the page changed;
- an excerpt of the main content, up to 4 KiB;
- the page's title, its status, content type and size, whether it was cut off at the size cap, and the redirects that led to it.
Each search result also becomes a source, with the provider's snippet as its excerpt. The full page text goes to the investigation for that step and is not stored.
Network safety
The URLs the reader opens were chosen by a model, so the reader treats them as hostile. It uses the same address policy as webhooks:
- Internal addresses are refused. That covers loopback, link-local (including the cloud metadata endpoint), private ranges, carrier-grade NAT and unique-local IPv6, whether the URL names a host or an address.
- The connection goes to the address that was checked, so DNS cannot answer differently between the check and the connection.
- An exception needs an operator. Add a host to
OURO_RESEARCH_FETCH_INTERNAL_ALLOWLISTto let the reader reach it, for example an intranet wiki.
Every address on the allowlist is readable by any investigation in any workspace. List only hosts whose content every workspace may see.
A refused address is a failed request, not a skipped page.
Competitor tracker
The competitor tracker checks your rivals' sources on a schedule and archives every change for investigations to cite. What it watches is described in Competitor watch.
Who manages rivals
Owners and admins add, edit and remove rivals and their watches. Every member can see them and the archived changes.
The screen for managing rivals arrives with the Research page. Until then, rivals and watches
are managed through the REST API, at /api/v1/research/competitors.
A rival can have up to 25 watches. A watch's source kind, address and selector are fixed once it is created. To watch something else, add a new watch. A rival or watch whose change an investigation cites cannot be removed, so the citation keeps its evidence. Disable its watches instead.
What it needs
- Pages and feeds are read by the same reader as the web tool. robots.txt, per-host pacing, size caps and network safety all apply, and the two tools share one robots.txt cache and one pace per host.
- GitHub releases are read through GitHub's API with the workspace's backlog token. Set it as
described in Setting the backlog token. Without it,
a
github_releaseswatch records GitHub releases need this workspace's GitHub token. - Filings are counted but not read until a later release.
- Pages that need JavaScript are marked and skipped until a later release brings a reader that runs scripts. An owner or admin can ask for a marked page to be tried again, for example after the rival changes its site.
Scheduling
Every REST replica runs the scheduler. Each tick, it claims the watches that are due, at most
OURO_RESEARCH_WATCH_BATCH, and checks them one at a time. A claim holds a watch
for 15 minutes, so two replicas never check the same watch. A watch whose replica stopped
mid-check becomes due again when the claim runs out.
Each watch's next check is stored, so a restart picks up the schedule where it was. Set
OURO_RESEARCH_WATCH_TICK_MS to 0 on a replica that should not check watches.
Tracker health
The tracker's health ages each readable watch's last successful read against its cadence. A watch not read for two cadences is stale. The tool is healthy when no watch is stale, degraded when some are, and down when all are. Filings and pages that need JavaScript are left out.
Code & git mining
The code & git mining tool reads the workspace's repositories from clones the engine keeps. What it answers is described in Code & git mining.
What it reads
- The repositories enabled for the workspace, and only those. A repository is enabled on Get Started, and its GitHub organisation must be enabled too.
- Public repositories need no token. A private one is fetched with the workspace's backlog token, set as described in Setting the backlog token. The REST service hands the token to the engine for each fetch. The engine does not store it, and it is never written into a clone.
- The stack for dependency graphs comes from repository detection's latest scan of the repository. A repository that was never scanned gets unsupported until it is.
Where the clones live
The engine keeps one bare clone per workspace and repository under
OURO_ENGINE_CLONE_DIR, as <workspace id>/<owner>__<name>.git. Two workspaces
that enable the same repository each fetch it with their own token, into their own clone.
- The first question about a repository clones it, which can take minutes for a large one.
The REST service waits up to
OURO_RESEARCH_CODE_TIMEOUT_MSfor an answer. - A clone is fetched again once it is older than
OURO_ENGINE_CLONE_REFRESH_SECONDS, and whenever a question names a branch, tag or commit the clone does not have yet. - If a refresh fails, the clone is read as it was. Every answer names the commit it was read at, so an older clone still gives an exact answer.
- Clones are read-only. No question writes to a clone or to GitHub. Only fetching updates a clone.
Mount a volume at the clone directory so clones survive a restart. See
ouroboros-engine. Deleting the directory is safe:
the next question clones again.
Bisects
A bisect runs one build-farm job per step, in the pool the investigation names, so it needs a pool with a runner that can build the repository and run the test. Each job builds one commit and runs the step's command, or the pool's default command when none was given.
Each step's result and the narrowed range are saved together in the database. A job's completion
moves its bisect on at once. Every OURO_RESEARCH_BISECT_TICK_MS, each REST
replica also checks the running bisects. After a restart, that check decides any step whose job
finished meanwhile and starts the next one, so the bisect continues instead of starting again.
If a runner is lost and the farm retries the job, the bisect follows the retry.
Code tool health
| Health | Means |
|---|---|
| healthy | Repositories are enabled and the engine answers |
| not configured | The workspace has no repositories enabled |
| down | The engine that keeps the clones cannot be reached |
A token GitHub refuses shows on the first question, as a request to reconnect.
Issue & PR history index
The issue & PR history index searches the workspace's tickets, pull requests and imported document sets. What it answers is described in Issue & PR history.
What the index reads
- Every ticket of every ticket source the workspace has connected, whatever its tracker. See Ticket sources. A paused source's tickets stay searchable.
- Every pull request mirrored from the workspace's git host.
- Every imported document set.
Nothing is copied or scheduled: a ticket is searchable as soon as its source has synced it, and an import as soon as it is stored. The tool has no variables and needs no credential.
Importing a document set
A document set is a file of documents that are not tickets, such as a quarter's churn interviews or field notes. Each document becomes searchable and citable.
Only a workspace owner can import or remove a set. Every member can list and read them.
The screen for importing document sets arrives with the Research page. Until then, sets are
managed through the REST API, at /api/v1/research/document-imports.
To import a set, send POST /api/v1/research/document-imports with:
| Field | What to send |
|---|---|
collection | The first part of the set's address, such as support. Lower-case letters, digits, hyphens and underscores, at most 63 characters. |
name | The second part, such as churn-2026-q2. Letters, digits, dots, hyphens and underscores, at most 100 characters. |
title | What a citation of the set is called, such as Support churn interviews Q2. Required for a CSV file. For Markdown, the file's first # heading is used when you leave it out. |
description | Optional. What the set is, in a paragraph. It is searched with the title. |
format | csv or markdown |
content | The file's text |
The set is then cited as issue-index://support/churn-2026-q2, and each document as that address
followed by the document's key.
A CSV file
The first row names the columns. Each later row is one document.
| Column | What it holds |
|---|---|
text | The document. Required. body and content are read as the same column. |
title | The document's title. Without it, the first line of the text is used. |
key | The last part of the document's address, such as acct-01. id is read as the same column. Without it, documents are numbered doc-001, doc-002 and so on. |
date | When the document is from, as an ISO 8601 date such as 2026-04-08 |
labels | Labels, separated by semicolons, vertical bars or commas |
| Any other column | Kept with the document as extra detail |
key,title,date,labels,account,text
acct-01,Northwind Survey,2026-04-08,docking,Northwind Survey,"The drone gives up after one docking abort."
acct-03,Cascade Timber,2026-04-21,battery,Cascade Timber,Battery estimates were wrong on cold mornings.
A Markdown file
Each ## heading starts one document, and the heading is its title. When you send no title,
the first # heading is the set's title. When you send no description, the text under that
heading is the set's description.
A document can open with Name: value lines, followed by a blank line. Key:, Date: and
Labels: are read as the CSV columns are. Any other name is kept as extra detail. A file with no
## heading is one document.
# Support churn interviews Q2
Exit interviews with accounts that churned in Q2 2026.
## Northwind Survey
Key: acct-01
Date: 2026-04-08
Labels: docking
The drone gives up after one docking abort.
Limits
| Limit | Value |
|---|---|
| File size | 2 MiB |
| Documents in a set | 2,000 |
| One document's text | 64 KiB |
| One document's key | Letters, digits, ., _, # and -, at most 100 characters, unique in the set |
A file that breaks a limit, or that cannot be read, is refused whole. The refusal names the row or section at fault, for example row 7 has no text.
What a set may contain
Import text you are content for the whole workspace to read. Every member can read a set, and every investigation in the workspace can search and quote it. A quoted passage is kept in the investigation's record of sources, and it stays there after the set is removed.
Do not import passwords, keys or tokens. Remove personal details that an investigation does not need, such as contact names and phone numbers.
A set holds text only. Images and attachments are not imported.
Replacing or removing a set
A set is never edited, because an investigation may have cited it. To replace a set, remove it
with DELETE /api/v1/research/document-imports/{importId} and import the new file. Importing to
an address that is already taken is refused.
Removing a set takes its documents out of the index. Investigations that cited them keep the passages they quoted.
How long a search may take
Each search, lookup and count must answer within 500 ms. One that takes longer is stopped, and the investigation is told the index did not answer in time, so a slow index cannot stall an investigation.
History index health
| Health | Means |
|---|---|
| healthy | The index holds at least one ticket, pull request or document |
| not configured | Nothing is indexed yet. Connect a ticket source or import a document set. |
| down | The index cannot be read |
Build & test telemetry
The Build & test telemetry tool lets an investigation quote the workspace's own numbers. What a researcher sees is in Research. For an operator there is little to do:
- Nothing to connect. It has no credential, no external service and no environment variable. It reads what the deployment already records for the workspace: Insights metrics, test results and flake scores, HIL measurements, runs, token usage and regression baselines.
- Read-only. It never writes to any of those. It collects nothing of its own, so it adds no storage and no schedule.
- One workspace at a time. An investigation reads its own workspace's numbers only. A question about another workspace's test case or repository is answered no data.
- Runner health is not included. A build runner's health history is not kept yet, so the tool does not read it.
The tool has one optional setting, a Default window of 7, 30 or 90 days, used when an investigation names no window. It is 30 days unless changed.
Telemetry health
| Health | Means |
|---|---|
| healthy | The workspace has at least one measurement, Insights metric or test result to read |
| not configured | Nothing has been measured yet. Telemetry appears once builds and tests have run. |
| down | The measurements cannot be read |
Regression watch
The regression watch compares each night's measurements with the last release's baseline, bisects real drift to a commit, opens a forensics investigation and drafts a fix. An Owner or a Maintainer decides what it watches, how sensitive it is, and how much it does without asking.
Since ouroboros-rest 0.41.9Settings has no card for the watch yet. The Regression watch card on Research shows what drifted, dismisses an item and captures a first baseline; everything else an Owner or a Maintainer configures through the REST API, signed in as themselves — a service account's token can read the watch but not change it. Send the session cookie as Who may start an investigation shows.
| Request | What it does |
|---|---|
GET /api/v1/research/regression-watch/settings | Reads the settings. Everyone in the workspace may. |
PUT /api/v1/research/regression-watch/settings | Saves them. A field you leave out keeps its stored value. |
POST /api/v1/research/regression-watch/baselines | Captures a release's baselines by hand: {"repository": "owner/name", "releaseTag": "v2.0.4"} |
POST /api/v1/research/regression-watch/comparisons | Runs the nightly comparison now |
POST /api/v1/research/regression-watch/items/<item id>/dismiss | Dismisses a watch item: {"reason": "…"} |
Watched metrics
metrics lists what the watch captures a baseline of and compares every night. A workspace may
watch up to 64 metrics. Each entry has:
| Field | What it is |
|---|---|
repository | The repository, as owner/name |
source | bi_metric for an Insights metric, case_metric for a measurement a test case records |
key | The Insights metric's id, such as merge_rate; or <case key>:<measurement> for a test case's |
class | timing, accuracy, resource or rate. It picks the threshold defaults. |
windowDays | How many days a baseline and a nightly reading cover, from 1 to 90. 7 if you leave it out. |
replay | The metric's replayable test, or null |
nightlyRef | The branch or tag a bisect treats as bad. HEAD, the default branch, if you leave it out. |
replay is what makes a metric bisectable. It names a build-farm pool and, optionally, the
command each step runs — without one, the pool's default command runs. The command must
succeed on a good commit and fail on a bad one. A metric with replay: null is still
compared every night, but its drift is never bisected: the item stays detected with a
needs repro note.
{
"metrics": [
{
"repository": "acme-robotics/helios-firmware",
"source": "case_metric",
"key": "29f70bbc9eaa22505445bbf2378dc743e5b177119c5a09cdcde73870d0867560:hover_drift_cm",
"class": "accuracy",
"windowDays": 7,
"replay": { "pool": "pool-a", "command": ["west", "twister", "-T", "tests/hil/hover"] },
"nightlyRef": "main"
}
]
}
A save that lists a metric twice for one repository, or names an Insights metric that does not
exist, is refused with 422 regression_watch_settings_invalid.
Thresholds
A threshold rule decides when a difference is drift. It has five parts:
| Field | What it decides |
|---|---|
direction | Which way is worse: higher_is_worse, lower_is_worse, or either |
warnPct | The move, as a percentage of the baseline, from which drift is a warn |
errPct | The move from which it is an err. At least warnPct. |
minSpreadMultiple | How many times the baseline's own spread a move must exceed. 0 turns this check off. |
minSamples | How many samples the nightly window needs before it is compared at all |
Each class of metric has a default rule:
| Class | direction | warnPct | errPct | minSpreadMultiple | minSamples |
|---|---|---|---|---|---|
timing | higher_is_worse | 5 | 15 | 2 | 5 |
accuracy | higher_is_worse | 5 | 10 | 2 | 10 |
resource | higher_is_worse | 10 | 25 | 2 | 5 |
rate | lower_is_worse | 2 | 5 | 2 | 10 |
thresholds overrides them. classes changes a whole class; metrics changes one metric by
its key, and wins over its class. Send only the fields that differ, and send warnPct and
errPct together:
{
"thresholds": {
"classes": { "timing": { "warnPct": 3, "errPct": 10 } },
"metrics": { "merge_rate": { "minSamples": 20 } }
}
}
Tune a noisy metric by raising its minSpreadMultiple or minSamples rather than its
percentages. A metric recorded as a rate or a sum has no spread of its own, so only the
percentages and minSamples apply to it.
Policies
Two switches decide how much the watch does without asking:
| Setting | Default | What it does |
|---|---|---|
autoBisect | true | Starts a bisect as soon as drift is detected on a metric that has a replayable test. Each step is a build-farm job. |
autoFile | false | Files the drafted fix ticket to your tracker and queues it for a loop, without waiting for a person |
The watch always drafts the fix. Filing it is the opt-in: with autoFile off, the draft
waits in Planning until someone files it.
A change to either switch is recorded in the audit log as
regression_watch.policy_updated, with both values before and after.
fixSourceId names the ticket source fix drafts are written for. Leave it null in a workspace
with one ticket source. With several, set it: until you do, the item stays at investigating
with a note saying a source must be chosen.
Announcing a release
Ouroboros does not notice a release tag by itself. To capture baselines when you tag a release, have your release pipeline announce it to the REST service's internal address, with the internal key:
curl -X POST "$OURO_REST_URL/internal/research/regression-watch/releases" \
-H "content-type: application/json" \
-H "X-Ouro-Internal-Key: $OURO_ENGINE_SHARED_SECRET" \
-d '{"repository": "acme-robotics/helios-firmware", "releaseTag": "v2.0.4"}'
{"repository":"acme-robotics/helios-firmware","releaseTag":"v2.0.4","workspaces":1,"captured":3}
Every workspace that watches a metric of that repository captures its baselines. workspaces
is how many watch it and captured how many baselines were stored. Announcing the same tag
twice captures nothing the second time, because a baseline is never measured again.
The internal address is not published by the app's public address — see
Deploying Ouroboros. The key is
OURO_ENGINE_SHARED_SECRET.
When the watch runs
Every OURO_RESEARCH_REGRESSION_TICK_MS, each REST replica runs one pass. A pass:
- runs the nightly comparison for each workspace that has not been compared yet today (UTC);
- moves every open watch item one step: starts or checks its bisect, opens the investigation, drafts the fix, and follows the fix to its merge.
A pass that is repeated, or that two replicas run at once, changes nothing twice. Setting the
variable to 0 turns the pass off on that replica; baselines can still be captured and
compared by hand.
Roadmap pipeline
The roadmap pipeline turns a brief into ROADMAP.md, proposes it to a repository and files its
items as issues — see
From a brief to a roadmap to issues.
What the pipeline needs
- A ticket source with a repository. The roadmap's file is written to that source's repository and its issues are filed in that source's tracker. Today that means a GitHub source — see Ticket sources.
- A token that may write. Besides creating issues and milestones, the source's token must be able to create a branch, commit a file and open a pull request: on a fine-grained GitHub token, Contents and Pull requests set to Read and write. See Token permissions.
- A model routed to research. The pipeline's two skills run on the model your workspace routes research work to — see Providers & models. With none, generating a roadmap is refused.
- The engine. The skills are run by the engine. If it cannot be reached, or the model cannot be called, the request is refused and nothing is stored.
Committing without a pull request
By default every version of ROADMAP.md is proposed as a pull request, on a branch named
ouroboros/roadmap-…. Your repository's review is the gate.
An Owner or a Maintainer can let Ouroboros commit to the default branch instead:
curl -X PUT "$OURO_URL/api/v1/research/roadmap-settings" \
-H "content-type: application/json" -b cookies.txt \
-d '{"directCommit": true}'
{"directCommit":true}
| Setting | Default | What it does |
|---|---|---|
directCommit | false | Commits each new roadmap version straight to the repository's default branch, with no pull request |
Everyone in the workspace can read the setting with GET on the same address.
- A change is recorded in the audit log as
roadmap.policy_updated, with the value before and after. - While the workspace is in dry-run, the setting is ignored: a draft pull request is opened instead.
- A branch protection rule that refuses direct pushes still applies. The roadmap then stays
pendingand says the repository refused.
When the drift check runs
Every OURO_RESEARCH_ROADMAP_TICK_MS, each REST replica checks every roadmap that
has a ticket source and is not already marked as drifted. For each one it:
- retries a file that could not be written to the repository;
- follows an open pull request, to committed when it is merged or back to pending when it is closed;
- compares the roadmap with the tracker and with the file in the repository.
A difference raises one suggestion on the roadmap. Nothing is rewritten.
If two replicas check the same roadmap in the same instant, each may raise a suggestion. The
second is harmless and can be dismissed. Setting the variable to 0 turns the check off on that
replica; a roadmap can still be checked by hand.
What is recorded
| Audit event | When |
|---|---|
roadmap.policy_updated | directCommit was turned on or off |
roadmap.suggestion_dismissed | A suggestion was dismissed; the record keeps its text |
Both can be delivered to a webhook.
Who may start an investigation
An investigation spends the workspace's money, so each workspace chooses the lowest role that may start one. Since ouroboros-rest 0.41.8
| Setting | Who may start an investigation |
|---|---|
member | Owners, Maintainers and people holding the member role. The default. |
admin | Owners and Maintainers only. |
A Viewer can never start one. Who may cancel an investigation is not a setting — see Who can cancel an investigation.
Settings has no control for this yet. An Owner or a Maintainer changes it through the REST API, signed in as themselves — a service account's token cannot:
-
Sign in to Ouroboros in your browser and open the browser's developer tools. Copy the value of the session cookie:
__Secure-better-auth.session_tokenon anhttps://deployment, orbetter-auth.session_tokenon a local one. -
From a machine that can reach the REST service, send the setting:
curl -X PATCH "$OURO_REST_URL/api/v1/research/settings" \-H "content-type: application/json" \-H "Origin: https://app.example.com" \-H "Cookie: __Secure-better-auth.session_token=<the cookie value>" \-d '{"startRole": "admin"}'Originis the UI's public address. The answer is the setting as it now stands, beside whether the deployment has the invocation gateway:{"startRole":"admin","gateway":{"available":true}}.
The setting is changed for the workspace your session is in. GET on the same address reads it
back, and everyone in the workspace may read it.
The change applies to the next start. Investigations already started carry on.
The invocation gateway
Research is model-backed: an investigation plans, digests what it reads and writes its brief through the invocation gateway, the service-side path that makes a model call on a provider's behalf. A deployment without the gateway cannot write a brief.
Since ouroboros-rest 0.41.16The REST service reports which it is. GET /api/v1/research/settings answers
gateway.available beside the starter role, and everyone in the workspace may read it:
{ "startRole": "member", "gateway": { "available": true } }
gateway.available | What the Research page does |
|---|---|
true | Nothing different. |
false | Says so once, above its cards, and switches New investigation and Start investigation ⟳ off — see When research cannot run. |
It is a fact about the build you deployed, not a setting: there is no variable to turn it on.
The gateway is built into the REST service from 0.41.36, so a current deployment answers true;
one on an earlier release answers false. Since ouroboros-rest 0.41.36
With the gateway, an investigation's model calls follow the routing of their task kinds, like any other model call — see What a chain does when a model call fails.
What needs no model is unaffected. The regression watch still compares each night, opens items and bisects; the tools still report their health; briefs and roadmaps already written still read and export.
The API does not refuse a start on its own account. A client that posts one anyway gets an investigation that ends failed, with whatever it read before then kept.
Investigations after a restart
An investigation runs in the engine, but nothing about it is kept there. Its sources, its progress and its model usage are saved in the database as it goes, after every step.
Every OURO_RESEARCH_INVESTIGATION_TICK_MS, each REST replica looks for a running
investigation that has saved nothing for ten minutes and hands it to the engine again. An engine
that is still working on it does nothing. An engine that was restarted continues from the last
saved step, so sources already read are not read or paid for again.
An investigation is handed back at most twice. If it still has not finished, it ends as failed and keeps everything it gathered.
Variables
All but the clone variables are set on the REST service. Each has a working default.
| Variable | Default | What it bounds |
|---|---|---|
OURO_RESEARCH_SEARXNG_URL | http://localhost:8888 | The deployment's SearXNG. The compose file sets http://searxng:8080. |
OURO_RESEARCH_FETCH_TIMEOUT_MS | 15000 | How long one request may take, from 1 to 120 seconds. |
OURO_RESEARCH_FETCH_MAX_BYTES | 5242880 (5 MiB) | The most bytes read from one page. A longer page is read up to the cap and marked as cut off. |
OURO_RESEARCH_FETCH_MAX_REDIRECTS | 5 | The most redirects followed for one page, from 0 to 20. |
OURO_RESEARCH_HOST_INTERVAL_MS | 1000 | The least time between two requests to one host, up to 60 seconds. |
OURO_RESEARCH_FETCH_INTERNAL_ALLOWLIST | empty | Internal hosts the reader may reach, comma-separated: hostnames, IP addresses or CIDR blocks. |
OURO_RESEARCH_WATCH_TICK_MS | 60000 | How often the competitor tracker looks for due watches, from 10 seconds to an hour. 0 turns it off on that replica. |
OURO_RESEARCH_WATCH_BATCH | 10 | How many due watches one tick checks, from 1 to 100. |
OURO_RESEARCH_CODE_TIMEOUT_MS | 120000 | How long one code & git mining question may wait for the engine, from 5 seconds to 15 minutes. |
OURO_RESEARCH_BISECT_TICK_MS | 60000 | How often running bisects are checked and resumed, from 10 seconds to an hour. 0 turns the check off on that replica. |
OURO_RESEARCH_INVESTIGATION_TICK_MS | 60000 | How often running investigations are checked for one to resume, from 10 seconds to an hour. 0 turns the check off on that replica. |
OURO_RESEARCH_REGRESSION_TICK_MS | 300000 | How often the regression watch runs its pass, from 10 seconds to an hour. 0 turns the pass off on that replica. |
OURO_RESEARCH_ROADMAP_TICK_MS | 900000 | How often roadmaps are checked for drift, from 10 seconds to a day. 0 turns the check off on that replica. |
The engine reads the clone variables:
| Variable | Default | What it bounds |
|---|---|---|
OURO_ENGINE_CLONE_DIR | the system temporary directory | Where the clones live. The compose file sets /var/lib/ouroboros-engine/clones, on a volume. |
OURO_ENGINE_CLONE_REFRESH_SECONDS | 300 | How long a clone is read before it is fetched again, up to a day. 0 fetches before every question. |
OURO_ENGINE_CLONE_TIMEOUT_SECONDS | 120 | The network timeout of one fetch, up to an hour. |
The SearXNG container takes one variable of its own, OURO_SEARXNG_SECRET.
See Container images.