Replace an outdated document cleanly so retired rules stop appearing in answers
Example use case
Your company changes its refund window from 14 days to 30 days on the inbound support line, or updates an on-call escalation handbook on the team assistant. The previous PDF is already indexed, and the updated version must take over cleanly without conflicting answers.
Setup
Replace the outdated document in three ordered steps as the agent’s owner:
Poll that Location URL until every listed turn reaches forgotten.
Upload the updated document via multipart POST…/observe and poll until committed.
On a learning agent (such as the team assistant), if anyone also repeated the old rule in a separate chat turn that did not cite the file, list those turns via GET/v2/agents//memories and forget them too.
Benefit with Priors
Complete file teardown: deleting the superseded file removes its bytes, extracted figures, pieces, and every memory from turns citing it.
Clean source of truth: uploading the replacement leaves one authoritative document for answers and citations.
What goes wrong
Uploading the revised policy without deleting the old one keeps both versions in memory, causing answers to mix old and new rules or cite the retired PDF. Note also that DELETE returns 409 conflict while the old file is still learning, and deleting a file does not remove unrelated chat turns where someone restated the old policy in conversation.
Recommendation
Always delete the superseded file and wait for its turns to reach forgotten before uploading the replacement. Map each document slug (such as refund-policy) to its active file_id so policy refreshes stay automated.