Documentation Index
Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Memanto uses a two-header authentication system: Moorcheh API key for all requests, and session tokens for memory operations.All Requests
Uses Moorcheh API Key in the
Authorization header. Required for every API call.Memory Operations
Uses Session Token in the
X-Session-Token header. Required only for memory endpoints.API Key Authentication
Required Header
Every request to Memanto API must include:Getting Your API Key
- Go to https://console.moorcheh.ai/api-keys
- Create a new API key
- Copy the full key value
- Use in Authorization header
Example Request
In Python
Session Token Authentication
When Session Tokens Are Required
Memory operations require a session token from agent activation:POST /api/v2/agents/{agent_id}/rememberGET /api/v2/agents/{agent_id}/recallPOST /api/v2/agents/{agent_id}/answerGET /api/v2/session/currentPOST /api/v2/session/extendPOST /api/v2/agents/{agent_id}/deactivate- All temporal queries
- All memory management endpoints
Getting a Session Token
- Activate an agent:
- Response contains session token:
- Use token in subsequent requests:
Example Request with Session Token
In Python
Endpoints Not Requiring Session Token
These endpoints only need API key:POST /api/v2/agents- Create agentGET /api/v2/agents- List agentsGET /api/v2/agents/{agent_id}- Get agent detailsDELETE /api/v2/agents/{agent_id}- Delete agentPOST /api/v2/agents/{agent_id}/activate- Activate (returns token)
Session Token Details
Token Format
Session tokens are JWT (JSON Web Tokens):Token Expiration
- Duration: 6 hours from activation
- Checking expiry: Decode token to see
expires_at - Extending: Use
POST /api/v2/session/extend - Renewal: Activate a new session with
POST /api/v2/agents/{agent_id}/activate
Decode Token (Python)
Error: Invalid API Key
Symptom
Solutions
- Check API key value and ensure it is copied completely
- Verify key hasn’t been rotated in Moorcheh Console
- Ensure no typos in header value
- Generate new key if needed
Error: Missing Session Token
Symptom
Solutions
- Activate agent first:
POST /api/v2/agents/{agent_id}/activate - Save the returned
session_token - Include token in
X-Session-Tokenheader
Error: Expired Session Token
Symptom
Solutions
- Extend existing session:
POST /api/v2/session/extend - Or activate new session:
POST /api/v2/agents/{agent_id}/activate
Best Practices
DO
- Store API key in environment variable
- Use secrets manager for production
- Keep session tokens in memory (don’t persist)
- Extend sessions before expiry
- Rotate API keys periodically
DON’T
- Commit API keys to git
- Hardcode keys in code
- Share API keys
- Use same key across environments
- Log tokens to files
Security
API Key Management
Development:Session Token Security
- Tokens are JWT - treat as sensitive
- Don’t log tokens
- Don’t expose in client code
- Short-lived (6 hours)
- Unique per activation