> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quivr.thevibecompany.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage plugins

> Enable, upgrade, disable and roll back plugins in a running Quivr deployment.

Run a plugin at an address Quivr can reach, then tell Quivr which jobs to send it. For an upgrade, start the new version beside the old one so you can switch back if needed.

A [pin](https://docs.quivr.thevibecompany.co/overview/glossary.md) is an entry in the startup configuration. A registration is Quivr's saved record of a plugin build, including its address and settings. The active plan lists the registrations Quivr uses for each job.

## Pin a plugin

From your [deployment](https://docs.quivr.thevibecompany.co/operate/deploy.md), put the exact `quivr-plugin.yaml` where each Quivr process can read it. Run the matching build at an address the API and workers can reach. If the plugin reads or writes files, it must also be able to reach the file store. For Core retrieval, configure [signed requests](https://docs.quivr.thevibecompany.co/reference/plugin-protocol.md#signed-engine-requests). Set the engine’s `QUIVR_ENGINE_PLUGIN_KEYS` map and give the plugin its matching ring through `QUIVR_PLUGIN_SIGNING_KEYS`. Keep both in environment secrets.

Add the entry to the `plugins` array in the JSON file named by `QUIVR_CONFIG`. For example, merge this pin for [Core retrieval](https://docs.quivr.thevibecompany.co/plugins/core-retrieve.md) into your existing file and replace the address with the running plugin's address.

```json QUIVR_CONFIG (excerpt) theme={null}
{
  "plugins": [{
    "manifest": "/etc/quivr/plugins/core-retrieve/quivr-plugin.yaml",
    "endpoint": "http://127.0.0.1:9906"
  }]
}
```

A pin can also include `configuration` for plugin settings, `routes` for file formats, `kinds` to select offered kinds on an alert-rule plugin that declares them, or `spaces` for named sets of vectors. Use the fields your plugin supports. Use the same pins for migration, API and worker processes. Run `quivr migrate` with the new configuration, then restart the API and workers. Check the active plan, then exercise the plugin with a search, document or source it handles. [Pin fields and routing](https://docs.quivr.thevibecompany.co/reference/configuration.md) documents the available settings.

## Steps

Use a key with `plugins:admin`. When `admin_listen` is set, use the private listener and a key from `admin_keys` for `/v0/admin/*`. Read `/v0/operations/{operation_id}` on the regular API with a separate `plugins:admin` key from `keys` for activation, rollback or space promotion. Registry changes affect the whole deployment. To inspect plugin statistics, use an `observability:read` key that grants every Corpus in its Organization. A [Corpus](https://docs.quivr.thevibecompany.co/overview/glossary.md) is a collection of documents.

Record the current plan before activating, and keep its plugins reachable so you can restore it.

![Save the current plan, validate and activate the new plugin, then restore the saved plan if the new plugin fails.](https://mintcdn.com/thevibecompany/YCmsE1YU-9BRsqL2/images/diagrams/plugin-upgrade.png?fit=max\&auto=format\&n=YCmsE1YU-9BRsqL2\&q=85\&s=d269cb47a8b7c648f62d8aed4f6ea4a2)

[Open the full-size diagram](https://docs.quivr.thevibecompany.co/images/diagrams/plugin-upgrade.png)

**1. Save the active plan**

Read `GET /v0/admin/plugins/plan` and save its `plan_id`. List previous plans with `GET /v0/admin/plugins/plans`, or read a specific one at `GET /v0/admin/plugins/plans/{plan_id}`.

**2. Run and register the new build**

Run `quivr plugin test` against the new build. Keep the old process running at its own address. Send `POST /v0/admin/plugins` with a fresh `idempotency_key`, the new `endpoint`, and the exact manifest text in `manifest`. Include any settings you would put in a pin and the fixtures the plugin needs for validation. Send fixtures as a map from relative fixture path to base64-encoded file content. A connector or a normalizer for a format other than Markdown needs its own fixtures.

A retry with the same key and request returns the same registration. Use a new key for a changed request.

**3. Wait for validation**

Follow the response's `Location` or read `GET /v0/admin/plugins/{registration_id}`. Wait for `validated`. If it is `rejected`, inspect `check.checks`, fix the build or fixtures, and register with a new key.

**4. Activate and check**

Send `POST /v0/admin/plugins/{registration_id}/activate`. Follow the returned `Location` with `plugins:admin` until the background task reports `succeeded` or `failed`. Read `errors` if it fails. On success, compare `admin.plan_id` with the active plan and try the paths the plugin serves.

Check `GET /v0/admin/stats/plugins?window=1h` for errors and latency. For ingestion changes, also list documents [held after a failure](https://docs.quivr.thevibecompany.co/operate/troubleshoot.md) since the switch.

## Work finishes on the version it started with

A job keeps the plan it started with. A replaced registration can read `draining` while those jobs or alerts still depend on it. Check `GET /v0/admin/plugins` and retire the process once the registration is `inactive`. Keep its build and address available if you may need a rollback.

For live imports tied to a replaced build, incompatible plugins and repeated invocation deadlines can exhaust `pinned_plugin_attempts`. Live import discovery and transport outages keep retrying. Background operations tied to an older plan can spend the same budget when a plugin that has left the active plan is unavailable. See [plugin settings](https://docs.quivr.thevibecompany.co/reference/configuration.md) and [troubleshooting](https://docs.quivr.thevibecompany.co/operate/troubleshoot.md).

## Roll back

Send `POST /v0/admin/plugins/plan/rollback` with a fresh `idempotency_key` and the saved `plan_id`. Omitting `plan_id` selects the previous plan, which changes after each switch. Keep the returning builds reachable at their recorded addresses with their exact manifests.

The default `pinned_work: "drain"` lets outgoing jobs finish. Choose `"stop"` if those jobs should stop because the build hangs or produces bad output. Documents still waiting for searchable text can then enter quarantine with `pinned_plan_stopped`. After the rollback succeeds, [reprocess them](https://docs.quivr.thevibecompany.co/operate/troubleshoot.md). Existing alerts still depend on their saved rule versions.

Follow the returned `Location` until the task finishes. On an ingestion-owner rollback, documents missing returning vectors can keep serving their outgoing results while Quivr rebuilds those vectors. Keep the outgoing plugin reachable during that recovery.

## Disable a plugin

For a plugin enabled through startup configuration, remove its pin or route and apply the updated configuration across Quivr processes. Update dependent search aliases, routes or alert rules before removing their provider. If the plugin was activated through the registry, roll back to a plan without it or activate a replacement for its roles. Removing a startup pin alone can leave a later registry override in service.

Check the active plan after the change and keep the process running until its registration is `inactive`. A serving retrieval plugin and a valid `default` profile must remain available.

## Promote an evaluation plugin

An evaluation ingestion plugin builds data for comparison while another plugin answers searches. [Backfill its primary vector space](https://docs.quivr.thevibecompany.co/operate/vector-model.md#fill-a-vector-space) across affected Corpora before activating its registration. Activation checks that the incoming plugin covers the current documents for the routes it will serve. The previous owner can remain in evaluation after the switch.

## Tune embedding throughput

For changes limited to [execution settings](https://docs.quivr.thevibecompany.co/operate/vector-model.md#tune-execution-without-changing-the-model), regenerate and certify the manifest with the new settings. When Quivr can prove the build is equivalent and it runs at the same endpoint, existing work can use it without rebuilding the index.

## Configure alert fields

In the `alerts` pin, set `configuration.fields` to a map from names used in keyword rules to JSON Pointers in document metadata. For example, map `author` to `/extensions/example.news/data/author`. Pointers must start at `/source`, `/provenance`, `/extensions` or `/accepted_at`. A list field matches when any value matches. Test the mapping through [a keyword alert preview](https://docs.quivr.thevibecompany.co/guides/alerts.md#keyword-alerts).

## Upgrade an alert rule

An existing alert (a Subscription) keeps its saved rule version when you activate a new version. Use `POST /v0/admin/subscriptions/evaluator-migrations` with the `plugin_id`, `from_version` and `dry_run: true`. Inspect refusals before repeating with `dry_run: false`. Pass each `next_after` as `after` until there are no more pages. Repeat with a `plugins:admin` key granting the affected Corpora in each Organization. Moved alerts use the new rule for later changes. Earlier matches keep their original rule version.

## Retire alert evaluations

If a rule build cannot be restored, inspect pending work with `GET /v0/admin/subscriptions/evaluation-backlog`. To close pending evaluations marked `evaluator_unavailable` whose leases have expired, dry-run `POST /v0/admin/subscriptions/evaluation-retirements` with `key`, `plugin_id`, `version`, `reason` and `dry_run: true`. Use `plugins:admin` with grants for the affected Corpora.

Review the preview, then send `dry_run: false`. A preview does not reserve its key, so you can reuse that key if it is still unused for a real batch. Retirement gives up potential matches from those evaluations. Save the receipt and use a fresh `key` for each real batch. Reusing a key returns the earlier receipt for the same request or gives `409 idempotency_conflict` if the request changed. Check remaining alert and work counts in the registry before retiring the process. See the [API reference](https://docs.quivr.thevibecompany.co/reference/api.md) for the migration and retirement request fields.

## Next

* [Choose which plugin serves a search profile](https://docs.quivr.thevibecompany.co/operate/search-profiles.md).
* [Recover documents after a plugin failure](https://docs.quivr.thevibecompany.co/operate/troubleshoot.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.