Magneteco
Getting Started

Quick Start

Get up and running with Magneteco in 5 minutes

Quick Start

Get Magneteco integrated into your application quickly.

1. Install the client

npm install @magneteco/client

2. Configure for your app

import { MagnetoClient } from '@magneteco/client';

const memory = new MagnetoClient({
  appId: 'my-app',
  baseUrl: process.env.MAGNETECO_URL,
  apiKey: process.env.MAGNETECO_API_KEY,
});

3. Memorize conversations

await memory.memorize({
  userId: 'user-123',
  content: conversationText,
  contentType: 'conversation',
});

4. Retrieve context

const context = await memory.retrieve({
  userId: 'user-123',
  query: userMessage,
  maxTokens: 2000,
});

// Inject into your agent's prompt
const prompt = `${memory.formatForPrompt(context)}\n\nUser: ${userMessage}`;

5. Track events

await memory.trackEvent({
  userId: 'user-123',
  eventType: 'project_completed',
  data: { projectId: 'proj-456', projectName: 'Website Redesign' },
  importance: 'high',
});

Write Path

Input (conversation/event)

Store raw resource (S3)

Extract atomic facts (LLM)

Classify by category

For each category:
    - Load existing summary
    - Evolve summary with new facts (LLM handles conflicts)
    - Save updated summary

Extract entities → Neo4j nodes
Extract relationships → Neo4j edges (with conflict detection)

Read Path

Query

Select relevant categories (LLM)

Load category summaries

Sufficient? → Return

Vector search for specific items

Graph traversal for relationships

Apply time decay ranking

Assemble within token budget

Next Steps

On this page