chain-rdeveloper portal
build

svc-core — API Routes

Auto-generated from source on 2026-10-30 15:00 UTC. Do not edit manually — run make spec to regenerate.


/access · App - Access

Source: modules/svc-core/app/router/app/access/router.py

MethodPathHandlerDescription

/activity · App - Activity

Source: modules/svc-core/app/router/app/activity/router.py

MethodPathHandlerDescription
GET/activity/summaryactivity_summaryCounts over the same rows the feed lists, for the headline strip.
GET/activity/backgroundlist_background_activityWork done in the background on what the request's workspace owns,
GET/activity/{version_id}get_activity_eventOne event, with the snapshot taken at the time and the diff against

GET /activity

The caller's resource changes, newest first.

`total` counts everything matching the filters, not just this page, so a client can show "showing 100 of 4,213" without a second request.

GET /activity/summary

Counts over the same rows the feed lists, for the headline strip.

Registered before `/{version_id}` so the literal path wins over the parameterised one.

GET /activity/background

Work done in the background on what the request's workspace owns, newest first.

Scoped by owner rather than actor, unlike the change feed above: nobody acted — the scheduler, a board load or a crawl worker did — so the only question the row can answer is whose thing it was done to: a personal board's refresh is Personal's, an organisation's crawl the organisation's, and neither shows in the other.

GET /activity/{version_id}

One event, with the snapshot taken at the time and the diff against the version before it.

The diff is computed here rather than by the resource's own `/history/diff` endpoint because the feed is heterogeneous: a client walking a mixed stream would otherwise need a resource-type-to-URL map and a different request shape per row.


/agents · App - Agents

Source: modules/svc-core/app/router/app/agents/router.py

MethodPathHandlerDescription
GET/agents/cost-profileslist_cost_profilesThe cost profiles an agent may run under: how much pipeline work each
GET/agents/{agent_id}agent_id
POST/agents/newnew_agent
PATCH/agents/{agent_id}update_agent
GET/agents/{agent_id}/generated-resourceslist_generated_resourcesList resources created by this agent's generative setup.
GET/agents/{agent_id}/commandsagent_commandsThe chat commands this agent's chat offers.
DELETE/agents/{agent_id}delete_agentDelete an agent and its assignments, conversations, and svc-ai memory.
POST/agents/{agent_id}/promptagent_id_promptOne turn with the agent, governed by the rules of `workspace` — the
GET/agents/{agent_id}/effective-toolsget_agent_effective_toolsReturn the tool set available to this agent at runtime.
GET/agents/{agent_id}/toolkitslist_agent_toolkitsList toolkits granted to an agent.
POST/agents/{agent_id}/toolkitsadd_agent_toolkitGrant a toolkit (bundle of tools/MCP servers) to an agent.
DELETE/agents/{agent_id}/toolkits/{toolkit_id}remove_agent_toolkitRevoke a toolkit from an agent.
GET/agents/{agent_id}/repositorieslist_agent_repositoriesList knowledge repositories granted to an agent.
POST/agents/{agent_id}/repositoriesadd_agent_repositoryGrant a knowledge repository (collection of sources) to an agent.
DELETE/agents/{agent_id}/repositories/{repository_id}remove_agent_repositoryRevoke a knowledge repository from an agent.
GET/agents/{agent_id}/skillsetslist_agent_skillsetsList skillsets granted to an agent.
POST/agents/{agent_id}/skillsetsadd_agent_skillsetGrant a skillset (bundle of tools/MCP servers/skills) to an agent.
DELETE/agents/{agent_id}/skillsets/{skillset_id}remove_agent_skillsetRevoke a skillset from an agent.
GET/agents/{agent_id}/knowledge-kindsget_agent_context_kindsWhat the agent draws on, in eight kinds: its knowledge by kind
GET/agents/{agent_id}/memorylist_agent_memoryReturn all persisted memory entries for this agent.
DELETE/agents/{agent_id}/memory/{memory_id}delete_agent_memory_itemDelete a single memory entry for this agent.
DELETE/agents/{agent_id}/memoryclear_agent_memoryClear all memory entries for this agent.
GET/agents/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/agents/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /agents

List agents. `workspace lists one workspace's (app/services/workspace.py`), and naming nothing is Personal; the older ownerorganisationid / ownerprojectid list exactly an org's or project's (membership verified).

A workspace's listing, and the personal one, also carry CHAINR Bot (`is_system`), first, so every picker that lists "my agents" offers it without a second call.

GET /agents/cost-profiles

The cost profiles an agent may run under: how much pipeline work each turn does, and whether the platform has measured it. With `agent_id`, each profile that uses a lighter model says which one that agent would use in this workspace, or why none.

GET /agents/{agent_id}/generated-resources

List resources created by this agent's generative setup.

Used by the delete flow to offer cascading deletion of AI-generated child dependencies.

GET /agents/{agent_id}/commands

The chat commands this agent's chat offers.

Each comes with what it can target in `workspace (app/services/chat_commands.py): the vocabulary fe-core's command palette completes a typed /` from.

DELETE /agents/{agent_id}

Delete an agent and its assignments, conversations, and svc-ai memory.

With `delete_generated=true`, resources created by this agent's generative setup (skills, knowledge bases, repositories, workers, rules) are deleted in the same transaction instead of being left orphaned.

POST /agents/{agent_id}/prompt

One turn with the agent, governed by the rules of `workspace` — the one the caller is working in, which must hold the agent — or, with none, the agent's own.

GET /agents/{agent_id}/effective-tools

Return the tool set available to this agent at runtime.

Every agent gets svc-ai's general built-ins — they are platform capabilities, not grants, so this is the same list for every agent and is read from the registry rather than from any per-agent configuration.

specialist stays in the response and stays empty. The two specialist built-ins are knowledge-base connectors, bound by a knowledge grant rather than named here, and the Tool rows this key used to report never reached an invocation at all. An agent's tools beyond the general set come from its knowledge and its MCP servers, each of which has its own endpoint.

POST /agents/{agent_id}/repositories

Grant a knowledge repository (collection of sources) to an agent.

A grant is a reference — the agent reads through the repository — so a platform-managed one (the CHAIN-R User Guide, News) may be granted to the caller's own agent. The agent itself is still checked for writing.

GET /agents/{agent_id}/knowledge-kinds

What the agent draws on, in eight kinds: its knowledge by kind (Domain, Temporal, Reasoning), and what each of the other five comes from — skills, the conversation, memory and the decision record, tools, rules and instructions — with where to change each. Its memory is counted for the caller alone, and its rules are the ones the engine applies to it in this workspace.


/budgets · App - Budgets

Source: modules/svc-core/app/router/app/budgets/router.py

MethodPathHandlerDescription

GET /budgets

Every budget governing the request's workspace, worst first, the platform allowance it counts against, and the workspace's month so far, last month and forecast.


/conversations · App - Conversations

Source: modules/svc-core/app/router/app/conversations/router.py

MethodPathHandlerDescription
GET/conversations/{conversation_id}get_conversationGet a single conversation by ID, scoped to the current user.
GET/conversations/{conversation_id}/messages/{message_id}/documents/{index}.pdfdownload_message_documentThe `index`-th document in an answer, as a PDF.
GET/conversations/{conversation_id}/messages/{message_id}/images/{asset}message_document_imageAn image a document in an answer shows: the copy svc-ai stored when it

GET /conversations

List conversations owned by the current user, optionally filtered by agent or model — and by `workspace`, the one they were had in. A conversation stays its person's wherever it was had.

GET /conversations/{conversation_id}/messages/{message_id}/documents/{index}.pdf

The `index`-th document in an answer, as a PDF.

Rendered from the stored message — the ``document fence svc-ai's render_document` tool put there — never from anything sent with the request. Only the conversation's owner can download it.

GET /conversations/{conversation_id}/messages/{message_id}/images/{asset}

An image a document in an answer shows: the copy svc-ai stored when it made the document, so the image's own site never sees who is reading. Only an image a document in that answer names, for the conversation's owner. The URL names the bytes (their hash), so it never changes.


/dashboards · App - Dashboards

Source: modules/svc-core/app/router/app/dashboards/router.py

MethodPathHandlerDescription
GET/dashboards/message-listslist_message_listsEvery saved-messages widget on the request workspace's own boards.
GET/dashboardslist_dashboardsThe caller's boards — and, with `include_system`, the built-in boards
GET/dashboards/{dashboard_id}get_dashboardRead a board, queueing a refresh for any dynamic widget gone stale.
POST/dashboardscreate_dashboardCreate a board, optionally seeded with widgets from a template.
PATCH/dashboards/{dashboard_id}update_dashboard
DELETE/dashboards/{dashboard_id}delete_dashboard
POST/dashboards/{dashboard_id}/homeset_home_dashboardMake this the owner's home board, demoting whichever held the flag.
POST/dashboards/{dashboard_id}/widgetsadd_widgetAdd a tile. Dynamic tiles generate their first result immediately.
PATCH/dashboards/{dashboard_id}/widgets/{widget_id}update_widgetEdit a tile. Changing a dynamic tile's config regenerates its result.
DELETE/dashboards/{dashboard_id}/widgets/{widget_id}delete_widget
PUT/dashboards/{dashboard_id}/layoutsave_layoutPersist the whole grid in one write after a drag or resize.
POST/dashboards/{dashboard_id}/widgets/{widget_id}/refreshrefresh_widget_nowForce a dynamic tile to regenerate, ignoring its interval.
GET/dashboards/{dashboard_id}/widgets/{widget_id}/document.pdfdownload_widget_documentThe tile's latest answer as a PDF. `index` picks among the
GET/dashboards/{dashboard_id}/widgets/{widget_id}/images/{asset}widget_document_imageAn image a document in the tile's latest answer shows — the copy
POST/dashboards/{dashboard_id}/widgets/{widget_id}/itemssave_itemSave a chat message into a saved-messages widget.
DELETE/dashboards/{dashboard_id}/widgets/{widget_id}/items/{item_id}delete_itemRemove one saved message from a list.
GET/dashboards/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/dashboards/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /dashboards/message-lists

Every saved-messages widget on the request workspace's own boards.

Powers the "save to dashboard" picker in chat: one request, flat, rather than a board fetch per board. A chat in an organisation offers its boards, never the person's personal ones, nor a parent's inherited ones (read-only in a project).

GET /dashboards

The caller's boards — and, with `include_system`, the built-in boards after them, in their declared order.

Opt-in, as for agents and rules: the Overview counts "your boards" from this listing. Only the personal listing offers them.

GET /dashboards/{dashboard_id}

Read a board, queueing a refresh for any dynamic widget gone stale.

A built-in board is readable by everyone, and anyone's view may queue its stale tiles: those cache only what belongs to nobody, and a claimed tile is not queued twice (`refresh.mark_refreshing`).

POST /dashboards

Create a board, optionally seeded with widgets from a template.

Also the landing point for a reviewed generation proposal: when the body carries a `generation_id`, the board is stamped as generated and the run is marked applied, so a generated board is distinguishable from a hand-built one and resolves back to the description that produced it.

POST /dashboards/{dashboard_id}/home

Make this the owner's home board, demoting whichever held the flag.

Both writes land in one transaction — the partial unique index would reject the promotion otherwise.

PUT /dashboards/{dashboard_id}/layout

Persist the whole grid in one write after a drag or resize.

Placements for widgets on another board are ignored rather than rejected, so a stale client cannot move tiles it should not see.

POST /dashboards/{dashboard_id}/widgets/{widget_id}/refresh

Force a dynamic tile to regenerate, ignoring its interval.

Refreshing is using the board, so a reader may; but not a built-in board, whose cached tiles are shared by every user and whose refresh spends the platform's money.

GET /dashboards/{dashboard_id}/widgets/{widget_id}/document.pdf

The tile's latest answer as a PDF. `index` picks among the documents it holds.

GET /dashboards/{dashboard_id}/widgets/{widget_id}/images/{asset}

An image a document in the tile's latest answer shows — the copy svc-ai stored when it made the document, and only one that document names.

POST /dashboards/{dashboard_id}/widgets/{widget_id}/items

Save a chat message into a saved-messages widget.

Newest first, trimmed to the widget's `max_items` so a list a user keeps saving into stays a readable tile rather than growing without bound.


/decisions · App - Decisions

Source: modules/svc-core/app/router/app/decisions/router.py

MethodPathHandlerDescription
POST/decisions/{invocation_id}/outcomerecord_outcomeGive the turn a verdict: accepted, edited (with the corrected text)
POST/decisions/{invocation_id}/caseadd_to_datasetAdd the turn to a dataset as a case — the flywheel. Its verdict

GET /decisions/{invocation_id}

Everything one answer or skill run recorded: what was asked, what came back, the configuration that answered, every rule that ran, the quality check, human input, review flags, steps, model and tool calls, and cost. A section the turn did not record says so (`status`).

`access` says why the caller may read it. 404 for an id no turn has, and for a turn the caller neither had nor reviews alike, so the endpoint does not say whose turns exist. A reviewer's read is logged first; 503 when it cannot be, and nothing is served.

POST /decisions/{invocation_id}/outcome

Give the turn a verdict: accepted, edited (with the corrected text) or rejected, with an optional business-outcome label and note. A changed mind is a new verdict; the newest is the turn's. 422 for an edit with no correction or text past its limit.

POST /decisions/{invocation_id}/case

Add the turn to a dataset as a case — the flywheel. Its verdict decides the label: an accepted answer or a correction becomes the reference answer, a rejected answer an example graded 0. Personal data is redacted unless `redact_pii is off, and redacted says what was. The case names the turn (source_invocation_id`), and the dataset takes a new version as for any case added. 409 when the turn has no verdict yet.


/evaluations · App - Evaluations

Source: modules/svc-core/app/router/app/evaluations/router.py

MethodPathHandlerDescription
GET/evaluations/experimentslist_experiments
GET/evaluations/experiments/{experiment_id}get_experiment
POST/evaluations/experimentscreate_experimentCreate an evaluation: one dataset, one scorer, its variants.
PATCH/evaluations/experiments/{experiment_id}update_experiment
DELETE/evaluations/experiments/{experiment_id}delete_experiment
GET/evaluations/experiments/{experiment_id}/variantslist_variants
POST/evaluations/experiments/{experiment_id}/variantscreate_variant
GET/evaluations/presetslist_presetsEvery preset, with its parameters — the whole of the preset form.
POST/evaluations/experiments/{experiment_id}/presets/{preset_key}apply_presetExpand a preset into variants, and say what a run would then cost.
PATCH/evaluations/experiments/{experiment_id}/variants/{variant_id}update_variant
DELETE/evaluations/experiments/{experiment_id}/variants/{variant_id}delete_variant
GET/evaluations/experiments/{experiment_id}/runslist_experiment_runs
GET/evaluations/test-suiteslist_test_suitesThe caller's datasets, or an organisation's or project's.
GET/evaluations/test-suites/{suite_id}get_test_suite
POST/evaluations/test-suitescreate_test_suite
PATCH/evaluations/test-suites/{suite_id}update_test_suite
DELETE/evaluations/test-suites/{suite_id}delete_test_suite
POST/evaluations/test-suites/{suite_id}/copycopy_test_suiteA dataset of the caller's own with the source's criteria, pass mark
GET/evaluations/test-suites/{suite_id}/caseslist_test_cases
POST/evaluations/test-suites/{suite_id}/casescreate_test_case
PATCH/evaluations/test-suites/{suite_id}/cases/{case_id}update_test_case
DELETE/evaluations/test-suites/{suite_id}/cases/{case_id}delete_test_case
GET/evaluations/test-suites/{suite_id}/evaluationslist_suite_evaluationsThe evaluations of the request's workspace that run this dataset —
GET/evaluations/test-suites/{suite_id}/bestbest_on_suiteEvery variant's result from each experiment's newest completed run on
GET/evaluations/test-suites/{suite_id}/runslist_suite_runsEvery run that asked this dataset, across evaluations, newest first.
GET/evaluations/test-suites/{suite_id}/versionslist_suite_versionsEach stretch of history over which the dataset's cases and criteria
GET/evaluations/test-suites/{suite_id}/versions/{version}get_suite_versionWhat a content version asked: its criteria and its cases in full.
GET/evaluations/scorerslist_scorersDescribe every scorer the runner can apply, for the UI's scorer picker.
POST/evaluations/comparecompare_targetsSend the same prompt to up to six models/agents and return every output.
POST/evaluations/experiments/{experiment_id}/runrun_experimentQueue a batch evaluating every selected variant on identical inputs.
POST/evaluations/agents/{agent_id}/evaluateevaluate_agentOne step from Assurance or an agent's page to evidence about it.
GET/evaluations/experiments/{experiment_id}/batcheslist_experiment_batchesEvery batch this experiment has run, newest first.
POST/evaluations/experiments/{experiment_id}/batches/{batch_id}/cancelcancel_experiment_batchMark a batch cancelled; the runner stops between chunks and keeps the
DELETE/evaluations/experiments/{experiment_id}/runsdelete_experiment_runs
POST/evaluations/experiments/{experiment_id}/optimiseoptimise_experimentIteratively rewrite a variant's prompt, keeping whatever scores best.
GET/evaluations/experiments/{experiment_id}/optimisationget_optimisation
POST/evaluations/experiments/{experiment_id}/optimisation/cancelcancel_optimisation
POST/evaluations/experiments/{experiment_id}/variants/{variant_id}/promotepromote_variantAdopt a winning prompt as the agent's system prompt.
GET/evaluations/experiments/{experiment_id}/variants/{variant_id}/promotion-checkcheck_promotionThe gate's verdict ahead of the decision.
GET/evaluations/experiments/{experiment_id}/batches/{batch_id}/resultslist_batch_resultsThe scored cells of one run.
GET/evaluations/experiments/{experiment_id}/batches/{batch_id}/regressionget_batch_regressionExplain how this run differs from its baseline, case by case.
GET/evaluations/reports/batchesreport_batchesOne row per completed batch, with the figures a comparison needs.
GET/evaluations/assuranceevaluation_assuranceWhich agents have evidence behind the version now in force.
GET/evaluations/benchmarkplatform_benchmarkThe same for every user: per gold dataset (or one, with
GET/evaluations/reports/summaryreport_summaryAggregated in SQL over every matching batch, not over a listed page.
GET/evaluations/regression/metricslist_regression_metricsDescribe every tracked metric, for the UI and for tolerance tuning.
POST/evaluations/test-suites/{suite_id}/cases/importimport_test_casesTurn a pasted dataset into test cases.
GET/evaluations/experiments/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/evaluations/experiments/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).
GET/evaluations/test-suites/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/evaluations/test-suites/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

POST /evaluations/experiments

Create an evaluation: one dataset, one scorer, its variants.

The dataset comes from exactly one of three places — an existing `dataset_id, inline cases that make a dataset of the same name alongside, or a Quick try comparison_id` whose case, scorer and variants are derived from what actually ran and whose results become the first run. Everything lands in one transaction, so a failure cannot leave half an evaluation behind, and the created version already lists its variants.

`response_model is not decoration. The session expires every attribute on commit, and a row returned bare after the version commit serialised as {} — the client got a 201 with no id and built its next request on undefined`. The schema reads the columns back explicitly.

GET /evaluations/presets

Every preset, with its parameters — the whole of the preset form.

A registry like the scorers: the form holds no list of presets, so a new one is a class in `services/evaluation/presets.py` and nothing else.

POST /evaluations/experiments/{experiment_id}/presets/{preset_key}

Expand a preset into variants, and say what a run would then cost.

`dry_run` (the default) writes nothing: it answers the variants that would be made and the calls a run of the experiment would then make, so the cost is read before it is committed to. Otherwise the variants are written in one transaction with one version of the experiment — a preset is one edit, not twelve.

Every id is checked before anything is written — models exist, agents are the caller's to use, knowledge is reachable from the experiment's owner — and a setting the model would silently drop is refused with the reason.

GET /evaluations/test-suites

The caller's datasets, or an organisation's or project's.

`include_system` adds the gold datasets to the personal listing — the Datasets page's Built-in section and the pickers that choose a dataset. Opt-in, so every count built on this listing stays the user's own unless the caller asks otherwise (the pattern skillsets and knowledge follow).

POST /evaluations/test-suites/{suite_id}/copy

A dataset of the caller's own with the source's criteria, pass mark and every case — the way to build on a gold dataset, which cannot itself be edited.

The copy is independent: later releases of the source do not reach it, and its runs are its own (they never compare with runs of the source, which is a different dataset). Where it came from, and which version, is recorded in its `config` and in its first version.

GET /evaluations/test-suites/{suite_id}/evaluations

The evaluations of the request's workspace that run this dataset — a built-in dataset is run from every workspace, and each lists its own.

GET /evaluations/test-suites/{suite_id}/best

Every variant's result from each experiment's newest completed run on one dataset version — grouped by how it was graded, ranked, and marked where it is the best value (`services/evaluation/best.py`).

The version defaults to the latest content version: an earlier one asked different questions, so its runs are read by asking for it.

GET /evaluations/test-suites/{suite_id}/runs

Every run that asked this dataset, across evaluations, newest first.

The same rows the cross-evaluation report answers with, filtered to one dataset — not a run list the dataset owns. `dataset_version narrows to the runs that asked one content version (GET .../versions); unversioned` to the runs made before the dataset had any history.

GET /evaluations/test-suites/{suite_id}/versions

Each stretch of history over which the dataset's cases and criteria held still, with how many of the caller's runs asked it.

Runs compare only within one of these, and a dataset always runs at the latest; an older one is how a reader looks back at what earlier runs asked. Metadata edits (a rename, a status change) extend a version rather than starting one — `through_version` is the last history version in it.

GET /evaluations/test-suites/{suite_id}/versions/{version}

What a content version asked: its criteria and its cases in full.

`cases` is null for a version recorded before datasets kept their cases in full — the history row names them but did not keep what they said.

GET /evaluations/scorers

Describe every scorer the runner can apply, for the UI's scorer picker.

The picker renders entirely from this: labels, when-to-use lines, how each score is computed, what each needs from the dataset, and the settings to show. A scorer added to `app/services/evaluation/scorers.py` therefore appears fully explained with no frontend release — the same contract the rule and widget catalogues have.

POST /evaluations/compare

Send the same prompt to up to six models/agents and return every output.

The scratchpad a user reaches for before deciding a comparison is worth keeping. The outcomes are recorded as an unowned batch under the returned `comparison_id; POST /experiments with that id adopts them as the new evaluation's first run, and unsaved comparisons are purged after quick_try.RETENTION_HOURS`. Nothing appears in any list until saved.

POST /evaluations/experiments/{experiment_id}/run

Queue a batch evaluating every selected variant on identical inputs.

Validation (dataset resolvable, variants present, every target buildable) happens here so a misconfigured experiment fails visibly at request time rather than in a background task the caller never sees.

POST /evaluations/agents/{agent_id}/evaluate

One step from Assurance or an agent's page to evidence about it.

Per dataset: the experiment an earlier Evaluate made (or a new one, named "<agent> · <dataset>", LLM-judged with the default judge, one variant running the agent as configured), and a run of it. The experiment lives where the agent's evidence is read, so the result counts on Assurance and for the evidence gate — creating it there takes the same access as creating any evaluation there. A dataset whose experiment is already running is reported, not run twice.

GET /evaluations/experiments/{experiment_id}/batches

Every batch this experiment has run, newest first.

Read from `experiment_batches` rather than from the experiment's config blob, so the list is the whole history rather than the twenty most recent — and so the same rows can be reported on across experiments.

POST /evaluations/experiments/{experiment_id}/batches/{batch_id}/cancel

Mark a batch cancelled; the runner stops between chunks and keeps the results it has already produced.

POST /evaluations/experiments/{experiment_id}/optimise

Iteratively rewrite a variant's prompt, keeping whatever scores best.

Each round's candidates are saved as ordinary variants, so the search is inspectable — and abandonable — with the same UI as a hand-built experiment.

POST /evaluations/experiments/{experiment_id}/variants/{variant_id}/promote

Adopt a winning prompt as the agent's system prompt.

This is what closes the loop: without it, a better prompt found by an experiment or an optimisation run has to be copied across by hand. The gate is what stops the loop closing in the wrong direction.

GET /evaluations/experiments/{experiment_id}/variants/{variant_id}/promotion-check

The gate's verdict ahead of the decision.

Separate from the promote call so the UI can warn before somebody clicks, rather than letting them commit to an action and then refusing it.

GET /evaluations/experiments/{experiment_id}/batches/{batch_id}/regression

Explain how this run differs from its baseline, case by case.

Computed on read rather than served from the row: the run carries only the headline verdict, and recomputing means runs recorded before regression detection existed still report, and an evaluation whose tolerances were retuned reports against the tolerances in force now.

GET /evaluations/reports/batches

One row per completed batch, with the figures a comparison needs.

This is what batches moving into their own table bought: "every batch in this project since Monday that scored below 0.7" is one query, where before it meant loading every experiment and walking a JSON array in Python.

`include_unfinished adds queued, running, failed and cancelled batches, each carrying its status. That is for the activity feed, which lists runs as events: a run that failed is the one it must not leave out. offset` is how that feed pages to older runs.

GET /evaluations/assurance

Which agents have evidence behind the version now in force.

Per agent: `current (a completed run evaluated this version), outdated (only an older version was evaluated), unrecorded (runs predate version recording), never, or regressed` (its latest run regressed). The same scope rules as the reports: the experiments read are the ones the report endpoints would read, and the agents are the ones in the same owner scope.

GET /evaluations/benchmark

The same for every user: per gold dataset (or one, with `dataset_id`), each target's newest result on the dataset's current content version against its pass mark, and CHAINR Bot's runs over time. Nothing here is the caller's, so nothing is scoped to them.

GET /evaluations/regression/metrics

Describe every tracked metric, for the UI and for tolerance tuning.

Served from the registry, so a metric added in `app/services/evaluation/regression.py` appears here with no frontend release — the same contract the scorer and widget catalogues have.

POST /evaluations/test-suites/{suite_id}/cases/import

Turn a pasted dataset into test cases.

Building a suite one case at a time through a modal is the main reason benchmarking never gets used; a paste box removes that.

Answers the created cases and `ignored`: every field the import could not use, why, and on which cases — so a file written for another tool says what it lost on the way in instead of losing it silently.


/favicons · App - Site icons

Source: modules/svc-core/app/router/app/favicons/router.py

MethodPathHandlerDescription

GET /favicons/{domain}

A cited site's icon, fetched and cached by the platform.

Replaces loading icons from a third-party service, which told that service every domain a user opened a citation for. 404 when the site has no usable icon — the client shows a generic one.


/files · App - Files

Source: modules/svc-core/app/router/app/files/router.py

MethodPathHandlerDescription
GET/fileslist_filesThe request workspace's documents, newest first, each with who
GET/files/{file_id}get_fileOne document, and how far reading its text has got.
GET/files/{file_id}/contentdownload_fileThe document as it was uploaded, to save or open — for anyone who can
DELETE/files/{file_id}delete_fileDelete a document — its uploader (a writer of Knowledge) or an editor,
GET/files/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/files/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

POST /files/upload

Upload a single file into the request workspace's library.

The file is kept as it came (`uploads.object_key) and its text is read after answering (uploads.read). Returns a file_id that a chat in the workspace passes instead of re-uploading, once GET /files/{id} says it is ready`.

It was read before answering, and docling takes minutes on a long PDF: the request outlived svc-bff's 20 s and Cloudflare's 100 s, and a document that could not be read was stored empty, for a chat to attach as a blank.

GET /files

The request workspace's documents, newest first, each with who uploaded it and whether the caller may delete it.

GET /files/{file_id}

One document, and how far reading its text has got.

A chat asks until it is `ready, or says why it failed`. One the caller cannot see is "not found".

GET /files/{file_id}/content

The document as it was uploaded, to save or open — for anyone who can attach it. Served as the person's bytes, not the platform's: a download, sandboxed, its type read from its name.

DELETE /files/{file_id}

Delete a document — its uploader (a writer of Knowledge) or an editor, in a shared workspace. Its history stays, without the text; its stored original goes with it.

One the caller cannot see is "not found", never "forbidden": its existence is another workspace's business. One they can see but may not delete is a 403 that says why.


/generations · App - Generations

Source: modules/svc-core/app/router/app/generations/router.py

MethodPathHandlerDescription
GET/generations/{generation_id}get_generationOne invocation, its exact arguments, and what it produced.

GET /generations

The caller's generative invocations in the request's workspace, newest first.

GET /generations/{generation_id}

One invocation, its exact arguments, and what it produced.

`produced is derived from the version trail rather than from a join table: every resource a run created has a created` version carrying the run's id, so the audit trail is the index. That also means a resource deleted since still appears here, which is the point.


/invites · App - Invites

Source: modules/svc-core/app/router/app/invites/router.py

MethodPathHandlerDescription
POST/invites/acceptinvite_acceptJoin the organisation or project the link is for, with its role.

/knowledge · App - Knowledge Bases

Source: modules/svc-core/app/router/app/knowledge/router.py

MethodPathHandlerDescription
GET/knowledgeknowledge_listThe caller's knowledge bases, or an organisation's or project's.
GET/knowledge/{knowledge_id}knowledge_idA source, and whether the caller may change it here (`can_change`):
DELETE/knowledge/{knowledge_id}delete_knowledgeDelete a source with everything it holds: its documents, pages and
POST/knowledge/{knowledge_id}/searchsearch_knowledgeSearch one knowledge base with svc-ai's context-rich retrieval pipeline.
POST/knowledge/newnew_knowledge
PUT/knowledge/{knowledge_id}/editedit_knowledge
GET/knowledge/{knowledge_id}/documentslist_knowledge_documentsList all documents associated with a knowledge base.
POST/knowledge/{knowledge_id}/documents/{document_id}/reindexreindex_knowledge_documentRe-run parse → embed → index for one document (from its stored file).
POST/knowledge/{knowledge_id}/reindexreindex_knowledgeRe-run indexing for every document in the knowledge base.
POST/knowledge/{knowledge_id}/documents/uploadupload_knowledge_documentsUpload one or more documents to a knowledge base, stored in MinIO and indexed in Qdrant.
POST/knowledge/{knowledge_id}/documents/from-urlimport_knowledge_documentsAdd documents to a file source by their links — a PDF, an office or a
GET/knowledge/{knowledge_id}/documents/{document_id}/previewpreview_knowledge_documentStream a document from MinIO for inline browser preview.
GET/knowledge/{knowledge_id}/documents/{document_id}/downloaddownload_knowledge_documentStream a document from MinIO back to the client as a file download.
PATCH/knowledge/{knowledge_id}/documents/{document_id}/movemove_knowledge_documentMove a document to a different folder within the same knowledge base.
DELETE/knowledge/{knowledge_id}/documents/{document_id}delete_knowledge_documentDelete a document from the knowledge base and remove it from MinIO.
GET/knowledge/{knowledge_id}/graphget_knowledge_graphReturn all nodes and edges for a graph knowledge base.
POST/knowledge/{knowledge_id}/graph/savesave_knowledge_graphFull-replace the graph for a knowledge base.
POST/knowledge/{knowledge_id}/web/crawlcrawl_web_sourceCrawl a website source now, instead of waiting for its cadence.
GET/knowledge/{knowledge_id}/web/crawlslist_web_crawlsA website source's crawls, newest first.
GET/knowledge/{knowledge_id}/web/crawls/{crawl_id}/pagesget_web_crawl_pagesThe source as one crawl left it: each page's version in force after
GET/knowledge/{knowledge_id}/web/pageslist_web_pagesEvery page a website source has stored, as of its most recent crawl.
GET/knowledge/{knowledge_id}/web/graphget_web_link_graphThe link graph of a website source: its stored pages, and which links
GET/knowledge/{knowledge_id}/web/pages/{document_id}/versionslist_web_page_versionsEvery stored snapshot of one page, newest first.
GET/knowledge/{knowledge_id}/web/pages/{document_id}/versions/{version_id}get_web_page_versionOne snapshot, with the text that was indexed from it.
GET/knowledge/{knowledge_id}/web/pages/{document_id}/versions/{version_id}/previewpreview_web_page_htmlA snapshot's HTML, sanitised for the sandboxed preview.
GET/knowledge/{knowledge_id}/web/pages/{document_id}/versions/{version_id}/htmldownload_web_page_htmlThe page exactly as the site served it, as a download.
GET/knowledge/{knowledge_id}/web/pages/{document_id}/diffdiff_web_page_versionsWhat changed on a page between two snapshots.
GET/knowledge/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/knowledge/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /knowledge

The caller's knowledge bases, or an organisation's or project's.

`include_system adds the platform's read-only ones (the CHAIN-R User Guide), so a view of an agent's granted repositories can name every source in them. Opt-in, for the reason list_repositories` gives.

GET /knowledge/{knowledge_id}

A source, and whether the caller may change it here (`can_change`): what the page asks before it offers edit, upload, Find sources or delete. False for a built-in, for what a project inherits or is required, and for a level that does not allow it.

DELETE /knowledge/{knowledge_id}

Delete a source with everything it holds: its documents, pages and their versions, its index and stored files, and its place in every repository (each of which records the change). Its edit history stays.

Its own workspace's to delete (`verify_change_here`): an editor of Knowledge, or the writer who created it; never a built-in, nor a source a project inherits. A 409 while a crawl is writing to it.

POST /knowledge/{knowledge_id}/search

Search one knowledge base with svc-ai's context-rich retrieval pipeline.

Returns ranked passages with document / page / chunk provenance (or graph facts for graph KBs), citations and the rendered context an agent would receive for this query.

POST /knowledge/{knowledge_id}/reindex

Re-run indexing for every document in the knowledge base.

`only_failed=true` limits it to documents that are not currently indexed (failed, pending, not_indexed or unknown). A document still importing from its link is left to its import either way: a second one would download and index it twice.

POST /knowledge/{knowledge_id}/documents/from-url

Add documents to a file source by their links — a PDF, an office or a text document. svc-ai downloads each one in the background; every link is a document row at once (`importing), which says when it is indexed or why it could not be had (knowledge/imports.py`).

POST /knowledge/{knowledge_id}/graph/save

Full-replace the graph for a knowledge base. Updates nodecount / edgecount in source_config after persisting.

POST /knowledge/{knowledge_id}/web/crawl

Crawl a website source now, instead of waiting for its cadence.

Returns the running crawl at once; poll `/web/crawls for its outcome. 409 while another crawl of the same source is running; 403 when the source's workspace's budget is used up (budgets.gate`).

GET /knowledge/{knowledge_id}/web/crawls/{crawl_id}/pages

The source as one crawl left it: each page's version in force after that crawl beside its newest, and what the crawl itself stored.

GET /knowledge/{knowledge_id}/web/graph

The link graph of a website source: its stored pages, and which links to which. Built from the pages' stored records; fetches nothing.

GET /knowledge/{knowledge_id}/web/pages/{document_id}/versions/{version_id}/preview

A snapshot's HTML, sanitised for the sandboxed preview.

Returned as JSON — data, never a document — so nothing here is ever rendered on this origin. fe-core renders `html` in a sandboxed, network-blocked frame; the allow-list sanitiser is the first of those three layers (services/knowledge/html_preview.py).

GET /knowledge/{knowledge_id}/web/pages/{document_id}/versions/{version_id}/html

The page exactly as the site served it, as a download.

Never rendered: it is somebody else's HTML, and inline on this origin it would run as the viewer. An attachment, sandboxed, and not sniffable.

GET /knowledge/{knowledge_id}/web/pages/{document_id}/diff

What changed on a page between two snapshots.

`to_version defaults to the newest, from_version` to the one before it; the first snapshot diffs against nothing, so all of it is added.


/mcp_servers · App - MCP Servers

Source: modules/svc-core/app/router/app/mcp_servers/router.py

MethodPathHandlerDescription
GET/mcp_serverslist_mcp_serversList all MCP servers owned by the current user.
GET/mcp_servers/{server_id}get_mcp_server
POST/mcp_serverscreate_mcp_server
PATCH/mcp_servers/{server_id}update_mcp_server
DELETE/mcp_servers/{server_id}delete_mcp_server
POST/mcp_servers/{server_id}/probeprobe_serverTest the server's connection via svc-ai and refresh its tools_cache.
GET/mcp_servers/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/mcp_servers/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

POST /mcp_servers/{server_id}/probe

Test the server's connection via svc-ai and refresh its tools_cache.

Returns {"ok", "tools", "error"} straight from svc-ai's probe. On a successful probe the discovered tool names are persisted to `tools_cache` so the UI can show real capabilities instead of the template preview; a failed probe leaves the cache untouched.


/models · App - Models

Source: modules/svc-core/app/router/app/models/router.py

MethodPathHandlerDescription
GET/modelsget_modelsList all models from svc-ai's canonical registry.
GET/models/{model_id}get_model_by_idFetch a single model by its svc-ai UUID.
POST/models/{model_id}/promptmodel_promptPrompt a model directly. modelid is the svc-ai llmmodels UUID.

GET /models

List all models from svc-ai's canonical registry.

`include_archived` adds the models taken out of it, so a page can name the model an old conversation or trace ran on.

POST /models/{model_id}/prompt

Prompt a model directly. modelid is the svc-ai llmmodels UUID. Conversation history is persisted locally in svc-core.

A plain `def: it runs in a worker thread, which a client that goes away cannot cancel, so the answer is stored either way. The turn is in the registry of running turns while it runs (app/services/turns.py): a page that comes back sees it, and POST /app/turns/{id}/stop — by the request's turn_id` — ends it, keeping what it had written.


/network · App - Network

Source: modules/svc-core/app/router/app/network/router.py

MethodPathHandlerDescription
GET/network/memoryget_memory_graphAgents → the conversations they remember → the newest `recent`

GET /network/knowledge

Agents → the repositories granted to them → the sources inside, with each agent's memory beside it. `agent_id narrows to those agents and what they reach; include_unconnected` false leaves out repositories and sources no agent reaches.

`knowledge_id draws where those sources are used instead: the workspace's repositories holding them and its agents granted those (load_source_network`), each source read-checked first.

GET /network/memory

Agents → the conversations they remember → the newest `recent entries each. Without agent_id`, every agent of the caller's that remembers anything.


/notifications · App - Notifications

Source: modules/svc-core/app/router/app/notifications/router.py

MethodPathHandlerDescription
POST/notifications/{notification_id}/readread_notificationMark one of the caller's notifications read. Someone else's reads as
POST/notifications/read-allread_all_notificationsMark every one of the caller's notifications read.

POST /notifications/{notification_id}/read

Mark one of the caller's notifications read. Someone else's reads as not found.


/organisations · App - Organisations

Source: modules/svc-core/app/router/app/organisations/router.py

MethodPathHandlerDescription
GET/organisations/id/{id}organisation_id
POST/organisations/organisation_create
PUT/organisations/id/{id}organisation_update
DELETE/organisations/id/{id}organisation_delete
GET/organisations/id/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/organisations/id/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).
GET/organisations/id/{id}/memberslist_membersEveryone in it, with their role (mounted by registermembershiproutes).
PATCH/organisations/id/{id}/members/{user_id}update_memberChange a member's role (mounted by registermembershiproutes).
DELETE/organisations/id/{id}/members/{user_id}remove_memberRemove a member, or leave (mounted by registermembershiproutes).
GET/organisations/id/{id}/inviteslist_invitesIts invites, newest first (mounted by registermembershiproutes).
POST/organisations/id/{id}/invitescreate_inviteMake an invite link for one email address (mounted by registermembershiproutes).
DELETE/organisations/id/{id}/invites/{invite_id}revoke_inviteWithdraw a pending invite (mounted by registermembershiproutes).

GET /organisations

The caller's organisations, each with their role in it — so a form can offer an organisation as an owner only where the caller may write what it would create (an organisation's rules are its admins').


/ownership · App - Ownership

Source: modules/svc-core/app/router/app/ownership/router.py

MethodPathHandlerDescription
POST/ownership/moveownership_moveMove it, and the personal work it depends on, as the preview listed.
POST/ownership/copyownership_copyCopy an agent, skill, skillset, rule, dataset or dashboard into a

POST /ownership/copy

Copy an agent, skill, skillset, rule, dataset or dashboard into a workspace as an editable copy of its own (`app/services/copying.py`): from a project's parent into the project, or within one workspace. What a copied agent uses comes along by reference — the project inherits it.


/projects · App - Projects

Source: modules/svc-core/app/router/app/projects/inheritance/router.py

MethodPathHandlerDescription
GET/projects/{project_id}/inheritance/candidatesinheritance_candidatesThe parent's resources of `kind` this project could inherit — what
POST/projects/{project_id}/inheritancedeclare_inheritanceInherit one of the parent's resources, or every resource of a kind
DELETE/projects/{project_id}/inheritance/{declaration_id}withdraw_inheritanceStop inheriting it. What in the project used it stops reaching it —
GET/projects/{project_id}/inheritance/{declaration_id}/dependentsinheritance_dependentsWhat the project's own work uses of what the declaration brings: its

GET /projects/{project_id}/inheritance

What the project inherits from its parent: each declaration (one resource, or every resource of a kind), and the parent's rules that apply here without one. Any member may read it.

GET /projects/{project_id}/inheritance/candidates

The parent's resources of `kind` this project could inherit — what a declaration picks from — each marked when it already does. Any member may read it, as they may read the parent's work.

POST /projects/{project_id}/inheritance

Inherit one of the parent's resources, or every resource of a kind (no `resource_id`) — which absorbs the kind's single declarations. 422 for a kind that can't be inherited or a built-in (already in every workspace), 404 for a resource the parent doesn't own, 409 when it is already inherited.

DELETE /projects/{project_id}/inheritance/{declaration_id}

Stop inheriting it. What in the project used it stops reaching it — `…/dependents` lists that first.

GET /projects/{project_id}/inheritance/{declaration_id}/dependents

What the project's own work uses of what the declaration brings: its agents granted an inherited repository or skillset, its repositories holding an inherited source, its experiments on an inherited dataset.


/projects · App - Projects

Source: modules/svc-core/app/router/app/projects/router.py

MethodPathHandlerDescription
GET/projects/{project_id}get_project
GET/projectslist_projectsProjects. With `workspace`, the projects of that personal workspace
PATCH/projects/{project_id}update_project
DELETE/projects/{project_id}delete_project
GET/projects/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/projects/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).
GET/projects/{id}/memberslist_membersEveryone in it, with their role (mounted by registermembershiproutes).
PATCH/projects/{id}/members/{user_id}update_memberChange a member's role (mounted by registermembershiproutes).
DELETE/projects/{id}/members/{user_id}remove_memberRemove a member, or leave (mounted by registermembershiproutes).
GET/projects/{id}/inviteslist_invitesIts invites, newest first (mounted by registermembershiproutes).
POST/projects/{id}/invitescreate_inviteMake an invite link for one email address (mounted by registermembershiproutes).
DELETE/projects/{id}/invites/{invite_id}revoke_inviteWithdraw a pending invite (mounted by registermembershiproutes).

GET /projects

Projects. With `workspace`, the projects of that personal workspace or organisation the caller can open: all of them for its admins (and a person's own), the ones they were added to otherwise.


/repositories · App - Repositories

Source: modules/svc-core/app/router/app/repositories/router.py

MethodPathHandlerDescription
GET/repositories/{repository_id}get_repositoryA repository, and whether the caller may change it here
POST/repositoriescreate_repository
PATCH/repositories/{repository_id}update_repository
DELETE/repositories/{repository_id}delete_repository
GET/repositories/{repository_id}/agentslist_repository_agentsThe agents of the request's workspace this repository is granted to.
GET/repositories/{repository_id}/knowledgelist_repository_knowledgeList the knowledge bases (sources) belonging to a repository.
POST/repositories/{repository_id}/searchsearch_repositorySearch every knowledge base in a repository with svc-ai's retrieval
POST/repositories/{repository_id}/knowledgeadd_repository_knowledgeAdd a knowledge base (source) to a repository.
DELETE/repositories/{repository_id}/knowledge/{knowledge_id}remove_repository_knowledgeRemove a knowledge base (source) from a repository.
GET/repositories/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/repositories/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /repositories

The caller's repositories, or an organisation's or project's.

`include_system` adds the platform's read-only repositories (the CHAIN-R User Guide) to the personal listing, for pickers that grant a repository to an agent. Opt-in, so the Knowledge page and every count built on this listing stay the user's own.

GET /repositories/{repository_id}

A repository, and whether the caller may change it here (`can_change`): what the page asks before it offers edit, delete or a change to its sources. False for a built-in, for what a project inherits or is required, and for a level that does not allow it.

GET /repositories/{repository_id}/agents

The agents of the request's workspace this repository is granted to.

What the repository page's "Use in your agents" toggles start from. Only the workspace's own agents, built-in ones excluded: a built-in repository is granted by many workspaces' agents, and which ones is nobody else's business — nor, in an organisation, which of a member's personal ones. Granting and revoking go through the agent's own routes (`POST / DELETE /agents/{id}/repositories`), which version the agent.

POST /repositories/{repository_id}/search

Search every knowledge base in a repository with svc-ai's retrieval pipeline — exactly what an agent granted this repository would see.


/resources/industries · App - Resources/Industries

Source: modules/svc-core/app/router/app/resources/industries/router.py

MethodPathHandlerDescription
GET/resources/industries/id/{industry_id}industry_get

/resources/roles

Source: modules/svc-core/app/router/app/resources/roles/router.py

MethodPathHandlerDescription
GET/resources/roles/id/{role_id}role_get

/resources · App - Resources

Source: modules/svc-core/app/router/app/resources/router.py

MethodPathHandlerDescription

/reviews · App - Reviews

Source: modules/svc-core/app/router/app/reviews/router.py

MethodPathHandlerDescription
GET/reviewslist_reviewsThe queue, newest first — audit rules' flags and regressed evaluation
GET/reviews/{flag_id}get_review
PATCH/reviews/{flag_id}resolve_reviewRecord a reviewer's decision. Terminal — an already-resolved flag is

GET /reviews/summary

Counts per status — the queue header, and a stat widget's source.

Declared before /{flag_id} so the literal path is not parsed as an id.

GET /reviews

The queue, newest first — audit rules' flags and regressed evaluation runs (`kind`) in one list.

`q is a free-text match over the rule name, the reviewer and the excerpt. total` counts everything matching the filters, not the page, so a client can page through the backlog.

PATCH /reviews/{flag_id}

Record a reviewer's decision. Terminal — an already-resolved flag is not re-resolvable, so the recorded decision cannot be overwritten.


/rules · App - Rules

Source: modules/svc-core/app/router/app/rules/router.py

MethodPathHandlerDescription
GET/rules/cataloguerule_catalogue_endpointThe grammar a rule may be written in — fields, operators and actions.
GET/rules/targetsrule_scope_targetsEvery resource the current user may pin a rule to, grouped by scope.
GET/rules/activityrule_activityWhat the rules have actually done, grouped into the message they ran on.
GET/rules/{rule_id}get_ruleA rule, whether the caller may change it here, and whose it is.
POST/rulescreate_rule
PATCH/rules/{rule_id}update_rule
DELETE/rules/{rule_id}delete_rule
GET/rules/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/rules/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /rules

The caller's rules — and, with `include_system`, the built-in rules after them, in the order they are declared.

Opt-in, as for agents and repositories: every count of "your rules" reads this listing, and a built-in governs nobody, so it must not be counted as a rule in force. Only the personal listing offers them; an organisation's or project's rules are that owner's alone.

GET /rules/catalogue

The grammar a rule may be written in — fields, operators and actions.

Served from the backend registries so the visual rule builder offers exactly what the engine can evaluate. Adding a condition field or an action is a class in `app.services.rules`; it appears here, and therefore in the builder, without a frontend release.

Unauthenticated callers never reach this — the whole `/app` surface is session-gated — but the catalogue itself is the same for every user: it describes the engine, not their data.

GET /rules/targets

Every resource the current user may pin a rule to, grouped by scope.

One call instead of the builder fanning out to the agent, model, skill, worker, project and organisation routers — and one place for the rules list to resolve a stored `scope_id` into the name of the thing it governs, so a scoped rule reads as "Support Agent" rather than a UUID.

Unlike `/catalogue this *is* per-user and per-workspace: it lists what the request's workspace holds (Scope.targets`), since a rule governs only invocations made there.

GET /rules/activity

What the rules have actually done, grouped into the message they ran on.

`workspace narrows it to the work done in one workspace — everyone's, for its reviewers (governance_activity.scoped_query`).

The log's reason for existing is the rules that did nothing: an action with nothing to do emits no event, so before this a redaction rule over a clean prompt was indistinguishable from a rule that had never been evaluated. `outcome` separates blocked / applied / ran-and-changed- nothing / conditions-did-not-hold, and the summary counts all four over the filtered set rather than over the page — a header that only counted the rows on screen would answer a different question from the one it appears to.

Returned grouped, and paged by invocation rather than by event. One turn is routinely governed by half a dozen rules across both phases; flat, they interleave with every other agent's traffic, and "what happened to this message?" — the question somebody monitoring a fleet is actually asking — stops being answerable. Paging by row would also cut a turn in half at the page boundary and show a reader half its governance.

Scoped by owner, like the reviewer queue: the row records whose invocation was governed, which is the only scope it can answer on its own.

GET /rules/{rule_id}

A rule, whether the caller may change it here, and whose it is.

`can_change is what a page asks before it offers Edit — the rule's own page, and the note under an answer a Tools rule narrowed, which links straight to a pre-filled edit. A reader who may not is told whose rule it is (home_workspace_name`), so they know where to ask.


/scenario-runs · App - Scenario runs

Source: modules/svc-core/app/router/app/scenario_runs/router.py

MethodPathHandlerDescription
GET/scenario-runslist_scenario_runsThe caller's newest runs, each with its progress and, once finished,
GET/scenario-runs/{run_id}get_scenario_runOne of the caller's runs, as the page polls it while it goes.
POST/scenario-runs/{run_id}/cancelcancel_scenario_runStop the turn running now and start no more; the run then reads
GET/scenario-runs/{run_id}/exportexport_scenario_runThe run's export as a file, as far as it has got.
DELETE/scenario-runs/{run_id}delete_scenario_runDelete a finished run and its project (its agents, and what they

POST /scenario-runs

Validate a scenario file and start running it. 422 names what is wrong with the file; 409 while another of the caller's runs is going.

GET /scenario-runs

The caller's newest runs, each with its progress and, once finished, its summary.

POST /scenario-runs/{run_id}/cancel

Stop the turn running now and start no more; the run then reads `cancelled`, with what it did kept.

DELETE /scenario-runs/{run_id}

Delete a finished run and its project (its agents, and what they remembered). 409 while it runs: cancel it first.


/simulations · App - Simulations

Source: modules/svc-core/app/router/app/simulations/router.py

MethodPathHandlerDescription
GET/simulations/worldslist_worlds
GET/simulations/worlds/{world_id}get_world
POST/simulations/worldscreate_world
PATCH/simulations/worlds/{world_id}update_world
DELETE/simulations/worlds/{world_id}delete_world
GET/simulations/worlds/{world_id}/scenarioslist_scenarios
GET/simulations/worlds/{world_id}/scenarios/{scenario_id}get_scenario
POST/simulations/worlds/{world_id}/scenarioscreate_scenario
PATCH/simulations/worlds/{world_id}/scenarios/{scenario_id}update_scenario
DELETE/simulations/worlds/{world_id}/scenarios/{scenario_id}delete_scenario
GET/simulations/worlds/{world_id}/simulationslist_world_simulations
GET/simulations/worlds/{world_id}/simulations/{simulation_id}get_simulation
POST/simulations/worlds/{world_id}/simulationscreate_simulation
PATCH/simulations/worlds/{world_id}/simulations/{simulation_id}update_simulation
DELETE/simulations/worlds/{world_id}/simulations/{simulation_id}delete_simulation
POST/simulations/worlds/{world_id}/simulations/{simulation_id}/runrun_simulation
GET/simulations/worlds/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/simulations/worlds/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

/skills · App - Skills

Source: modules/svc-core/app/router/app/skills/router.py

MethodPathHandlerDescription
GET/skills/agentsget_agent_definitionsReturn built-in worker agent definitions available for skill graphs.
GET/skillslist_skills_endpointThe caller's skills, or an organisation's or project's.
GET/skills/{skill_id}get_skill
POST/skillscreate_skill
PATCH/skills/{skill_id}update_skill
DELETE/skills/{skill_id}delete_skill
GET/skills/{skill_id}/run-schemaget_run_schemaThe inputs a run of this skill takes: its declared `interface.inputs`
POST/skills/{skill_id}/runsstart_skill_runStart a run. It carries on in the background; poll the run for its
GET/skills/{skill_id}/runslist_skill_runsThe caller's own runs of this skill in the request's workspace,
GET/skills/{skill_id}/runs/{run_id}get_skill_runOne run in full. Only its owner can read it: the skill may be shared,
GET/skills/{skill_id}/runs/{run_id}/document.pdfdownload_skill_run_documentThe run's result as a PDF — rendered from what the run stored, never
GET/skills/{skill_id}/runs/{run_id}/images/{asset}skill_run_document_imageAn image a document in the run's answer shows — the copy svc-ai stored
POST/skills/{skill_id}/runs/{run_id}/respondrespond_to_skill_runAnswer a paused run — approve or reject a gate, or answer its
POST/skills/{skill_id}/runs/{run_id}/cancelcancel_skill_runAbandon a run that is waiting for input.
GET/skills/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/skills/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /skills/agents

Return built-in worker agent definitions available for skill graphs.

Deliberately restricted to builtins: svc-ai's registry is global, so listing custom definitions here would expose other tenants' worker names (cw_*) — enough to reference their workers, and any MCP credentials baked into them, from a foreign skill graph. A user's own custom workers are listed via /app/workers, which returns their `definition_name`.

GET /skills

The caller's skills, or an organisation's or project's.

`include_system adds the skills bundled in the built-in skillsets, so they can be opened, run on their own and bundled into a skillset of the user's. Opt-in for the same reason as GET /skillsets`.

GET /skills/{skill_id}/run-schema

The inputs a run of this skill takes: its declared `interface.inputs` plus whatever its nodes read that nothing in the graph supplies.

POST /skills/{skill_id}/runs

Start a run. It carries on in the background; poll the run for its outcome. Inputs are validated first — a bad one is a 422 naming it.

`workspace` is the one the caller is working in, which must hold the skill; its rules govern the run and its ledger counts it.

GET /skills/{skill_id}/runs

The caller's own runs of this skill in the request's workspace, newest first — a built-in skill run in an organisation is not listed in Personal, nor the other way round.

GET /skills/{skill_id}/runs/{run_id}

One run in full. Only its owner can read it: the skill may be shared, the inputs somebody gave it are not.

GET /skills/{skill_id}/runs/{run_id}/document.pdf

The run's result as a PDF — rendered from what the run stored, never from anything sent with the request. Only a completed run has one. `index` picks among several documents in its answer.

GET /skills/{skill_id}/runs/{run_id}/images/{asset}

An image a document in the run's answer shows — the copy svc-ai stored when it made the document. Only an image a document in that answer names, for the run's owner, once the run has completed.

POST /skills/{skill_id}/runs/{run_id}/respond

Answer a paused run — approve or reject a gate, or answer its questions — and carry it on in the background. 409 when the run is not waiting or the skill changed while it waited; 422 for an answer that does not fit the question.


/skillsets · App - Skillsets

Source: modules/svc-core/app/router/app/skillsets/router.py

MethodPathHandlerDescription
GET/skillsets/{skillset_id}get_skillset
POST/skillsetscreate_skillset
PATCH/skillsets/{skillset_id}update_skillset
DELETE/skillsets/{skillset_id}delete_skillset
POST/skillsets/{skillset_id}/skillsadd_skillset_skill
DELETE/skillsets/{skillset_id}/skills/{skill_id}remove_skillset_skill
GET/skillsets/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/skillsets/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /skillsets

The caller's skillsets, or an organisation's or project's.

`include_system` adds the platform's built-in skillsets to the personal listing, for the Skillsets page and the pickers that grant a skillset to an agent. Opt-in, so every count built on this listing stays the user's own unless the caller asks otherwise.


/statements · App - Statements

Source: modules/svc-core/app/router/app/statements/router.py

MethodPathHandlerDescription
GET/statements/exportexport_statementsThe workspace's statements from `from to to (YYYY-MM`, at
GET/statements/{month}get_statementOne month's statement: as kept when it closed, or computed now.
GET/statements/{month}/csvget_statement_csvOne month's statement as a CSV: one row per figure.

GET /statements/export

The workspace's statements from `from to to (YYYY-MM, at most :data:EXPORT_MONTHS` months) as one CSV for finance (A4.2): every figure a row, naming its month and the cost centre it is filed under. A closed month as it was kept; the current one as a draft. For those who govern the workspace: it spans its projects.


/stats · App - Stats

Source: modules/svc-core/app/router/app/stats/router.py

MethodPathHandlerDescription
GET/stats/cataloguestats_catalogueWhat can be measured, what it can be sliced by, and over what window.
GET/stats/breakdownstats_breakdownOne metric, over one window, optionally sliced by one dimension.
GET/stats/costresource_costWhat a resource has cost: the figure behind every cost card.
GET/stats/stepsstep_usageWhere a resource's tokens go: its newest turns in the period, as its
GET/stats/invocationsllm_invocationsProxy to svc-ai's individual LLM invocation traces for the current user,
GET/stats/tracestrace_statsProxy to svc-ai's LLM and tool invocation trace statistics for the
GET/stats/usageusage_statsProxy to svc-ai's aggregated token usage statistics for the current
GET/stats/web-search-domainsweb_search_domain_statsProxy to svc-ai web-search citation domain statistics for the current

GET /stats/catalogue

What can be measured, what it can be sliced by, and over what window.

Served as one document, and served from the registries rather than restated here, so a metric added as a class appears in the widget editor's pickers without a frontend release — the same contract the rule builder's catalogue and the widget-type catalogue already work to.

Every metric names its `source and every dimension the sources` it can slice, which is what lets a client offer only the combinations the query can honour. Asking for a figure never states a source: the metric determines it, so a request cannot name a metric and a table that disagree.

GET /stats/breakdown

One metric, over one window, optionally sliced by one dimension.

Four sources sit behind this: what invocations consumed (`governance_usage), what the rules did to them (governance_events), what those rules removed (the redaction expansion of the same table), and what a person was asked to look at (review_flags). The metric chooses between them; there is no source` parameter, so a request cannot name a metric and a table that disagree.

Scoped to the calling user, like the governance activity log and the reviewer queue: the ledger row records whose invocation it was, which is the only scope it can answer on its own. A project-wide figure is a `project:` filter, not a different caller.

Omitting `dimension returns the figure alone — what a stat tile shows. Supplying one returns it ranked across that axis, with everything past limit folded into a single other` bucket rather than dropped, so a cost chart still adds up to the total printed above it.

Terms that do not resolve are refused with 422 rather than ignored. A filter that silently fell off would widen a tile from one project to the whole account while its caption still named the project.

GET /stats/cost

What a resource has cost: the figure behind every cost card.

Reads the usage ledger by the resource each invocation is attributed to — a dashboard tile's spend is the dashboard's, whichever agent it borrowed. Totals, a split by execution type and by source, and a daily series. Counted in the request's workspace, like a breakdown. See `docs/guides/cost-monitoring.md`.

GET /stats/steps

Where a resource's tokens go: its newest turns in the period, as its cost card counts them, summed by the step of the pipeline that made each model call — triage, the answer, the quality check, retrieval's planner and reranker. Read from svc-ai's call records for exactly those turns. See `docs/guides/cost-monitoring.md#where-the-tokens-go`.

GET /stats/invocations

Proxy to svc-ai's individual LLM invocation traces for the current user, in the request's workspace.

Includes every recorded LLM call — conversation executions and platform flows such as generative agent setup. `offset pages past limit`.

GET /stats/traces

Proxy to svc-ai's LLM and tool invocation trace statistics for the current user, in the request's workspace.

GET /stats/usage

Proxy to svc-ai's aggregated token usage statistics for the current user, in the request's workspace.

GET /stats/web-search-domains

Proxy to svc-ai web-search citation domain statistics for the current user, in the request's workspace.


/swarms · App - Swarms

Source: modules/svc-core/app/router/app/swarms/router.py

MethodPathHandlerDescription
GET/swarms/runslist_my_runsThe caller's newest runs of any swarm, in the request's workspace —
GET/swarms/threadslist_my_threadsThe caller's threads of any swarm, in the request's workspace, the
POST/swarms/runs/{run_id}/follow-upfollow_up_runFollow up one of the caller's runs: the swarm, as it is now, sent on
GET/swarms/runs/{run_id}get_runOne of the caller's runs, with every task — what the run page polls.
GET/swarms/runs/{run_id}/document.pdfdownload_run_documentThe run's answer as a PDF — rendered from what the run stored, never
GET/swarms/runs/{run_id}/images/{asset}run_document_imageAn image a document in the run's answer shows — the copy svc-ai stored
POST/swarms/runs/{run_id}/approveapprove_runApprove the lead's plan, with any pieces dropped or reassigned and the
POST/swarms/runs/{run_id}/rejectreject_runDecline the lead's plan: the run ends with nothing more spent.
POST/swarms/runs/{run_id}/stopstop_runStop the run: no new work starts and it answers from what is done.
POST/swarms/runs/{run_id}/tasks/{task_id}/respondrespond_to_taskAnswer a worker's questions; its piece runs again with the answers.
GET/swarmslist_swarmsThe swarms of the workspace the request names (Personal when none).
POST/swarmscreate_swarmA new swarm in the request's workspace. 422 names what is wrong with
GET/swarms/{swarm_id}/adviceget_adviceWhat the record says about the swarm's shape: read from the caller's
GET/swarms/{swarm_id}get_swarmOne swarm: its shape, settings, roster and defaults.
PATCH/swarms/{swarm_id}update_swarmChange a swarm in its own workspace. Its runs keep what they ran.
DELETE/swarms/{swarm_id}delete_swarmDelete a swarm; its finished runs stay readable. 409 while a run of
POST/swarms/{swarm_id}/runsstart_runSend the swarm on a task. 422 names what cannot run; 409 when the
GET/swarms/{swarm_id}/runslist_runsThe caller's newest runs of this swarm.
GET/swarms/{swarm_id}/threadslist_threadsThe caller's threads of this swarm, the newest activity first: a run
GET/swarms/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/swarms/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

GET /swarms/runs

The caller's newest runs of any swarm, in the request's workspace — what the Swarms tab shows going and done.

GET /swarms/threads

The caller's threads of any swarm, in the request's workspace, the newest activity first: a run and its follow-ups, one item.

POST /swarms/runs/{run_id}/follow-up

Follow up one of the caller's runs: the swarm, as it is now, sent on the next request of the run's thread, with what the thread has done. 422 names what cannot run; 409 when the run is not its thread's latest request, or the caller has as many runs going as they may.

GET /swarms/runs/{run_id}/document.pdf

The run's answer as a PDF — rendered from what the run stored, never from anything sent with the request. Only a run that answered has one; `index` picks among several documents in its answer.

GET /swarms/runs/{run_id}/images/{asset}

An image a document in the run's answer shows — the copy svc-ai stored when it made the document. Only one that answer names, for the run's owner, once it has answered.

POST /swarms/runs/{run_id}/approve

Approve the lead's plan, with any pieces dropped or reassigned and the budget changed; the team then starts work. 422 names what does not fit.

POST /swarms/runs/{run_id}/tasks/{task_id}/respond

Answer a worker's questions; its piece runs again with the answers. 422 names a question the answer does not fit.

POST /swarms

A new swarm in the request's workspace. 422 names what is wrong with its shape, settings or roster.

GET /swarms/{swarm_id}/advice

What the record says about the swarm's shape: read from the caller's own runs of it and the evaluations that ran it — never from a model.

DELETE /swarms/{swarm_id}

Delete a swarm; its finished runs stay readable. 409 while a run of it is going: stop it first.

POST /swarms/{swarm_id}/runs

Send the swarm on a task. 422 names what cannot run; 409 when the caller has as many runs going as they may; 403 when a budget of the workspace is used up.

GET /swarms/{swarm_id}/threads

The caller's threads of this swarm, the newest activity first: a run and its follow-ups, one item.


/toolkits · App - Toolkits

Source: modules/svc-core/app/router/app/toolkits/router.py

MethodPathHandlerDescription
GET/toolkits/{toolkit_id}get_toolkit
POST/toolkitscreate_toolkit
PATCH/toolkits/{toolkit_id}update_toolkit
DELETE/toolkits/{toolkit_id}delete_toolkit
POST/toolkits/{toolkit_id}/mcp_serversadd_toolkit_mcp_server
DELETE/toolkits/{toolkit_id}/mcp_servers/{mcp_server_id}remove_toolkit_mcp_server
GET/toolkits/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/toolkits/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

/tools · App - Tools

Source: modules/svc-core/app/router/app/tools/router.py

MethodPathHandlerDescription

/turns · App - Turns

Source: modules/svc-core/app/router/app/turns/router.py

MethodPathHandlerDescription
POST/turns/{turn_id}/stopstop_turnStop one of the caller's running turns.

GET /turns

The caller's running turns, oldest first.

With an agent or a model, or all of them.

POST /turns/{turn_id}/stop

Stop one of the caller's running turns.

It ends as Stop from its own page ends it: svc-ai's run stops, and it is stored with what it had written. 404 for a turn that is not theirs or no longer running.


/users · App - Users

Source: modules/svc-core/app/router/app/users/router.py

MethodPathHandlerDescription
GET/users/meuser_me_getReturn the svc-core user record for the authenticated session.
POST/users/meuser_me_createProvision a new svc-core user from the Auth0 session.
GET/users/me/exportuser_me_exportA zip of everything the caller owns in CHAIN-R — their copy under UK
GET/users/listuser_list
GET/users/id/{id}user_id
POST/usersuser_create
PUT/users/id/{id}user_update
DELETE/users/id/{id}user_delete

GET /users/me

Return the svc-core user record for the authenticated session. Returns 404 (not 403) when the user has not been provisioned yet, allowing the frontend to distinguish "unknown" from "forbidden".

Identity comes from the verified internal token's subject (not a raw header), so the user cannot be impersonated. No provisioned-user dependency here: this endpoint must work before the user exists.

POST /users/me

Provision a new svc-core user from the Auth0 session. Called once during onboarding after the user's first login. Returns 409 if the user already exists.

Subject, email, and name come from the verified internal token (not raw headers), so a caller cannot provision an account for another identity.

GET /users/me/export

A zip of everything the caller owns in CHAIN-R — their copy under UK and EU GDPR access and portability rights. See `app/services/data_export.py` for what it holds and leaves out.

Built in full before the response starts, so a failure is an error status rather than a truncated download that looks complete.


/workers · App - Workers

Source: modules/svc-core/app/router/app/workers/router.py

MethodPathHandlerDescription
GET/workerslist_custom_workers
GET/workers/{worker_id}get_custom_worker
POST/workerscreate_custom_worker
PATCH/workers/{worker_id}update_custom_worker
DELETE/workers/{worker_id}delete_custom_worker
GET/workers/{resource_id}/historylist_historyVersion history for this resource (mounted by registerhistoryroutes).
GET/workers/{resource_id}/history/diffhistory_diffVersion history for this resource (mounted by registerhistoryroutes).

/workspaces · App - Workspaces

Source: modules/svc-core/app/router/app/workspaces/router.py

MethodPathHandlerDescription
GET/workspaces/resolveresolve_workspaceOne workspace by key — `personal` for the caller's own — with the

GET /workspaces

Every workspace the caller can open: Personal and its projects, then each organisation followed by its projects they belong to (all of them, for its admins), then other people's personal projects they joined.

GET /workspaces/resolve

One workspace by key — `personal` for the caller's own — with the caller's role and access there. 404 for one that doesn't exist, 403 for one they don't belong to.


/dev/schema · Dev - Crud Schemas

Source: modules/svc-core/app/router/dev/db_migrator/router.py

MethodPathHandlerDescription

/dev/scenario-loader · Dev - Scenario Loader

Source: modules/svc-core/app/router/dev/scenario_loader/router.py

MethodPathHandlerDescription
POST/dev/scenario-loader/loadload_scenario
DELETE/dev/scenario-loader/clearclear_allTruncate every collection managed by the scenario loader in reverse FK order,

DELETE /dev/scenario-loader/clear

Truncate every collection managed by the scenario loader in reverse FK order, and delete all Neo4j graphs for knowledge bases with source_type='graph'. Useful for resetting the dev database.


/monitoring · Monitoring

Source: modules/svc-core/app/router/monitoring/router.py

MethodPathHandlerDescription
GET/monitoring/healthhealthcheck
GET/monitoring/schedulerscheduler_statusWhat the background jobs are doing, and when each last ran.

GET /monitoring/scheduler

What the background jobs are doing, and when each last ran.

"Has the retention purge been running?" is an audit question, and a scheduler observable only through container logs is one nobody can answer it about. Every registered job is listed whether or not it has ever run, so a job that has never fired is visible as such rather than absent.

`leader` says whether this replica is the one scheduling. Only one is, by design, so a false here is normal on every replica but one — and a false on all of them is the thing worth alerting on.


/agents · App - Agent Setup

Source: modules/svc-core/app/router/app/agents/setup.py

MethodPathHandlerDescription
POST/agents/create-from-configcreate_from_configPersist a reviewed generation proposal atomically.

POST /agents/generate

Generate a proposed agent configuration for review (creates nothing).

Creates no resources, but does record the invocation: a `GenerationRun` is opened here so the proposal can carry its id, and so a proposal the user never accepts is still on record.


/dashboards · App - Dashboard Setup

Source: modules/svc-core/app/router/app/dashboards/setup.py

MethodPathHandlerDescription

POST /dashboards/generate

Compose a dashboard from a description, for review before creating.

The proposal carries a `generation_id the frontend passes to POST /app/dashboards`. Since generated and hand-built boards share that one create path, the id is the only thing that tells them apart — without it a generated board is indistinguishable from a hand-built one.


/knowledge · App - Knowledge Setup

Source: modules/svc-core/app/router/app/knowledge/setup.py

MethodPathHandlerDescription
GET/knowledge/generate/{generation_id}knowledge_generation_statusWhere the caller's knowledge generation is, and once it has one, its
POST/knowledge/create-from-configcreate_knowledge_from_configPersist a reviewed knowledge generation proposal atomically; then
POST/knowledge/discoverfind_sourcesFind real material for sources not yet created — the agent wizard's
POST/knowledge/{knowledge_id}/discoverfind_sources_forFind real material for an existing website or file source, from its
GET/knowledge/discover/{generation_id}find_sources_statusWhere the caller's search is, and once it is done, each source with
POST/knowledge/{knowledge_id}/discover/{generation_id}/applyapply_found_sourcesGive an existing source the links the person kept from its search —

POST /knowledge/generate

Start designing a repository and its sources (creates nothing yet).

Returns at once: the work runs in the background, and `GET /knowledge/generate/{id} says where it is. A second generation while one is running is a 409 naming it, so another tab picks it up rather than paying twice. With from_turns` the description is composed from those questions — the caller's own here only, else a 422.

GET /knowledge/generate/{generation_id}

Where the caller's knowledge generation is, and once it has one, its proposal. Only the person who started it reads it (404 otherwise).

POST /knowledge/create-from-config

Persist a reviewed knowledge generation proposal atomically; then start each website source's first crawl and each file source's imports.

POST /knowledge/discover

Find real material for sources not yet created — the agent wizard's proposed website and file sources. In the background, as knowledge generation is; `GET /knowledge/discover/{id}` says where it is.

POST /knowledge/{knowledge_id}/discover

Find real material for an existing website or file source, from its name and description ("Find sources" on its page). Applied with `POST /knowledge/{id}/discover/{generation_id}/apply` once reviewed.

GET /knowledge/discover/{generation_id}

Where the caller's search is, and once it is done, each source with what was found for it. Only the person who started it reads it.

POST /knowledge/{knowledge_id}/discover/{generation_id}/apply

Give an existing source the links the person kept from its search — validated as a hand-made source's are — and start its crawl or its downloads. Its edit history names the search.


/rules · App - Rule Setup

Source: modules/svc-core/app/router/app/rules/setup.py

MethodPathHandlerDescription
POST/rules/create-from-configcreate_rules_from_configPersist a reviewed rule proposal atomically.

POST /rules/generate

Propose governance rules for review (creates nothing).

Records the invocation even so — see `generate_agent` for why.

POST /rules/create-from-config

Persist a reviewed rule proposal atomically.

Re-validated rather than trusted: the blocks arriving here have been through a human's edits and a model's invention, and this endpoint is as reachable as any other. A rule that fails is refused with the reason (422) instead of being silently narrowed or dropped — by this point the user has approved it and deserves to know what is wrong with it.


/skills · App - Skill Setup

Source: modules/svc-core/app/router/app/skills/setup.py

MethodPathHandlerDescription
POST/skills/create-from-configcreate_skill_from_configPersist a reviewed generated skill, stamped with its invocation.

/skillsets · App - Skillset Setup

Source: modules/svc-core/app/router/app/skillsets/setup.py

MethodPathHandlerDescription
POST/skillsets/create-from-configcreate_skillset_from_configPersist a reviewed skillset generation proposal atomically.

POST /skillsets/generate

Generate a proposed skillset configuration for review (creates nothing).

Records the invocation even so — see `generate_agent` for why.


/toolkits · App - Toolkit Setup

Source: modules/svc-core/app/router/app/toolkits/setup.py

MethodPathHandlerDescription
POST/toolkits/create-from-configcreate_toolkit_from_configPersist a reviewed toolkit generation proposal atomically.

POST /toolkits/generate

Generate a proposed toolkit configuration for review (creates nothing).

Records the invocation even so — see `generate_agent` for why.


/knowledge · App - Knowledge

Source: modules/svc-core/app/router/app/knowledge/figures.py

MethodPathHandlerDescription
GET/knowledge/recommendationslist_recommendationsWhat to change about this workspace's knowledge: everything, or what
POST/knowledge/recommendations/dismissalsdismiss_recommendationSet a recommendation aside for this workspace while its evidence
DELETE/knowledge/recommendations/dismissals/{dismissal_id}undo_dismissalBring a recommendation set aside here back.
GET/knowledge/trust/signalslist_trust_signalsThe trust signals a source is read against, in the order pages list
GET/knowledge/statslist_knowledge_statsThe figures of every source the knowledge listing shows (the same
GET/knowledge/{knowledge_id}/statsget_knowledge_statsOne source's figures, as its card reads them.
GET/knowledge/{knowledge_id}/usageget_knowledge_usageThe answers in this workspace citing the source over `days` (7–365):
GET/knowledge/{knowledge_id}/trustget_knowledge_trustWhat is on record about relying on the source: each signal's state,

GET /knowledge/recommendations/kinds

What each kind of recommendation looks for, in the order pages list them.

GET /knowledge/recommendations

What to change about this workspace's knowledge: everything, or what touches one repository (and its sources) or one agent. Figures count the workspace; examples are the viewer's own questions.

POST /knowledge/recommendations/dismissals

Set a recommendation aside for this workspace while its evidence reads `fingerprint`. Needs what acting on it needs: creating knowledge here.

GET /knowledge/trust/signals

The trust signals a source is read against, in the order pages list them: the legend for every trust panel.

GET /knowledge/stats

The figures of every source the knowledge listing shows (the same parameters), read at once for its cards.

GET /knowledge/{knowledge_id}/usage

The answers in this workspace citing the source over `days` (7–365): per day, by agent and by document, with the viewer's own newest ones.

GET /knowledge/{knowledge_id}/trust

What is on record about relying on the source: each signal's state, summary and the facts it read.


/repositories · App - Repositories

Source: modules/svc-core/app/router/app/repositories/figures.py

MethodPathHandlerDescription
GET/repositories/statslist_repository_statsThe figures of every repository the repository listing shows (the same
GET/repositories/{repository_id}/statsget_repository_statsThe repository's figures, and each of its sources' for its table.
GET/repositories/{repository_id}/usageget_repository_usageThe answers in this workspace citing any of the repository's sources
GET/repositories/{repository_id}/trustget_repository_trustEach member source's trust signals, and how many sit in each state.
GET/repositories/{repository_id}/mapget_repository_mapThe repository's sources connected by evidence — the same documents,

GET /repositories/categories

The kinds of knowledge a repository may hold, and what an agent does with each: what the category picker offers.

GET /repositories/stats

The figures of every repository the repository listing shows (the same parameters), read at once for its cards.

GET /repositories/{repository_id}/usage

The answers in this workspace citing any of the repository's sources over `days` (7–365), ranked by source too. A source in two repositories counts in both.

GET /repositories/{repository_id}/map

The repository's sources connected by evidence — the same documents, answers citing both, links between them, shared sites or publishers — with the workspace's sources the evidence ties to it as suggestions and the agents it is granted to. Nothing is drawn by hand; each connection says why it is there.