name: emdb-delete description: Delete vectors from EmergentDB by ID. Use when the user wants to remove vectors, clean up data, or delete entries from the database. allowed-tools: Bash, Read, Write, Edit
Delete Vectors from EmergentDB
Help the user delete vectors from EmergentDB using the official SDKs.
TypeScript SDK
import { EmergentDB } from "emergentdb";
const db = new EmergentDB("emdb_your_api_key");
// Delete from default namespace
const result = await db.delete(42);
// result: { deleted: true, id: 42, namespace: "default" }
// Delete from a specific namespace
const result2 = await db.delete(7, "production");
// Delete multiple vectors
for (const id of [1, 2, 3, 4, 5]) {
await db.delete(id, "my-namespace");
}
Python SDK
from emergentdb import EmergentDB
db = EmergentDB("emdb_your_api_key")
# Delete from default namespace
result = db.delete(42)
# result.deleted == True, result.id == 42, result.namespace == "default"
# Delete from a specific namespace
result = db.delete(7, namespace="production")
# Delete multiple vectors
for id in range(1, 6):
db.delete(id, namespace="my-namespace")
Response Structure
{ "deleted": true, "id": 42, "namespace": "default" }
Key Details
- Namespace scoping: Deletes only affect the specified namespace. Deleting ID 1 from
"production"does not affect ID 1 in"default". - Idempotent: Deleting a non-existent ID does not raise an error.
- Immediate: Vectors are removed instantly and will no longer appear in search results.
Error Codes
| Code | Meaning |
|---|---|
| 400 | Invalid request — missing or malformed ID |
| 401 | Missing or invalid API key |
| 429 | Rate limit exceeded |
| 500 | Server error — retry with backoff |
Rate Limits
| Plan | Limit |
|---|---|
| Free | 60 req/min |
| Launch | 300 req/min |
| Scale | 600 req/min |
When helping the user, confirm which namespace they want to delete from to avoid accidental data loss.