Skip to main content

Moorcheh Setup & Integration

Moorcheh.ai is a no-indexing semantic database for AI memory and retrieval workloads. MEMANTO uses Moorcheh as its semantic memory backend. This guide focuses on Moorcheh platform concepts, account setup, API key management, and operational best practices. This page explains Moorcheh itself. For MEMANTO installation and CLI/API setup flow, use Installation & Setup.

The Moorcheh Difference

Traditional Vector Databases

Traditional systems (Pinecone, Weaviate, Milvus) use HNSW (Hierarchical Navigable Small World) for approximate nearest neighbor search:
Write Memory → Index (5-10 minutes wait) → Available for search
                  ↑ (CPU-intensive)
Problems:
  • Indexing delays - Wait minutes before memories are searchable
  • Approximate search - Results are probabilistic, not exact
  • High costs - Always-running infrastructure
  • Complex setup - Complex configuration and tuning

Moorcheh’s Approach

Moorcheh uses Information Theoretic Vector Compression (ITVC) with full vector scans:
Write Memory → Instant availability (no indexing) → Search immediately
                     ↑ (efficient)
Advantages:
  • Zero indexing delay - Memories searchable immediately
  • Exact search - Deterministic results, same query always returns same results
  • Serverless - Scales to zero, pay only for operations
  • Efficient - 80% less compute than traditional systems

How Moorcheh Works

Storage

Memory: "User prefers email"

MEMANTO: Converts to vector representation

Moorcheh: Compresses vector using ITVC

Result: Instantly searchable (no indexing wait)

Retrieval

Query: "How should we contact the user?"

MEMANTO: Converts to vector

Moorcheh: Searches with full vector scans

Result: Exact match: "User prefers email"

Integration Details

Moorcheh can be used directly from your application, or through a higher-level memory layer such as MEMANTO.

Connection

MEMANTO connects to Moorcheh via REST API:
Your App → Moorcheh API
          └─ Uses your API key

or

Your Agent → MEMANTO API → Moorcheh API
                           └─ Uses your API key

Authentication

Moorcheh API key is used for all operations:
Authorization: Bearer your_api_key

Data Flow

1. Store Memory
   Agent → MEMANTO → Moorcheh (vector storage)

2. Recall Memory
   Agent → MEMANTO → Moorcheh (vector search)
           ↑ (vector conversion)

3. Semantic Matching
  MEMANTO uses Moorcheh's semantic search
   (not traditional keyword matching)

Getting Your API Key

Step 1: Create Moorcheh Account

  1. Visit https://moorcheh.ai
  2. Click “Sign Up” or “Get Started”
  3. Enter your email and create a password
  4. Verify your email (check your inbox)
  5. Log in to the dashboard

Step 2: Generate API Key

  1. Log in to Moorcheh Console
  2. Navigate to API Keys section (left sidebar)
  3. Click “Create New API Key”
  4. Choose a name (e.g., “MEMANTO Development”)
  5. Click “Generate”
  6. Copy the key immediately
⚠️ Important: The key is only shown once. Copy it to a safe place.

Step 3: Keep It Secret

Never:
  • Commit API keys to Git
  • Share in emails or chat
  • Hardcode in public repositories
  • Add to client-side code
Instead:
  • Use environment variables
  • Use .env files (excluded from git)
  • Use secrets managers (AWS Secrets Manager, HashiCorp Vault, etc.)

Using Your API Key Securely

Option 1: Environment Variable

export MOORCHEH_API_KEY=your_api_key_here

Option 2: .env File

Create .env in your project:
MOORCHEH_API_KEY=your_api_key_here
Then load it:
source .env
For Python projects:
import os
from dotenv import load_dotenv

load_dotenv()
api_key = os.getenv("MOORCHEH_API_KEY")

Verify Connectivity

Check Moorcheh API health:
curl https://api.moorcheh.ai/v1/health

Test from Code

import httpx
import os

api_key = os.getenv("MOORCHEH_API_KEY")

response = httpx.get(
   "https://api.moorcheh.ai/v1/health",
   headers={"Authorization": f"Bearer {api_key}"}
)

print(response.json())  # Should return {"status": "healthy"}

Cost Advantage

Traditional System

Scenario: 100K memories, weekly queries

Fixed Infrastructure: $500/month
  └─ Always-running indexing service

Query Operations: $200/month
  └─ 10K queries × $0.02 per query

TOTAL: $700/month + complexity

Moorcheh + MEMANTO

Scenario: 100K memories, weekly queries

Fixed Infrastructure: $0
  └─ Serverless (scales to zero)

Query Operations: $150/month
  └─ 100K operations × $0.0015 per operation

TOTAL: $150/month + simplicity
Savings: 78% cost reduction

Scalability

Moorcheh scales naturally:
1,000 memories:    Same cost and speed
100,000 memories:  Same cost and speed
1,000,000 memories: Same cost and speed
No indexing means no scaling complexity.

Understanding Free Tier

Moorcheh’s free tier includes:
  • 500 monthly credits (~100,000 operations)
  • Create up to 5 agents
  • Unlimited sessions (no session limits)
  • No credit card required
  • Zero Indexing Delay & Exact Search

What Counts as Operations?

  • Write operations: storing semantic records
  • Read operations: semantic and exact retrieval queries
  • Special operations: workload-dependent metadata and management operations

Estimation

ScenarioMemoriesOperations/DayDays Limit
Small agent (10 mem/day)10105,000
Medium agent (50 mem/day)50501,000
Large agent (100 queries/day)-100500
Development (200 ops/day)-200250
The free tier is plenty for heavy development and testing.

Upgrading to Paid Plan

When you need more than 500 credits/month:
  1. Go to https://console.moorcheh.ai
  2. Select a plan:
    • Pro: 10,000 monthly credits
    • Enterprise: Custom limits
  3. Add payment method
  4. Your free API key automatically upgrades
No code changes needed—same API key works with your new plan.

Multi-Environment Key Management

Development

# .env.development
MOORCHEH_API_KEY=dev_key_here

Testing

# .env.test
MOORCHEH_API_KEY=test_key_here

Production

Use a secrets manager: AWS Secrets Manager:
import boto3

client = boto3.client('secretsmanager')
secret = client.get_secret_value(SecretId='memanto/moorcheh-key')
api_key = secret['SecretString']
HashiCorp Vault:
import hvac

client = hvac.Client(url='https://vault.example.com')
secret = client.secrets.kv.read_secret_version(path='memanto/moorcheh-key')
api_key = secret['data']['data']['api_key']
Azure Key Vault:
from azure.identity import DefaultAzureCredential
from azure.keyvault.secrets import SecretClient

credential = DefaultAzureCredential()
client = SecretClient(vault_url="https://myvault.vault.azure.net/", credential=credential)
secret = client.get_secret("moorcheh-api-key")
api_key = secret.value

Troubleshooting

”Invalid API Key” Error

# Check your key is correct
echo $MOORCHEH_API_KEY

# Verify it starts with 
# Get a new key if needed from console.moorcheh.ai

”Connection Refused” Error

# Check Moorcheh status
curl https://api.moorcheh.ai/v1/health

# If Moorcheh is down, check status page
# https://status.moorcheh.ai

”Rate Limited” Error

You’ve exceeded quota. Free tier includes 500 credits/month. Solutions:
  1. Wait for next month’s reset
  2. Upgrade to paid plan
  3. Optimize your agent to use fewer operations

”Unauthorized” Error

API key is not being passed correctly. Check:
# Verify key is in environment
echo $MOORCHEH_API_KEY

# Check header format
# Should be: Authorization: Bearer your_key

Using Sovereign Moorcheh

For enterprises requiring data residency:
  1. Contact sales@moorcheh.ai
  2. Deploy Moorcheh to your VPC:
    • AWS (Terraform templates provided)
    • GCP (Cloud Deployment Manager templates provided)
  3. Get a private endpoint URL
  4. Configure your clients to use it:
export MOORCHEH_BASE_URL=https://moorcheh.your-company.internal
export MOORCHEH_API_KEY=your_key

Architecture Benefits

For MEMANTO Users

  1. Fast onboarding - MEMANTO provides a ready-made memory layer while Moorcheh handles semantic retrieval.
  2. Immediate recall after writes - New memories become searchable without indexing delays.
  3. Deterministic retrieval behavior - Stable search behavior helps with predictable agent outputs.

For Application Teams

  1. Instant Memory Availability - No waiting for indexing
  2. Predictable Performance - Same query = same result every time
  3. Affordable Scaling - Costs don’t increase with scale
  4. Simple Deployment - No infrastructure to manage

For Developers

  1. Easy Integration - Just an API key, no setup
  2. Reliable - No indexing issues or rebalancing
  3. Cost-Effective - Perfect for startups and projects
  4. Deterministic - Easier to debug than probabilistic systems

Best Practices

DO

  • Store API keys in environment variables
  • Rotate keys regularly
  • Use secrets manager for production

DON’T

  • Commit keys to Git
  • Share keys in Slack/Email
  • Hardcode keys in client code

Next Steps


All set! Your Moorcheh account and API key are ready to use.