| name | emdb-namespaces |
| description | List and manage namespaces in EmergentDB. Use when the user wants to see their namespaces, organize vectors into groups, or understand namespace isolation. |
| allowed-tools | Bash, Read, Write, Edit |
Namespaces in EmergentDB
Help the user work with namespaces to organize vectors into isolated groups.
TypeScript SDK
import { EmergentDB } from "emergentdb";
const db = new EmergentDB("emdb_your_api_key");
const namespaces = await db.listNamespaces();
await db.insert(1, embedding, { title: "Doc" }, "production");
const results = await db.search(queryVec, {
k: 10,
includeMetadata: true,
namespace: "production",
});
await db.batchInsert(vectors, "staging");
Python SDK
from emergentdb import EmergentDB
db = EmergentDB("emdb_your_api_key")
namespaces = db.list_namespaces()
db.insert(1, embedding, metadata={"title": "Doc"}, namespace="production")
results = db.search(query_vec, k=10, include_metadata=True, namespace="production")
db.batch_insert(vectors, namespace="staging")
Key Details
- Auto-created: Namespaces are created automatically on first insert. No setup required.
- Isolation: Vectors in one namespace are completely invisible to searches in another.
- Default namespace: If no namespace is specified, operations use
"default".
- Naming: Namespace names are strings up to 64 characters.
- Listing:
listNamespaces() / list_namespaces() returns all namespaces for your account.
Plans & Limits
| Plan | Vectors | Price |
|---|
| Free | 10,000 | $0/mo |
| Launch | 500,000 | $29/mo |
| Scale | 2,500,000 | $99/mo |
Namespaces share your account's total vector quota. Upgrade from the billing page.
Common Pattern: Multi-Environment Setup
from emergentdb import EmergentDB
db = EmergentDB("emdb_your_api_key")
for doc in documents:
db.insert(doc["id"], doc["embedding"], metadata=doc["meta"], namespace="staging")
for doc in documents:
db.insert(doc["id"], doc["embedding"], metadata=doc["meta"], namespace="production")
When helping the user, suggest namespaces for organizing data by environment, tenant, or data type.