Docs K  Search
Docs/Memory/Collections
Collections

Collections

Organize memories into collections for multi-tenant applications, different projects, or separate knowledge domains.

app.hebbrix.com/collections
CollectionsGroup memories by tenant, user, or project.
New collection
CollectionMemoriesUpdated
Support transcripts1,2042 hours ago
Product docs863yesterday
Sales calls · Q25123 days ago
Onboarding flows2875 days ago
The real interface, built in markup. Swap in a screenshot later if you like, into the same frame.

Use Cases

  • Multi-tenant Apps. One collection per customer to keep data isolated.
  • Knowledge Domains. Separate collections for different topics or projects.

Endpoints

Where does new data go?

Every create / upload endpoint (POST /v1/memories, POST /v1/memories/raw, POST /v1/memories/batch, POST /v1/documents/upload, POST /v1/media/upload) accepts an optional collection_id.
  • Provide collection_id → data lands in that collection.
  • Omit it → data is auto-assigned to the caller's __default__ collection (lazily created on first use).
  • Document / media upload responses include collection_auto_assigned: true when the server fell back to the default.
  • Send header X-Hebbrix-Require-Collection: true to forbid silent defaulting: an omitted collection_id returns HTTP 422.

Code Examples

Python
import asyncio
from hebbrix import MemoryClient

async def main():
    async with MemoryClient(api_key="mem_sk_...") as client:
        # Create a collection for a customer
        collection = await client.collections.create(
            name="Customer: Acme Corp",
            description="Memories for Acme Corp support",
            metadata={"customer_id": "acme_123", "plan": "enterprise"},
        )

        # Add a memory inside that collection
        await client.memories.create(
            collection_id=collection["id"],
            content="Acme Corp uses Python for their backend",
        )

        # Scope search to this collection only
        results = await client.search(
            query="what language do they use?",
            collection_id=collection["id"],
        )
        for r in results:
            print(r["content"])

        # When the customer leaves, one call wipes memories,
        # documents, and media that belonged to them.
        await client.collections.delete(collection["id"])

asyncio.run(main())
Ask the docs
reading · this page

Hi! I'm the Hebbrix docs assistant. Ask me anything about this page: setup, code examples, endpoints, pricing, or integrations.