Skip to main content

Setting Up Moorcheh for MEMANTO

MEMANTO relies on Moorcheh.ai, a no-indexing semantic database, for its memory operations. This guide walks you through the setup process.

What is Moorcheh?

Moorcheh.ai is a revolutionary semantic database that:
  • Eliminates indexing delays - Memories are queryable immediately after storage
  • Uses exact search - No approximate nearest neighbor search
  • Runs serverless - Zero costs when idle, scales to zero
  • Provides deterministic results - Same query always returns same results
  • Costs 80% less - More efficient than traditional vector databases

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.)

Configuring MEMANTO with Your Key

memanto
Follow the prompts:
Enter your Moorcheh API key: mk_your_api_key_here
[Optional] Configure daily summary schedule? (y/n): y
What time should daily summaries run? (HH:MM in 24-hour format, UTC): 09:00
Configuration is saved to ~/.memanto/config.json (not in git).

Option 2: Environment Variable

export MOORCHEH_API_KEY=mk_your_api_key_here

# Then run MEMANTO
memanto status

Option 3: .env File

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

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

Verify Configuration

Check API Key Status

memanto config show
Output should show:
Moorcheh API Key:    ✓ Configured
Configuration Path:  ~/.memanto/config.json
Active Agent:        (none)
Active Session:      (none)

Test Moorcheh Connectivity

memanto status
Should show:
Moorcheh Connection: ✓ Connected

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"}

Understanding Free Tier

Included in Free Tier

  • 500 monthly credits (~100,000 operations)
  • Create up to 5 agents
  • Unlimited sessions (no session limits)
  • No credit card required

What Counts as Operations?

  • Write operations: remember, batch-remember = 1 operation per memory
  • Read operations: recall, answer = 1 operation per query
  • Special operations: daily-summary, conflicts = 1 operation

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.

Multi-Environment Setup

Development

# .env.development
MOORCHEH_API_KEY=mk_dev_key_here
MEMANTO_SERVER=http://localhost:8000

Testing

# .env.test
MOORCHEH_API_KEY=mk_test_key_here
MEMANTO_SERVER=http://localhost:8001

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 mk_
# 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
memanto config show

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

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.

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 MEMANTO to use it:
export MOORCHEH_BASE_URL=https://moorcheh.your-company.internal
export MOORCHEH_API_KEY=mk_your_key

Best Practices

DO

  • Store API keys in environment variables
  • Rotate keys regularly
  • Use secrets manager for production
  • Monitor API usage via dashboard
  • Set up billing alerts

DON’T

  • Commit keys to Git
  • Share keys in Slack/Email
  • Use same key across environments
  • Hardcode keys in client code
  • Expose keys in logs

Next Steps


All set! Your Moorcheh integration is ready. Proceed to the Quick Start guide.