Quickstart

Get a multi-model memo running in under 5 minutes.

Prerequisites

You need API keys for the providers you want to use. At minimum, you need one — but the full panel requires all four:

# .env
OPENAI_API_KEY=sk-...       # The Strategist
ANTHROPIC_API_KEY=sk-ant-...  # The Analyst
XAI_API_KEY=xai-...         # The Challenger
GOOGLE_API_KEY=AIza...       # The Architect
Note
The engine gracefully handles missing providers. If a key is missing, that advisor is simply excluded from the panel for that memo.

1. Install the free SDK

npm install decisionmemos

2. Configure API keys

Create a .env file with your provider API keys, or pass them programmatically:

import { createMultiModelQuery } from 'decisionmemos';

// Reads from process.env by default
const query = createMultiModelQuery();

// Or pass keys explicitly
const query = createMultiModelQuery({
  keys: {
    openai: 'sk-...',
    anthropic: 'sk-ant-...',
    xai: 'xai-...',
    google: 'AIza...',
  },
});

3. Query four models in parallel

The free SDK gives you typed responses from every configured model:

const result = await query.ask(
  "Should we build a mobile app or a progressive web app?"
);

console.log(result.successCount + " models responded");

for (const r of result.responses) {
  console.log(r.modelName, r.response.slice(0, 200));
}
// → GPT-5.2: "For a 6-week timeline..."
// → Claude Opus 4.6: "PWAs have closed the gap..."
// → Grok 4.1: "Mobile app. Here's why..."
// → Gemini 3 Pro: "Consider a PWA with..."
Note
The free SDK returns raw model responses — no synthesis, no consensus scoring, no Decision Memo. For structured verdicts, use the paid API.

4. Upgrade to structured verdicts

The hosted API adds persona-tuned prompts, synthesis with consensus scoring, and structured Decision Memos. Call it with your dm_ API key:

const res = await fetch(
  'https://api.decisionmemos.com/v1/deliberate',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer dm_live_...',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      question: "Mobile app or PWA?",
      criteria: [
        { name: "Time to market" },
        { name: "User experience" },
      ],
      // BYOK: 20% off per key you provide
      byok: { openai: "sk-...", google: "AIza..." },
    }),
  }
);

const { memo } = await res.json();
console.log(memo.verdict.decision);
// → "Build a PWA first, then evaluate native..."
console.log(memo.verdict.consensusDisplay);
// → "The panel is united."

Next steps

Read the Concepts page to understand the deliberation model, or jump to the SDK Reference for the full free SDK surface.