Memory API

Intelligent memory for your AI agents

The Memory API gives your AI agents persistent, intelligent memory that understands time, relationships, and context. Built for cost efficiency at scale.

Quick Start

1. Get your API key

Sign up at aisnapbuild.com and generate an API key from your dashboard.

2. Install the SDK

npm install @aisnapbuild/memory

3. Store your first memory

import { MemoryClient } from '@aisnapbuild/memory';

const memory = new MemoryClient({
  apiKey: process.env.AISNAPBUILD_API_KEY
});

// Store a memory
await memory.store({
  content: "User prefers dark mode interfaces",
  entityId: "user_123",
  metadata: { source: "settings", confidence: 0.95 }
});

// Query memories
const results = await memory.query({
  text: "user preferences",
  limit: 5,
  temporalWeight: 0.8  // Prefer recent memories
});

API Endpoints

MethodEndpointDescription
POST/v1/memoryStore a new memory
GET/v1/memory/queryQuery memories with semantic search
GET/v1/memory/{id}Retrieve a specific memory
DELETE/v1/memory/{id}Delete a memory
POST/v1/relationshipsCreate entity relationships
GET/v1/relationships/graphQuery relationship graph

Base URL: https://api.aisnapbuild.com

Authentication

All API requests require an API key passed in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Keep your API key secure. Never expose it in client-side code.Learn more about authentication →

Use Cases

Conversational AI

Give chatbots memory that persists across sessions with natural time decay.

Personalization

Remember user preferences and behavior patterns for tailored experiences.

Knowledge Bases

Store and retrieve organizational knowledge with relationship context.

Agent Workflows

Share context between multiple AI agents working on complex tasks.