Skip to content

Delete a knowledge base#

Deleting a knowledge base stops its index service and deletes everything the base itself holds. The documents it read on your drives stay. Read what goes before you delete one: what was added to a base — uploads, saved notes, a memory's facts — lives with the base and goes with it.

What goes, what stays#

Goes with the base Stays
Its index service (the replica group metis-<base>) Its source drives, and every file in them
Its index, on its own drive metis-<base> — deleted once its service has stopped Data sources, and the buckets or folders behind them
Files uploaded to it, notes saved to it from conversations, and — for a memory — every fact and its history Its Eos deployments (embedding model, reranker, extractor) and their models
Drafts waiting for someone to save them Evaluation sets kept in a source drive's .metis/ folder
Its evaluations' history and its state history Functions, tools and skills that called it — searches through the API answer 404 KNOWLEDGE_BASE_NOT_FOUND, and http://metis-<base>:7700 no longer answers inside the workspace

It cannot be undone

A knowledge base has no bin. Once deleted, its index and what was added to it are gone from its machine.

Keep a copy first#

Of the files and notes added to a base — GET …/files lists them, GET …/files/<path> reads one (each part of the path percent-encoded):

$ mkdir -p handbook-added && cd handbook-added
$ curl -fsS "$ASTRALYX_API/metis/knowledge-bases/handbook/files" -H "Authorization: Bearer $ASTRALYX_TOKEN" \
    | jq -r '.items[].path' | while read -r p; do
        mkdir -p "$(dirname "$p")"
        curl -fsS -o "$p" "$ASTRALYX_API/metis/knowledge-bases/handbook/files/$(jq -rn --arg p "$p" '$p | split("/") | map(@uri) | join("/")')" \
          -H "Authorization: Bearer $ASTRALYX_TOKEN"
      done

Of a memory's facts, with what they replaced:

$ astra metis memory team --history --json > team-facts.json

Saved notes are Markdown files with their title, date and source in front matter: added back to a new base (astra metis add), they are read as any document.

Delete it#

You need knowledge-bases:delete (workspace editors and admins, the Developer preset).

Open the base (or the memory), press Delete, and type its name. The dialog says what goes: Its index service stops and its index is deleted, with the files and notes added to it. The documents of its drives stay. — for a memory, Its index and every fact it keeps are deleted, with their history.

$ astra metis delete handbook
handbook: deleted (what was added to it went with it; the documents of its drives stay)
$ curl -fsS -X DELETE "$ASTRALYX_API/metis/knowledge-bases/handbook" -H "Authorization: Bearer $ASTRALYX_TOKEN"

The base disappears from the list at once. Its service stops within seconds; its drive metis-handbook is deleted once nothing mounts it, and its machine removes the files from its data location.

Remove less than the whole base#

To remove Do Effect
One added file or note Documents → Added to this base → Delete, astra metis rm <base> <path>, or DELETE …/files/<path> Deleted from the base's machine; its passages leave the index with the next pass
One fact Metis → Memory → Forget (and, ticked, the older facts it replaced), astra metis forget <memory> <id> [--history], or DELETE …/memory/<id> Deleted from the memory's machine; leaves its index with the next pass
A source drive's documents Remove the drive from the base's Settings Its documents leave the index; the drive and its files stay
One document of a drive Delete or move it in the drive Dropped from the index by the next pass
A draft a model proposed Discard on its card, or DELETE …/drafts/<id> Nothing is saved; a draft nobody decides on goes after a day