Learn how to add basic text content to Supermemory with simple, practical examples.

Add Simple Text

The most basic operation - adding plain text content.
const response = await client.memories.add({
  content: "Artificial intelligence is transforming how we work and live"
});

console.log(response);
// Output: { id: "abc123", status: "queued" }

Add with Container Tags

Group related content using container tags.
const response = await client.memories.add({
  content: "Q4 2024 revenue exceeded projections by 15%",
  containerTag: "financial_reports"
});

console.log(response.id);
// Output: xyz789

Add with Metadata

Attach metadata for better search and filtering.
await client.memories.add({
  content: "New onboarding flow reduces drop-off by 30%",
  containerTag: "product_updates",
  metadata: {
    impact: "high",
    team: "product"
  }
});

Add Multiple Documents

Process multiple related documents.
const notes = [
  "API redesign discussion",
  "Security audit next month",
  "New hire starting Monday"
];

const results = await Promise.all(
  notes.map(note =>
    client.memories.add({
      content: note,
      containerTag: "meeting_2024_01_15"
    })
  )
);

Add URLs

Process web pages, YouTube videos, and other URLs automatically.
// Web page
await client.memories.add({
  content: "https://example.com/article",
  containerTag: "articles"
});

// YouTube video (auto-transcribed)
await client.memories.add({
  content: "https://youtube.com/watch?v=dQw4w9WgXcQ",
  containerTag: "videos"
});

// Google Docs
await client.memories.add({
  content: "https://docs.google.com/document/d/abc123/edit",
  containerTag: "docs"
});

Add Markdown Content

Supermemory preserves markdown formatting.
const markdown = `
# Project Documentation

## Features
- **Real-time sync**
- **AI search**
- **Enterprise security**
`;

await client.memories.add({
  content: markdown,
  containerTag: "docs"
});