Logo IconGuided Mind
v2.4
Memory

Short Memory — API Setup

Generate API keys and integrate with short memory endpoints.

The API Setup tab provides your authentication credentials and endpoint reference for integrating short memory into your application.

API Key

Your API key authenticates all requests to the short memory API. Keys are prefixed with mk_ to distinguish them from RAG project keys.

Key management:

  • View key — Display your current API key (shown only once during creation)
  • Copy key — Copy to clipboard for immediate use
  • Regenerate — Create a new key and invalidate the previous one

Security: Store your API key in environment variables or a secrets manager. Never commit keys to version control or expose them in client-side code.

Authentication

All requests require the X-Memory-Api-Key header:

X-Memory-Api-Key: mk_your_key_here

Endpoints

Add Messages

Store one or more messages in a session.

curl -X POST https://api.guidedmind.ai/api/v1/memory/short/messages \
-H "Content-Type: application/json" \
-H "X-Memory-Api-Key: mk_your_key_here" \
-d '{
  "session_id": "550e8400-e29b-41d4-a716-446655440000",
  "messages": [
    {
      "role": "user",
      "content": "Hello, I need help with my order",
      "metadata": {"source": "chat"}
    },
    {
      "role": "assistant",
      "content": "I'd be happy to help. Can you provide your order number?",
      "metadata": {"model": "claude-3"}
    }
  ]
}'

Response:

{
  "session_id": "550e8400-e29b-41d4-a716-446655440000",
  "messages": [
    {
      "role": "user",
      "content": "Hello, I need help with my order",
      "timestamp": "2024-01-15T10:30:00Z",
      "metadata": {"source": "chat"}
    }
  ],
  "total_count": 1
}

Get Messages

Retrieve all active messages for a session.

curl https://api.guidedmind.ai/api/v1/memory/short/messages/550e8400-e29b-41d4-a716-446655440000 \
-H "X-Memory-Api-Key: mk_your_key_here"

Response:

{
  "session_id": "550e8400-e29b-41d4-a716-446655440000",
  "messages": [
    {
      "role": "user",
      "content": "Hello, I need help with my order",
      "timestamp": "2024-01-15T10:30:00Z",
      "metadata": {"source": "chat"}
    },
    {
      "role": "assistant",
      "content": "I'd be happy to help. Can you provide your order number?",
      "timestamp": "2024-01-15T10:30:05Z",
      "metadata": {"model": "claude-3"}
    }
  ],
  "total_count": 2
}

Error Responses

StatusMeaning
401Invalid or missing API key
404Session not found or project disabled
429Rate limit exceeded
500Internal server error

SDK Installation

pip install guidedmind-rag-sdk-python

Next Steps

Your short memory project is ready. Start storing and retrieving conversation context in your AI agent.