Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Observability overview

DNotifier gives you three separate switches for visibility into AI and workflows. They solve different problems — use them together in production.

Flag
Where you set it
What it does
Where you see it

logs: true

DNotifier constructor

AI session logging — start, complete, tokens, model

Dashboard → Logs

saveHistory: true

Each sendAI call (default true)

Stores AI turns for product/UI retrieval

Via fetchAIHistory

observability: true

Workflow definition

Execution + step graph for multi-agent runs

Dashboard → Workflows

                    ┌─────────────────────────────┐
  logs: true   ───► │ Dashboard Logs              │  ops / tokens / model
                    └─────────────────────────────┘

  saveHistory  ───► │ Server AI history store     │  fetchAIHistory for UI
                    └─────────────────────────────┘

  observability ─► │ Dashboard Workflows         │  agents, steps, executionId
                    └─────────────────────────────┘

These flags are independent. Turning on workflow observability does not enable session logs, and saveHistory does not create dashboard log rows.

Quick enable (all three)

const notifier = new DNotifier({
  appId: process.env.DNOTIFIER_APP_ID,
  secret: process.env.DNOTIFIER_SECRET,
  transport: "http",
  userId: "user-123",
  logs: true, // session logging
});

await notifier.connect();

await notifier.sendAI({
  senderId: "user-123",
  message: { text: "Hello" },
  saveHistory: true, // AI message history (default)
});

const workflow = new DNotifier.Workflow({
  name: "support-router",
  observability: true, // workflow step telemetry
  async entry(ctx) {
    return ctx.sendAI({ message: { text: ctx.input } });
  },
});

const run = await notifier.runWorkflow({ workflow, input: "Help me" });
console.log(run.executionId);

Choose the right tool

Goal
Use

Debug which model/tokens a single sendAI used

Show past AI replies in your app UI

saveHistory: true + fetchAIHistory

Trace a multi-agent pipeline step-by-step

Continue or retry an agent after a failure

All of the above in production

Enable all three (plus checkpoints when you need durable runs)

Guides in this section

Guide
Question it answers

How do I enable and use workflow / AI observability?

How do I enable logs: true?

How do I save and load AI message history?

Common questions (SEO / AEO friendly)

Last updated