Vector Database Sanitization
Delete all vector points tagged with session_id and timestamp >= injection_timestamp.
Responds to indirect prompt injection attacks where an autonomous agent ingests untrusted text (e.g. malicious website, poisoned document, hidden prompt in email) that subverts system instructions. Quarantines the affected session, identifies adversarial injection tokens, rolls back vector memory to a verified clean state, and injects protective system anchoring rules.
Isolate Conversational Session and Freeze Inbound Channels
Target Runtime: Redis / Session Store | Reversibility: FAST
# Mark session status as quarantined in session registryredis-cli HSET "session:$SESSION_ID" "state" "QUARANTINED"redis-cli HSET "session:$SESSION_ID" "quarantine_reason" "INDIRECT_PROMPT_INJECTION"Extract Adversarial Ingestion Artifact and Roll Back Memory Checkpoint
Target Runtime: Python 3 / Qdrant CLI | Reversibility: NON_DESTRUCTIVE
# Identify step index where untrusted document was ingestedBAD_STEP=$(grep -n '"role":"user"' /var/log/agents/$AGENT_ID/session_$SESSION_ID.jsonl | tail -n 1 | cut -d: -f1)# Roll back episodic vector embeddings inserted after BAD_STEP timestamppython3 scripts/agent_memory_rollback.py \ --agent-id $AGENT_ID \ --session-id $SESSION_ID \ --before-step $BAD_STEP \ --vector-db-url http://qdrant:6333Vector Database Sanitization
Delete all vector points tagged with session_id and timestamp >= injection_timestamp.
Context Window Purge
Rebuild context window containing only verified user messages prior to injection payload.
Constitutional Re-Anchoring
Prepend cryptographically sealed constitutional safety prompts into system context.