Skip to main content

Namespaces

Namespaces isolate memories into separate semantic search spaces.

What is a Namespace?

A namespace is an isolated collection of memories where semantic search operates independently. Think of it like:
  • Database table - Each namespace is its own data container
  • Semantic search scope - Queries only search within that namespace
  • Memory boundary - Memories from different namespaces never mix

Namespace Structure

Moorcheh
  ├── memanto_agent_customer-support
  │   ├── "Alice prefers email"
  │   ├── "Support ticket #123"
  │   └── ... (customer support memories)

  ├── memanto_agent_project-manager
  │   ├── "Project milestone: API launch"
  │   ├── "Decision: Use Postgres"
  │   └── ... (project memories)

  └── memanto_agent_research-bot
      ├── "Paper: Neural Networks"
      ├── "Finding: LSTM outperforms RNN"
      └── ... (research memories)

Agent Namespaces

Each agent automatically gets its own namespace:
Agent: customer-support
Namespace: memanto_agent_customer-support
All memories for that agent are stored in this namespace.

Search Isolation

Memories only search within their namespace:
Agent: customer-support (namespace: memanto_agent_customer-support)
  Query: "user preferences"
  Search: ONLY in memanto_agent_customer-support

Agent: project-manager (namespace: memanto_agent_project-manager)
  Query: "project status"
  Search: ONLY in memanto_agent_project-manager
Agents never see each other’s memories unless you explicitly query across agents.

Example: Multiple Agents

Customer Support Bot
  └─ Namespace: memanto_agent_customer-support
     ├── "Alice prefers email"
     ├── "Bob works in Engineering"
     └── "Charlie's timezone is PST"

Technical Support Bot
  └─ Namespace: memanto_agent_technical-support
     ├── "Alice's API key: abc123"
     ├── "Bob reported database error"
     └── "System outage on March 20"

Sales Bot
  └─ Namespace: memanto_agent_sales
     ├── "Alice is interested in Enterprise plan"
     ├── "Bob's company budget: $100K"
     └── "Charlie referred from webinar"
Each bot searches only its own namespace.

Practical Impact

Isolation Benefits

  1. Privacy - Support agent doesn’t see sales data
  2. Performance - Smaller namespace = faster search
  3. Organization - Clear semantic boundaries
  4. Independence - Agents work without interference

Example: Search Results

Customer Support Agent searching for "budget":
  Results: (empty - no budget information in customer namespace)

Sales Agent searching for "budget":
  Results: "Bob's company budget: $100K"

Technical Agent searching for "budget":
  Results: (empty - no budget info in technical namespace)
Same query, different results based on namespace.

When You Need Shared Memory

If multiple agents need to share context, use a technique like:

Option 1: Shared Memory Store

Both agents recall from a shared agent:
Agent: shared-context
  └─ Namespace: memanto_agent_shared-context
     ├── "Company policies"
     ├── "Product features"
     └── "Shared customer info"

Sales Agent: recalls from both its namespace AND shared-context

Support Agent: recalls from both its namespace AND shared-context

Option 2: Explicit Query to Other Agent

One agent queries another’s namespace via API (advanced).

Namespace Naming

Namespaces follow pattern:
memanto_agent_{agent_id}
Valid agent IDs:
  • customer-supportmemanto_agent_customer-support
  • project-managermemanto_agent_project-manager
  • research-botmemanto_agent_research-bot

Best Practices

DO

  • Create separate agents for different domains
  • Keep related memories in same agent
  • Use clear agent names
  • Document agent purposes
  • Review memory isolation regularly

DON’T

  • Put all memories in one agent
  • Expect cross-agent search
  • Reuse agent for different purposes
  • Ignore namespace boundaries
  • Mix unrelated memories

Next Steps