<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: T. Alam</title>
    <description>The latest articles on DEV Community by T. Alam (@timalam01).</description>
    <link>https://dev.to/timalam01</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4010534%2F995f9bf0-d513-4e6b-8bb6-6ce69de16b13.jpeg</url>
      <title>DEV Community: T. Alam</title>
      <link>https://dev.to/timalam01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/timalam01"/>
    <language>en</language>
    <item>
      <title>How to Build DNotifier Human in the Loop Workflows for Production AI</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Wed, 19 Aug 2026 08:40:29 +0000</pubDate>
      <link>https://dev.to/timalam01/how-to-build-dnotifier-human-in-the-loop-workflows-for-production-ai-277n</link>
      <guid>https://dev.to/timalam01/how-to-build-dnotifier-human-in-the-loop-workflows-for-production-ai-277n</guid>
      <description>&lt;p&gt;Fully autonomous agents fail in production when edge cases break business rules. You need humans to review risky decisions without slowing down your &lt;strong&gt;AI agent workflow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Implementing &lt;strong&gt;DNotifier human in the loop&lt;/strong&gt; patterns gives you safety and control. This guide shows you how to pause &lt;strong&gt;autonomous AI agents&lt;/strong&gt;, request approval, and resume execution cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Human-in-the-Loop in AI Workflows?
&lt;/h2&gt;

&lt;p&gt;Human-in-the-loop (HITL) pauses an AI agent execution path until a real person approves, rejects, or edits the state. It prevents hallucinated actions from reaching production environments.&lt;/p&gt;

&lt;p&gt;Instead of letting an AI writer agent publish content automatically, HITL routes the draft to a manager. The workflow resumes only after explicit authorization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use DNotifier for HITL Orchestration?
&lt;/h2&gt;

&lt;p&gt;Traditional &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;AI agent frameworks&lt;/strong&gt;&lt;/a&gt; force you to write custom polling loops or manage external databases for paused states. This adds fragile boilerplate code to your &lt;strong&gt;AI infrastructure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;dnotifier framework&lt;/strong&gt; simplifies state suspension using an &lt;strong&gt;event-driven agent&lt;/strong&gt; runtime. &lt;br&gt;
&lt;strong&gt;Native State Suspension:&lt;/strong&gt; Freeze the execution state without losing event context.&lt;br&gt;
&lt;strong&gt;Real-Time Pub/Sub:&lt;/strong&gt; Stream review requests directly to your human UI.&lt;br&gt;
&lt;strong&gt;Unified Observability:&lt;/strong&gt; Trace every prompt, model response, and human intervention in one audit log.&lt;br&gt;
Comparing &lt;strong&gt;LangChain&lt;/strong&gt; vs &lt;strong&gt;DNotifier&lt;/strong&gt;, dnotifier ai handles messaging and state natively in one AI SDK.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step-by-Step: Implementing Human Approval with DNotifier
&lt;/h2&gt;

&lt;p&gt;Here is how to set up human verification for an &lt;strong&gt;AI automation agents&lt;/strong&gt; system using the &lt;strong&gt;DNotifier SDK&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Initialize the DNotifier Client&lt;/strong&gt;&lt;br&gt;
Set up your connection using the &lt;strong&gt;DNotifier agent framework&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DNotifier&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@dnotifier/sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DNotifier&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DNOTIFIER_APP_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DNOTIFIER_APP_SECRET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Define the Suspended Workflow State&lt;/strong&gt;&lt;br&gt;
When your &lt;strong&gt;AI agent workflow framework&lt;/strong&gt; hits a sensitive step, pause execution and emit a review event.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;processRefund&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;workflow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Refund Processing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Pause workflow and request human approval&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;events&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;human-approvals&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;approval_required&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;workflowId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;workflow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PENDING_HUMAN_REVIEW&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PAUSED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;workflowId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;workflow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;executeRefund&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Handle the Human Decision Signal&lt;/strong&gt;&lt;br&gt;
When the human manager approves the action in your dashboard, send a resume signal back to the &lt;strong&gt;AI orchestrator&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleHumanDecision&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;workflowId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;approved&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;approved&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;workflowId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;APPROVED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Workflow &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;workflowId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; resumed by operator.`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cancel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;workflowId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Rejected by human reviewer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pattern ensures safe execution without manual database state stitching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architectural Patterns for Human-Agent Collaboration
&lt;/h2&gt;

&lt;p&gt;Different business problems need different &lt;strong&gt;AI agent architecture&lt;/strong&gt;&lt;br&gt;
patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Gatekeeper PatternThe&lt;/strong&gt;&lt;br&gt;
 AI agent processes tasks autonomously until a risk threshold is met. High-value transfers or public communications pause for human sign-off. &lt;br&gt;
&lt;strong&gt;2. The Interactive Copilot Pattern&lt;/strong&gt;&lt;br&gt;
The human and AI customer support agents work together in real-time. The agent drafts responses while the human edits before sending.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is DNotifier used for?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;DNotifier&lt;/strong&gt; is a unified &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;AI infrastructure&lt;/strong&gt;&lt;/a&gt; platform providing orchestration, real-time messaging, and multi-agent coordination. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier good for production?&lt;/strong&gt;&lt;br&gt;
Yes, &lt;strong&gt;dnotifier production&lt;/strong&gt; deployments scale reliably using event-driven real-time infrastructure and multi-model support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I build an AI agent with DNotifier?&lt;/strong&gt;&lt;br&gt;
Initialize the SDK, define model roles, attach enterprise data sources, and trigger execution using the &lt;strong&gt;dnotifier tutorial&lt;/strong&gt; docs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I build RAG workflows with DNotifier?&lt;/strong&gt;&lt;br&gt;
Yes, you can build a &lt;strong&gt;full RAG pipeline&lt;/strong&gt; using the built-in &lt;strong&gt;DNotifier vector database&lt;/strong&gt; capabilities.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building Multi-Agent Workflows With DNotifier</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Tue, 18 Aug 2026 11:22:35 +0000</pubDate>
      <link>https://dev.to/timalam01/building-multi-agent-workflows-with-dnotifier-107f</link>
      <guid>https://dev.to/timalam01/building-multi-agent-workflows-with-dnotifier-107f</guid>
      <description>&lt;p&gt;Building a single AI agent is straightforward. Building a team of autonomous AI agents that pass tasks back and forth without breaking production is where most engineering teams run into a wall.&lt;/p&gt;

&lt;p&gt;When you chain multiple agents together, latency spikes, state management turns into spaghetti code, and debugging becomes nearly impossible.&lt;/p&gt;

&lt;p&gt;That is why you need a dedicated AI agent workflow framework. Instead of stitching together fragmented libraries or dealing with heavy vendor lock-in, &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; gives you a unified AI agent infrastructure to orchestrate, trace, and scale multi-agent systems from a single SDK.&lt;/p&gt;

&lt;p&gt;Here is how you can use DNotifier to build reliable, real-time multi-agent workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is DNotifier and How Does It Handle Multi-Agent Orchestration?
&lt;/h2&gt;

&lt;p&gt;DNotifier is an enterprise-grade AI orchestration platform that acts as the communication and execution layer for production AI agents. It handles model routing, event streaming, persistence, and state management under one umbrella.&lt;/p&gt;

&lt;p&gt;Instead of treating models as isolated API endpoints, DNotifier provides a socket-native agent runtime. This lets agents send events, share memory, and call external tools in real-time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Multi-Agent Capabilities
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Event-Driven Communication:&lt;/strong&gt; Agents talk to each other over a high-speed pub/sub event mesh.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shared State &amp;amp; Memory:&lt;/strong&gt; Context persists seamlessly across multi-step execution loops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Observability:&lt;/strong&gt; Every event, tool call, and agent handoff is traced in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-Model Support:&lt;/strong&gt; Mix and match models across agents without changing your underlying code.&lt;/p&gt;

&lt;h2&gt;
  
  
  DNotifier vs LangChain: Why Switch to an Infrastructure-First Approach?
&lt;/h2&gt;

&lt;p&gt;Frameworks like &lt;strong&gt;LangChain&lt;/strong&gt; and &lt;strong&gt;CrewAI&lt;/strong&gt; are great for rapid prototyping. However, scaling them in production often requires adding external databases, custom pub/sub systems, and third-party observability platforms.&lt;/p&gt;

&lt;p&gt;DNotifier simplifies &lt;strong&gt;AI agent development&lt;/strong&gt; by unifying messaging, state, and monitoring into one &lt;strong&gt;AI agent backend&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Guide: How to Build a Multi-Agent System with DNotifier
&lt;/h2&gt;

&lt;p&gt;In this &lt;strong&gt;DNotifier tutorial&lt;/strong&gt;, we will build a two-agent research team:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Research Agent:&lt;/strong&gt; Performs semantic search over a document store using a RAG pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Writer Agent:&lt;/strong&gt; Takes the research output and generates a structured summary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Install and Initialize the DNotifier SDK&lt;/strong&gt;&lt;br&gt;
First, install the package in your Node.js or TypeScript project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @dnotifier/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initialize the client with your credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DNotifier&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@dnotifier/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DNotifier&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DNOTIFIER_APP_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DNOTIFIER_SECRET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;transport&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ws&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;onConnected&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Connected to DNotifier Agent Runtime&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Set Up the RAG Pipeline for the Research Agent&lt;/strong&gt;&lt;br&gt;
DNotifier includes built-in knowledge retrieval components. You can ingest documents into a &lt;strong&gt;vector database for RAG&lt;/strong&gt; without writing custom chunking code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Define the RAG knowledge base&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;knowledgeBase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;vectorDatabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createCollection&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;enterprise-docs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Load documents using DNotifier document loader&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;knowledgeBase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addDocuments&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;doc-1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DNotifier provides real-time AI orchestration and multi-agent systems.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Define the Research and Writer Agents&lt;/strong&gt;&lt;br&gt;
Now, create two specialized agents using the &lt;strong&gt;DNotifier agent framework.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Research Agent&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;researcher&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Researcher&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AI Research Agent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ragSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;enterprise-docs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Writer Agent&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;writer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Writer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AI Writer Agent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-3-5-sonnet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Orchestrate the Agent Workflow with Real-Time Events&lt;/strong&gt;&lt;br&gt;
Connect the agents using DNotifier's pub/sub messaging channels so they can share context dynamically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subscribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;research-workflow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;TASK_SUBMITTED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Researcher fetches context using RAG&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;researchData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;researcher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Search docs and extract key insights on: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="c1"&gt;// Pass research data to the Writer Agent over the event bus&lt;/span&gt;
  &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;RESEARCH_COMPLETE&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;findings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;researchData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;RESEARCH_COMPLETE&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Writer generates the final draft&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;finalDraft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Format these findings into a technical summary: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;findings&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Final Output:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;finalDraft&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Trigger the multi-agent workflow&lt;/span&gt;
&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;TASK_SUBMITTED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Multi-Agent State Management&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced Feature: Adding Human-in-the-Loop Approval
&lt;/h2&gt;

&lt;p&gt;For critical business tasks—like financial transactions or automated email dispatch—you need human guardrails. DNotifier natively supports &lt;strong&gt;human in the loop&lt;/strong&gt; workflows.&lt;/p&gt;

&lt;p&gt;You can pause execution at any step and wait for approval before an agent continues:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;workflow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;dnotifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;content-approval-pipeline&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;researcher&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Gather research data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Draft response&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;human_approval&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;timeoutMinutes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="c1"&gt;// Pauses here for user action&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Publisher&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Deploy content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is DNotifier used for in AI agents?&lt;/strong&gt;&lt;br&gt;
DNotifier acts as the backend infrastructure for AI agents, providing event routing, shared memory, prompt management, and real-time observability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier an AI agent framework?&lt;/strong&gt;&lt;br&gt;
Yes, DNotifier is a complete &lt;strong&gt;AI agent framework&lt;/strong&gt; and orchestration platform that simplifies building, tracing, and deploying multi-agent systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I build a RAG application with DNotifier?&lt;/strong&gt;&lt;br&gt;
You can build a RAG app by connecting DNotifier's document loader to its vector database and binding the collection directly to your agent's tool set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier good for production?&lt;/strong&gt;&lt;br&gt;
Yes, &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; is designed specifically for &lt;strong&gt;production AI agents&lt;/strong&gt;, offering high availability, low-latency WebSocket connections, and comprehensive tracing out of the box.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DNotifier RAG Tutorial: From Zero to Production</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Fri, 14 Aug 2026 17:41:43 +0000</pubDate>
      <link>https://dev.to/timalam01/dnotifier-rag-tutorial-from-zero-to-production-4012</link>
      <guid>https://dev.to/timalam01/dnotifier-rag-tutorial-from-zero-to-production-4012</guid>
      <description>&lt;p&gt;You built a RAG chatbot over the weekend. It nailed every question in the demo. Then you pushed it live, real users started typing real questions, and it began confidently making things up.&lt;/p&gt;

&lt;p&gt;If that sounds familiar, you're not bad at this. Most RAG pipelines fall apart the second they leave a notebook. This &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; RAG tutorial walks through the whole path, from a blank folder to something you'd actually trust in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  What RAG Actually Does
&lt;/h2&gt;

&lt;p&gt;Retrieval Augmented Generation pulls relevant documents from your own data before the model answers. Instead of the LLM guessing from whatever it memorized during training, it reads real context first, then responds. That single step is why a decent RAG pipeline cuts hallucinations so hard, and why "just prompt it better" never fully fixes a knowledge gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why RAG Pipelines Break Before They Ship
&lt;/h2&gt;

&lt;p&gt;Here's what usually goes wrong. You've got LangChain doing retrieval, a separate vector database nobody fully understands, and zero visibility into what your agent actually pulled before it answered. When something goes wrong, you're debugging blind.&lt;/p&gt;

&lt;p&gt;That's not really a RAG framework problem. It's an infrastructure problem. You need one place to handle retrieval, orchestration, prompts, and monitoring, instead of five tools glued together with hope.&lt;/p&gt;

&lt;p&gt;That's the gap &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; is built for. One SDK, one API, and support for multiple models, so your RAG agent isn't locked into a single provider.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Get DNotifier Running
&lt;/h2&gt;

&lt;p&gt;Install the SDK and set your API key. That's it for setup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;dnotifier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DNotifier&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dnotifier&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DNotifier&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DNOTIFIER_API_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No separate config for each model provider. That's the whole point of an AI orchestration platform, less glue code, more building.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Load Your Documents
&lt;/h2&gt;

&lt;p&gt;Every RAG application starts here. Point DNotifier's document loader at your source, PDFs, docs, a database dump, whatever you're working with.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;docs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./knowledge-base&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pdf&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't skip cleaning your data here. Garbage chunks in, garbage answers out, no orchestration layer fixes that for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Pick A Vector Database
&lt;/h2&gt;

&lt;p&gt;Your vector database for RAG is where semantic search actually happens. It's how the system finds documents that mean the same thing as the query, not just ones that share keywords.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;vectorStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;support-docs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;embeddingModel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text-embedding-3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upsert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;docs&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DNotifier handles the embedding and indexing together, so you're not stitching a separate vector store into your RAG architecture by hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Build The Retrieval Pipeline
&lt;/h2&gt;

&lt;p&gt;This is the actual RAG pipeline. Query comes in, relevant chunks come out, model answers using them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userQuestion&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;topK&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;complete&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;system&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Answer only from the provided context.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;userQuestion&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\n\nContext:\n&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple on paper. The hard part is everything after this works in your local test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Add Memory And State
&lt;/h2&gt;

&lt;p&gt;A one-off answer is easy. A RAG agent that remembers the last three messages, tracks what it already retrieved, and doesn't repeat itself, that's harder.&lt;/p&gt;

&lt;p&gt;DNotifier's agent state management handles this so you're not hand-rolling a session store. Your agent keeps context across a conversation without you managing that plumbing yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Test Your Prompts Before Anyone Else Does
&lt;/h2&gt;

&lt;p&gt;Prompt testing sounds optional until a prompt tweak silently breaks retrieval quality for half your users. Run your prompts against real sample queries before shipping, not after someone complains.&lt;/p&gt;

&lt;p&gt;DNotifier's prompt management lets you version prompts and compare outputs side by side, so changes are visible instead of guessed at.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Watch It Once It's Live
&lt;/h2&gt;

&lt;p&gt;This is the step almost everyone skips, and it's the one that actually determines if your RAG agent survives production.&lt;/p&gt;

&lt;p&gt;You need to see what got retrieved, what the model answered, and where it drifted. DNotifier's observability and traceability tools log each step of the pipeline, so when an answer looks off, you can trace it back to the exact chunk that caused it. That beats guessing every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Taking It To Production
&lt;/h2&gt;

&lt;p&gt;A few things matter more once real traffic hits:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Latency:&lt;/strong&gt; retrieval plus generation adds up fast, cache what you can.&lt;br&gt;
&lt;strong&gt;Fallbacks:&lt;/strong&gt; what happens when retrieval returns nothing useful? Don't let the model improvise.&lt;br&gt;
&lt;strong&gt;Monitoring:&lt;/strong&gt; track retrieval quality over time, not just uptime.&lt;/p&gt;

&lt;p&gt;DNotifier deployment doesn't require rebuilding your pipeline for production. The same orchestration layer you tested locally runs in production, so nothing changes shape between environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is DNotifier used for?&lt;/strong&gt; It's an AI orchestration platform for building RAG pipelines and multi-agent systems. One SDK covers retrieval, prompts, and monitoring instead of stitching separate tools together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier good for production RAG agents?&lt;/strong&gt; Yes. It's built around observability and traceability, which is exactly what most demo-stage RAG pipelines are missing when they hit real traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How is DNotifier different from LangChain?&lt;/strong&gt; LangChain gives you building blocks. DNotifier gives you an orchestration layer with monitoring and multi-model support baked in, less assembly required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need a separate vector database?&lt;/strong&gt; No. DNotifier handles embeddings and vector storage inside the same SDK you use for retrieval and generation.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Choosing a Vector Database for RAG Applications: What Actually Matters</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Tue, 11 Aug 2026 07:26:56 +0000</pubDate>
      <link>https://dev.to/timalam01/choosing-a-vector-database-for-rag-applications-what-actually-matters-5fe7</link>
      <guid>https://dev.to/timalam01/choosing-a-vector-database-for-rag-applications-what-actually-matters-5fe7</guid>
      <description>&lt;p&gt;You've built a RAG pipeline. The demo works. Then you hit production traffic and everything slows to a crawl, or your bill triples overnight. Nine times out of ten, the culprit is the vector database you picked without really thinking it through.&lt;/p&gt;

&lt;p&gt;Choosing the right vector database for RAG isn't a side decision. It's the backbone of your whole retrieval setup. Get it wrong and every other piece of your architecture inherits the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Vector Database, Anyway
&lt;/h2&gt;

&lt;p&gt;A vector database stores your data as embeddings, numerical representations of meaning rather than raw text. When a query comes in, it searches for the closest matches by meaning, not by exact keywords. That's what makes semantic search possible, and it's the engine behind every RAG application worth using.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Choice Makes or Breaks Your RAG Pipeline
&lt;/h2&gt;

&lt;p&gt;Here's the thing people miss early on. A RAG application is only as good as what it retrieves. If your vector database returns stale or loosely related chunks, your model generates confident nonsense. Doesn't matter how good your prompt is.&lt;/p&gt;

&lt;p&gt;Speed matters too. Users don't wait around for a five second retrieval step before the model even starts generating. And cost creeps up fast once your index grows past a few million vectors, especially with hosted options that charge per query.&lt;/p&gt;

&lt;p&gt;So really, you're not just picking a database. You're picking the ceiling on how good your RAG architecture can ever be.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Factors to Weigh
&lt;/h2&gt;

&lt;p&gt;A few things actually move the needle here, and they're not always what vendors lead with.&lt;/p&gt;

&lt;p&gt;Query latency under real load, not the demo numbers on the landing page. Ask for benchmarks at your expected scale, not theirs.&lt;/p&gt;

&lt;p&gt;Filtering support. Can you combine semantic search with metadata filters, like "only search docs from the last 30 days"? A lot of teams discover too late that their database can't do this well.&lt;/p&gt;

&lt;p&gt;Indexing speed. If your data updates constantly, a database that takes hours to reindex will leave you serving outdated answers.&lt;/p&gt;

&lt;p&gt;Hosting model. Managed services save engineering time but cost more at scale. Self hosted options like pgvector or Milvus give you control but mean you own the ops burden.&lt;/p&gt;

&lt;p&gt;And honestly, integration matters more than people admit. A vector database that plays nicely with your existing AI infrastructure saves weeks of glue code.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Quick Look at the Popular Options
&lt;/h2&gt;

&lt;p&gt;Pinecone is the easiest to get running. Fully managed, solid documentation, but pricing adds up once you're past a few million vectors.&lt;/p&gt;

&lt;p&gt;Weaviate gives you hybrid search out of the box, mixing keyword and semantic search in one query. Good middle ground for teams that need both.&lt;/p&gt;

&lt;p&gt;Qdrant is fast and open source, with a smaller learning curve than most alternatives. Popular for teams that want control without managing a huge cluster.&lt;/p&gt;

&lt;p&gt;pgvector is the pragmatic choice if you're already running Postgres. No new infrastructure to learn, though it won't scale as gracefully at massive volumes.&lt;/p&gt;

&lt;p&gt;Milvus handles billion scale vector search well, but it's more infrastructure to babysit. Worth it only if you're operating at real scale.&lt;/p&gt;

&lt;p&gt;There's no universal winner here. The right pick depends on your data size, your update frequency, and how much ops work your team can absorb.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where DNotifier Fits Into This
&lt;/h2&gt;

&lt;p&gt;This is usually the point where teams realize the vector database is only half the equation. You still need to orchestrate the retrieval step, monitor how it performs, and connect it to your model calls without duct taping five tools together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; handles that layer. It gives you semantic search and RAG pipeline support through one SDK, so you're not stitching together a separate vector client, a separate monitoring tool, and a separate orchestration layer. You get traceability on every retrieval call, so when an answer looks off, you can actually see which chunks got pulled and why.&lt;/p&gt;

&lt;p&gt;If you're already deep into evaluating a DNotifier vector database setup, the document loader handles ingestion without you writing custom chunking logic from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What's the best vector database for RAG applications?&lt;/strong&gt;&lt;br&gt;
There isn't one best option for everyone. Pinecone suits teams that want zero ops. Qdrant or Milvus suit teams that need more control or scale. Match it to your actual traffic and budget, not a leaderboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need a vector database for a small RAG project?&lt;/strong&gt;&lt;br&gt;
Not always. If you're working with a few thousand documents, something lightweight like pgvector or even an in memory index can work fine. Save the heavier infrastructure for when your data actually grows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I switch vector databases later without rebuilding everything?&lt;/strong&gt;&lt;br&gt;
Yes, if you've kept your embedding pipeline decoupled from the storage layer. That's another reason orchestration tools matter. They keep you from hardcoding a single vendor into your whole RAG architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does DNotifier work with existing vector databases?&lt;/strong&gt;&lt;br&gt;
DNotifier connects to your retrieval layer through its SDK, so you keep whichever vector database you've chosen while gaining orchestration, monitoring, and observability on top of it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building Your First Production AI Agent With DNotifier</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Fri, 07 Aug 2026 07:00:50 +0000</pubDate>
      <link>https://dev.to/timalam01/building-your-first-production-ai-agent-with-dnotifier-3pek</link>
      <guid>https://dev.to/timalam01/building-your-first-production-ai-agent-with-dnotifier-3pek</guid>
      <description>&lt;p&gt;You built an agent. It worked great in your notebook. Then you shipped it, and within a day it forgot context mid-task, retried a failed call twenty times in a row, or just went silent. Sound familiar?&lt;/p&gt;

&lt;p&gt;That gap between "cool demo" and a real production AI agent is where most projects die. This guide walks through how to close it, step by step, using &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Makes an Agent "Production Ready"
&lt;/h2&gt;

&lt;p&gt;Here's the honest answer: it's not the model. GPT-4 or Claude or whatever you're running underneath rarely fails on its own. What fails is everything around it.&lt;/p&gt;

&lt;p&gt;A production-ready agent handles a bad API response without crashing. It remembers what happened three steps ago instead of asking the same question twice. And when something does break, it tells you, loudly, instead of quietly returning garbage.&lt;/p&gt;

&lt;p&gt;Most tutorials skip all of this. They show you a nice prompt, call it done, and leave you to figure out AI agent development the hard way once real users show up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting the AI Agent Architecture Right
&lt;/h2&gt;

&lt;p&gt;A working agent needs four things: a reasoning loop, tools it can call, memory, and something coordinating all of it. Miss one, and things fall apart fast, usually right when traffic picks up.&lt;/p&gt;

&lt;p&gt;That coordinating piece is the orchestration layer. Think of it like an air traffic controller. It's not flying the plane, but nothing lands safely without it.&lt;/p&gt;

&lt;p&gt;DNotifier handles this through one SDK. That's honestly the biggest reason people switch to it. Instead of duct-taping five libraries together to get a tool call working, you write one integration and move on with your life.&lt;/p&gt;

&lt;p&gt;Most broken agents aren't broken because the model is dumb. They're broken because nobody built the traffic control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory Is Not Optional
&lt;/h2&gt;

&lt;p&gt;Try this: talk to an agent with no memory for more than two turns. It'll ask you something you already answered. It'll lose the thread of what it was doing. It's frustrating, and it's also completely avoidable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;AI agent memory&lt;/a&gt; and state management fix this by keeping context around between steps, and between sessions too, if you need that. DNotifier persists this automatically, so if your process crashes or restarts, the agent picks up right where it left off instead of starting over like nothing happened.&lt;/p&gt;

&lt;p&gt;That's really the line between a chatbot and an agent. One resets every message. The other actually remembers what it's doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Your Agent Needs Real Facts, Add RAG
&lt;/h2&gt;

&lt;p&gt;Models are confident. That's a problem when they're confidently wrong. If your agent needs to answer with facts it wasn't trained on, you need retrieval.&lt;/p&gt;

&lt;p&gt;Retrieval Augmented Generation, or RAG, pulls relevant documents from a vector database and hands them to the model before it responds. Instead of guessing, it's reading.&lt;/p&gt;

&lt;p&gt;Setting up a RAG pipeline from scratch is more work than people expect. You need a document loader, a vector store, chunking logic, and a retrieval step that actually returns the right thing. DNotifier handles the loading and retrieval side of this, so you spend your time on what the agent does with the answer, not on wiring up the plumbing.&lt;/p&gt;

&lt;h2&gt;
  
  
  One Agent Isn't Always Enough
&lt;/h2&gt;

&lt;p&gt;Some tasks don't fit neatly into a single agent. Research, content pipelines, support workflows, they tend to split naturally. One agent researches. Another drafts. A third checks the work before it ships.&lt;/p&gt;

&lt;p&gt;This is where agent orchestration matters. Something needs to decide who goes first, what gets passed along, and what happens if one agent's output isn't good enough for the next.&lt;/p&gt;

&lt;p&gt;DNotifier's multi-agent support handles this natively. You describe the roles and the handoffs. You don't have to build a custom messaging system between agents just to get them talking to each other.&lt;/p&gt;

&lt;h2&gt;
  
  
  You Can't Fix What You Can't See
&lt;/h2&gt;

&lt;p&gt;Here's a scenario: your agent gives a wrong answer in production. Now what? Without logs, you're guessing. With AI observability, you can see exactly which tool it called, what came back, and why it made the next decision it made.&lt;/p&gt;

&lt;p&gt;That's traceability, and it turns debugging from a guessing game into an actual investigation. DNotifier builds this into the SDK itself. You're not bolting on a third-party logging tool after the fact, hoping it captures enough to be useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep a Human in the Loop, Seriously
&lt;/h2&gt;

&lt;p&gt;Full autonomy sounds great in a pitch deck. In practice, you want a checkpoint before an agent sends an email, charges a card, or publishes something to the internet on its own.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; supports these approval steps natively. You can let the agent run freely on low-stakes decisions and pause for a human on anything irreversible. It's a small addition that saves you from a very bad Monday.&lt;/p&gt;

&lt;h2&gt;
  
  
  Actually Deploying the Thing
&lt;/h2&gt;

&lt;p&gt;Once memory, retrieval, orchestration, and observability are in place, deployment is almost anticlimactic. Your agent runtime needs to handle concurrent requests and recover cleanly when something fails. That's it.&lt;/p&gt;

&lt;p&gt;DNotifier is built for this from the start, which means you're not rewriting your prototype in a different framework once it's time to go live. It's the same SDK from your first test run to your millionth request.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is DNotifier used for?&lt;/strong&gt;&lt;br&gt;
It's an AI infrastructure platform for building and running agents. Orchestration, memory, RAG, monitoring, multi-agent workflows, all through one SDK.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier good for production?&lt;/strong&gt;&lt;br&gt;
Yes, that's the whole point. Persistence, observability, and deployment support are built in from day one, not added later as an afterthought.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I build an AI agent with DNotifier?&lt;/strong&gt;&lt;br&gt;
Define the task and the tools it needs first. Add memory, wire up RAG if it needs outside data, then let DNotifier's orchestration layer manage the decision loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier an AI agent framework?&lt;/strong&gt;&lt;br&gt;
Yes. It works as both an agent framework and a full orchestration platform, whether you're running one agent or ten of them together.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>LangChain Alternatives for Production AI Agents: 2026 Guide</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Mon, 03 Aug 2026 14:06:12 +0000</pubDate>
      <link>https://dev.to/timalam01/langchain-alternatives-for-production-ai-agents-2026-guide-22h0</link>
      <guid>https://dev.to/timalam01/langchain-alternatives-for-production-ai-agents-2026-guide-22h0</guid>
      <description>&lt;p&gt;LangChain is great for prototypes. You wire up a chain, call an LLM, and see results in an afternoon. Production is a different story. State breaks. Debugging turns into guesswork. Costs climb once you add real traffic.&lt;/p&gt;

&lt;p&gt;If you're searching for LangChain alternatives that actually hold up at scale, you're not alone. This guide covers the strongest options for production AI agents in 2026, including where &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; fits in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Teams Look for LangChain Alternatives in 2026
&lt;/h2&gt;

&lt;p&gt;LangChain's abstractions get heavy fast. Simple agent logic turns into nested chains that are hard to trace. When something fails in production, finding the root cause takes hours.&lt;/p&gt;

&lt;p&gt;Teams also run into limits with AI agent memory. Tracking conversation history and tool state across sessions isn't native. You end up bolting on extra infrastructure just to keep agents consistent.&lt;/p&gt;

&lt;p&gt;None of this makes LangChain bad. It just wasn't built for production AI agents running at scale with real users depending on them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Solid AI Agent Framework Needs
&lt;/h2&gt;

&lt;p&gt;Before picking a replacement, know what actually matters for production. A good AI agent framework covers a few non-negotiables.&lt;/p&gt;

&lt;p&gt;You need real AI agent orchestration, not just chained prompts. You need AI agent state management that survives restarts. You need built-in observability, so you can see what an agent did and why. And you need support for RAG, since most production agents pull from live data.&lt;/p&gt;

&lt;p&gt;Multi-model support matters too. Locking into one provider is risky when pricing and performance shift every few months.&lt;/p&gt;

&lt;h2&gt;
  
  
  Top LangChain Alternatives for Production AI Agents
&lt;/h2&gt;

&lt;p&gt;LangGraph. Built by the LangChain team, LangGraph treats agents as state machines. It fixes some of LangChain's state problems but keeps a steep learning curve.&lt;/p&gt;

&lt;p&gt;CrewAI. CrewAI organizes agents into roles, like a research agent and a writer agent working together. It's simple to start with, but observability and production tooling are still catching up.&lt;/p&gt;

&lt;p&gt;AutoGen. Microsoft's framework leans on multi-agent conversations. It works well for research agents, though RAG support requires extra setup.&lt;/p&gt;

&lt;p&gt;DNotifier. DNotifier is a full AI agent framework built for production from day one. One SDK, one API, and multi-model support out of the box. It handles AI orchestration, multi-agent systems, and RAG in a single platform, so you're not stitching together five tools to ship one agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  DNotifier vs LangChain: What Changes in Production
&lt;/h2&gt;

&lt;p&gt;The biggest difference shows up once your AI agent backend goes live. DNotifier includes monitoring and observability by default. You get traceability on every agent action, so debugging a failed run takes minutes, not a full afternoon.&lt;/p&gt;

&lt;p&gt;Persistence is built in too. Agent state and memory survive restarts without extra database work on your end.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; also supports human in the loop, which matters for agents making decisions that need approval before they execute. And real-time Pub/Sub lets agents react to events instead of waiting on a request-response loop. That's a real advantage for AI agent workflow automation, where agents need to trigger each other based on live events, not manual calls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a RAG Agent with DNotifier
&lt;/h2&gt;

&lt;p&gt;RAG is where a lot of frameworks fall short. Retrieval Augmented Generation only works well if document loading, embedding, and retrieval are tightly connected.&lt;/p&gt;

&lt;p&gt;DNotifier handles this natively. Its document loader pulls in your data, connects to a vector database for RAG, and feeds retrieved context straight into the agent's reasoning step. Add semantic search on top, and you get a RAG chatbot that answers from your actual data, not just the model's training set.&lt;/p&gt;

&lt;p&gt;You don't need five separate libraries glued together. It's one pipeline, built for production from the start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing the Right Framework for Your Team
&lt;/h2&gt;

&lt;p&gt;If you're prototyping solo and don't care about production yet, LangChain still works fine for quick experiments.&lt;/p&gt;

&lt;p&gt;If you're building an AI agent team that needs to run reliably, with monitoring, memory, and multi-agent coordination, DNotifier is the more complete AI agent platform. It cuts out the extra infrastructure work that LangChain leaves on your plate.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is DNotifier used for?&lt;/strong&gt;&lt;br&gt;
DNotifier is a framework for building and running production AI agents. It handles orchestration, RAG, memory, and monitoring in one SDK.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier good for production?&lt;/strong&gt;&lt;br&gt;
Yes. DNotifier was built for production use cases, with observability, traceability, and persistence included by default, not added on later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is DNotifier an AI agent framework?&lt;/strong&gt;&lt;br&gt;
Yes. DNotifier is a full AI agent framework supporting single agents and multi-agent systems, with native RAG and orchestration support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I build an AI agent with DNotifier?&lt;/strong&gt;&lt;br&gt;
Start with the SDK, define your agent's tools and memory, then connect a data source if you need RAG. DNotifier handles orchestration and monitoring from there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;LangChain got a lot of teams started with AI agents. But production has different demands, and most teams outgrow it fast. If you want a framework built for that next stage, explore the DNotifier SDK at &lt;a href="http://www.dnotifier.com" rel="noopener noreferrer"&gt;www.dnotifier.com&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building Production Multi-Agent Systems with DNotifier</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Thu, 30 Jul 2026 07:11:07 +0000</pubDate>
      <link>https://dev.to/timalam01/building-production-multi-agent-systems-with-dnotifier-4h0i</link>
      <guid>https://dev.to/timalam01/building-production-multi-agent-systems-with-dnotifier-4h0i</guid>
      <description>&lt;p&gt;Your multi-agent demo looked perfect. Three agents, clean handoffs, smooth output. Then you shipped it, and agents started stepping on each other. One agent overwrites another's work. A third one loops forever waiting on a response that never comes. Building production multi-agent systems is a different game than building a demo, and most teams learn that the hard way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes Multi-Agent Systems Hard in Production
&lt;/h2&gt;

&lt;p&gt;A multi-agent system is a group of AI agents that work together, each handling a specific task, coordinating to reach a shared goal. In a demo, you control every input. In production, requests arrive out of order, agents fail mid-task, and users interrupt flows halfway through.&lt;/p&gt;

&lt;p&gt;That gap between demo and production is where most projects stall. It's not a model problem. It's an infrastructure problem. Your agents need a way to talk to each other, track state, and recover when something breaks. Without that, you're just gluing API calls together and hoping.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Coordination Problem Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;Here's what actually breaks first: agents don't know what other agents are doing. Agent A finishes a task and moves on, but Agent B never finds out. So Agent B either duplicates the work or waits on something that already happened.&lt;/p&gt;

&lt;p&gt;This is a coordination problem, not a model problem. You can swap in a smarter model and the bug stays exactly where it was. What fixes it is a communication layer that every agent can rely on, one where events get published the moment they happen and every agent that needs to know actually finds out.&lt;/p&gt;

&lt;p&gt;This is where a lot of teams reach for a message queue and call it done. It works for a while. Then you add a fourth agent, then a fifth, and the point-to-point connections turn into a mess nobody wants to touch.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Shared Context Keeps Agents in Sync
&lt;/h2&gt;

&lt;p&gt;The fix is giving agents a shared source of truth instead of private memory. When one agent updates state, every other agent that cares about it should see the update immediately, not five minutes later after a poll cycle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier's&lt;/a&gt; real-time pub/sub handles exactly this. Agents publish events when they act, and other agents subscribe to the events that matter to them. No agent has to ask another agent directly what's going on. They just listen.&lt;/p&gt;

&lt;p&gt;This matters more as your system grows. Two agents can coordinate with a phone call. Ten agents need a shared channel, or the whole thing turns into noise. Pub/sub gives you that channel without forcing every agent to know about every other agent's internals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring: You Can't Fix What You Can't See
&lt;/h2&gt;

&lt;p&gt;You can't debug a system you can't observe. This sounds obvious, but most teams building multi-agent systems skip real monitoring until something breaks in front of a customer. By then it's too late to ask "what happened here."&lt;/p&gt;

&lt;p&gt;Agents fail in ways single models don't. One agent gives a bad output, and that bad output becomes the input for the next agent, and the error compounds. Tracing that chain back to its source without proper tooling takes hours. With it, it takes minutes.&lt;/p&gt;

&lt;p&gt;DNotifier's monitoring and observability tools give you visibility into every agent's decisions, not just the final output. Traceability lets you follow a request through the entire chain, agent by agent, so when something goes wrong, you know exactly where. That's the difference between guessing and knowing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Multi-Agent Systems Before They Ship
&lt;/h2&gt;

&lt;p&gt;Testing a single prompt is straightforward. Testing a multi-agent system means testing how agents behave together, under real conditions, with real failure modes. A prompt that works fine alone can break once it's part of a longer chain.&lt;/p&gt;

&lt;p&gt;This is where prompt testing earns its keep. You want to catch a bad response before it reaches the next agent in line, not after it's already caused three downstream failures. &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier's&lt;/a&gt; prompt testing tools let you run agents against realistic scenarios before anything touches production traffic.&lt;/p&gt;

&lt;p&gt;Treat this the way you'd treat testing any distributed system. Test the failure paths, not just the happy path. Agents that never see a malformed input in testing will meet one eventually in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing It All Together
&lt;/h2&gt;

&lt;p&gt;None of this requires rebuilding your stack from scratch. Production multi-agent systems need three things: a way for agents to share context, a way to watch what they're doing, and a way to test them before real users do.&lt;/p&gt;

&lt;p&gt;DNotifier's SDK handles all three through one API, so you're not stitching together five different tools and hoping they play nice. Orchestration, monitoring, and testing live in the same place your agents already run.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What's the difference between a multi-agent system and a single AI agent?&lt;/strong&gt;&lt;br&gt;
A single agent handles one task end to end. A multi-agent system splits the work across several agents, each specialized, coordinating to finish a larger task together. The tradeoff is coordination complexity in exchange for better task focus.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do multi-agent systems fail more often in production than in testing?&lt;/strong&gt;&lt;br&gt;
Production brings unpredictable input, concurrent requests, and partial failures that testing rarely covers. Agents that behaved perfectly with clean test data often stumble on messy real-world requests they never saw before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need real-time pub/sub for a small multi-agent system?&lt;/strong&gt;&lt;br&gt;
Not always, but it saves you a rebuild later. Two or three agents can get by on simpler coordination, but adding more agents down the line gets painful without a shared event layer already in place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I debug a multi-agent system when something goes wrong?&lt;/strong&gt;&lt;br&gt;
Start by tracing the request through every agent it touched. Observability tools that log each agent's decisions, not just final outputs, turn a multi-hour investigation into a five-minute lookup.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Real-Time Agent Orchestration in Python</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Tue, 28 Jul 2026 07:43:53 +0000</pubDate>
      <link>https://dev.to/timalam01/real-time-agent-orchestration-in-python-5aop</link>
      <guid>https://dev.to/timalam01/real-time-agent-orchestration-in-python-5aop</guid>
      <description>&lt;p&gt;You've built a few agents in Python. Each one does its job fine on its own. Then you try to run them together, and everything falls apart the moment timing matters.&lt;/p&gt;

&lt;p&gt;That's the exact challenge real-time agent orchestration in Python is meant to solve. It's not about writing smarter agents. It's about getting them to talk to each other the instant something changes, not five minutes later.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Real-Time Agent Orchestration in Python Actually Means
&lt;/h2&gt;

&lt;p&gt;Real-time agent orchestration in Python means coordinating multiple agents so they react to live events as they happen, using Python's async tools to avoid blocking or polling delays. Instead of checking for updates on a timer, agents listen and respond instantly. The "real-time" part is what separates this from a basic task queue.&lt;/p&gt;

&lt;p&gt;Most Python developers already know how to chain function calls. Orchestration is different. It's about managing timing, order, and shared state across agents that don't run in the same process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Python Fits This Pattern So Well
&lt;/h2&gt;

&lt;p&gt;Python's async ecosystem, especially asyncio, was practically built for this kind of coordination. You can run dozens of agents concurrently without spinning up separate threads for each one.&lt;/p&gt;

&lt;p&gt;Libraries like asyncio.Queue, aiokafka, or redis.asyncio give you the plumbing to pass events between agents without blocking the main loop. None of this is exotic. It's the same pattern used in chat servers and trading systems, just applied to AI agents instead.&lt;/p&gt;

&lt;p&gt;The tricky part isn't the syntax. It's designing the flow so agents don't step on each other.&lt;/p&gt;

&lt;p&gt;A Simple Example&lt;/p&gt;

&lt;p&gt;Here's a stripped-down version of what real-time orchestration looks like with asyncio:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;python&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;pricing_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price_update&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pricing agent reacting to &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fraud_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price_update&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Fraud agent checking &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;publisher&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price_update&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SKU-2291&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;queue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Queue&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nf"&gt;pricing_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nf"&gt;fraud_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nf"&gt;publisher&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This version works, but it's fragile. Every agent shares one queue, there's no filtering by event type, and nothing tracks what happened if something breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where This Breaks Down at Scale
&lt;/h2&gt;

&lt;p&gt;The example above handles two agents fine. Try scaling it to fifteen agents across multiple services, and the cracks show fast.&lt;/p&gt;

&lt;p&gt;You'll need to filter which agents get which events, not just broadcast everything to everyone. You'll need retry logic for when an agent fails mid-task. And you'll need some way to trace what actually happened, because "it worked on my machine" doesn't hold up in production.&lt;/p&gt;

&lt;p&gt;This is usually the point where teams start building their own pub/sub layer from scratch. It works, until someone has to debug it at midnight with no logs to go on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a Pub/Sub Layer Without Reinventing It
&lt;/h2&gt;

&lt;p&gt;Instead of hand-rolling queues and retry logic for every agent, most teams move to a proper pub/sub setup. Agents publish events once, and only the agents that care about that event type pick it up.&lt;/p&gt;

&lt;p&gt;This is where &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier's&lt;/a&gt; real-time pub/sub fits naturally into a Python-based agent system. It gives agents a shared event layer without you writing the routing logic by hand. Pair that with built-in monitoring and traceability, and you can actually see which agent reacted to what, in what order, when something goes wrong.&lt;/p&gt;

&lt;p&gt;You still write the agent logic yourself. What changes is you stop rebuilding the coordination layer every time you add a new agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Do I need asyncio to build real-time agent orchestration in Python?&lt;/strong&gt;&lt;br&gt;
Not strictly, but it makes life much easier. Asyncio lets agents wait for events without blocking each other, which is the core requirement for real-time behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use threads instead of asyncio?&lt;/strong&gt; You can, but it gets messy fast. Threads work for simple cases, though async code scales better once you're coordinating more than a handful of agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the hardest part of scaling this?&lt;/strong&gt; Routing and tracing, not the agents themselves. Once you have more than a few agents, tracking who reacted to what becomes the real engineering problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is pub/sub required, or can I just use a shared queue?&lt;/strong&gt; A shared queue works for small demos, not production systems. Pub/sub lets you filter events per agent instead of forcing every agent to check every message.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building an AI Control Plane with DNotifier</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Sat, 25 Jul 2026 15:39:59 +0000</pubDate>
      <link>https://dev.to/timalam01/building-an-ai-control-plane-with-dnotifier-47g0</link>
      <guid>https://dev.to/timalam01/building-an-ai-control-plane-with-dnotifier-47g0</guid>
      <description>&lt;p&gt;You've got three agents talking to two different models, and nobody can tell you which one made a bad call last Tuesday. That's the moment most teams realize they need an AI control plane, not another point solution.&lt;/p&gt;

&lt;p&gt;Building one from scratch usually means gluing together five separate tools. Building it with DNotifier means you skip most of that work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does Building an AI Control Plane With &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; Actually Involve?
&lt;/h2&gt;

&lt;p&gt;Building an AI control plane with DNotifier means using one SDK to handle orchestration, monitoring, and agent coordination instead of stitching together separate tools. You connect your models once, then route, trace, and test everything through a single API.&lt;/p&gt;

&lt;p&gt;The result is less integration work and one system to maintain, not five.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start With Orchestration, Not Logging
&lt;/h2&gt;

&lt;p&gt;Most teams start by bolting on logging first. That's backwards. Start by defining how your agents and models actually talk to each other.&lt;/p&gt;

&lt;p&gt;DNotifier's AI Orchestration layer routes requests to the right model based on rules you set. Cost, latency, task type, whatever matters to you. You write the logic once instead of hardcoding routing into every service.&lt;/p&gt;

&lt;p&gt;This matters more once you're running multiple agents. Without orchestration, each agent makes its own routing decisions. That leads to duplicate work and inconsistent behavior across your stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Monitoring Before You Need It
&lt;/h2&gt;

&lt;p&gt;Nobody adds monitoring until something breaks. By then, you're reconstructing what happened from scattered logs. Add it before you need it, not after.&lt;/p&gt;

&lt;p&gt;DNotifier's Monitoring and Observability tools give you latency, error rates, and model performance in one dashboard. You see problems as they happen, not after a customer emails support.&lt;/p&gt;

&lt;p&gt;Pair this with Traceability, and you get the full path behind every decision. Which prompt fired, which model responded, which tool got called. When an agent misfires, you're not guessing anymore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test Prompts Before They Break Production
&lt;/h2&gt;

&lt;p&gt;Prompts drift. What worked three weeks ago can quietly stop working today, and you won't notice until output quality drops.&lt;/p&gt;

&lt;p&gt;DNotifier's Prompt Testing tools let you validate changes against real scenarios before deployment. You catch regressions in staging, not in front of users. This one habit saves more debugging time than almost anything else on this list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coordinate Multiple Agents Without the Chaos
&lt;/h2&gt;

&lt;p&gt;Two agents working together is manageable by hand. Ten agents handing off tasks to each other is not. Someone needs to manage those handoffs, or agents start stepping on each other.&lt;/p&gt;

&lt;p&gt;DNotifier's Multi-Agent Systems support handles coordination directly. Agents pass context and tasks between each other without you writing custom handoff logic for every pair. This scales cleanly as you add more agents to the workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wire Up Real-Time Communication
&lt;/h2&gt;

&lt;p&gt;Agents and services need to talk to each other constantly. Polling every few seconds for updates wastes resources and adds lag you don't need.&lt;/p&gt;

&lt;p&gt;DNotifier's Real-Time Pub/Sub layer handles this without the constant polling. Services publish events, and everyone who needs them gets notified instantly. If you're also building user-facing chat features, the Chat Systems tooling plugs into this same layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't Forget Search
&lt;/h2&gt;

&lt;p&gt;Your control plane isn't just about agents talking to models. It's also about agents finding the right information fast.&lt;/p&gt;

&lt;p&gt;DNotifier's Semantic Search lets agents pull relevant context from your data without brittle keyword matching. This becomes critical once your agents are answering questions based on internal docs or historical data, not just static prompts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Mistakes to Avoid
&lt;/h2&gt;

&lt;p&gt;A few patterns trip up almost every team building an AI control plane.&lt;/p&gt;

&lt;p&gt;Skipping observability early. Teams add monitoring after the first production incident, not before. By then, you've already lost the data you needed most.&lt;/p&gt;

&lt;p&gt;Underestimating coordination overhead. What works with two agents breaks with ten. Plan for coordination complexity before it becomes a problem, not after.&lt;/p&gt;

&lt;p&gt;Treating prompts as static. Prompts need testing like code needs testing. Skipping this step is how quality quietly degrades over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Do I need all of &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier's&lt;/a&gt; features to build an AI control plane?&lt;/strong&gt;&lt;br&gt;
No, start with orchestration and monitoring first. Add prompt testing, multi-agent coordination, and pub/sub as your system grows in complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How long does it take to build an AI control plane with DNotifier?&lt;/strong&gt;&lt;br&gt;
Most teams get basic orchestration and monitoring running within days, not months. Full multi-agent coordination takes longer depending on your existing architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use DNotifier with models I'm already using?&lt;/strong&gt;&lt;br&gt;
Yes, DNotifier supports multi-model setups out of the box. You're not locked into a single provider.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the biggest benefit of building with DNotifier instead of from scratch?&lt;/strong&gt;&lt;br&gt;
You get one SDK instead of five separate tools. That means less integration work and far fewer moving parts to maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Building an AI control plane doesn't have to mean months of custom integration work. Start with orchestration and observability, then layer in the rest as your agents scale.&lt;/p&gt;

&lt;p&gt;If you're ready to stop stitching tools together, check out dnotifier.com and see how the SDK fits into what you're already building.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Shared Context Patterns for Multi-Agent Systems</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Wed, 22 Jul 2026 07:58:44 +0000</pubDate>
      <link>https://dev.to/timalam01/shared-context-patterns-for-multi-agent-systems-4505</link>
      <guid>https://dev.to/timalam01/shared-context-patterns-for-multi-agent-systems-4505</guid>
      <description>&lt;p&gt;You've got three agents running at the same time. One pulls customer data. Another generates a response. The third decides whether to escalate. Then agent one runs again—and it pulls the same data it already fetched five seconds ago. Agent two doesn't know what agent three decided. Everyone's working blind.&lt;/p&gt;

&lt;p&gt;This is the shared context problem. And if you're building multi-agent systems past a certain scale, you'll hit it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Shared Context Patterns?
&lt;/h2&gt;

&lt;p&gt;Shared context patterns are ways agents access and update information that other agents need to see in real time. Think of it like a whiteboard in a room. One agent writes something. All the others can read it immediately. The pattern is the system that keeps that whiteboard clean, current, and safe.&lt;/p&gt;

&lt;p&gt;Without it, agents repeat work, make stale decisions, or conflict with each other. With it, they move like a team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Agents Need Shared Context
&lt;/h2&gt;

&lt;p&gt;Single-agent systems are simple. One bot. One brain. It sees everything it needs. But the moment you add a second agent, things get messy.&lt;/p&gt;

&lt;p&gt;Agent A might decide to fetch user history. Agent B might be doing the same thing at the same time. Both hit your database. Both get the same answer. Both store it separately. Then agent C runs and doesn't know which answer to trust—or uses information neither A nor B has yet processed.&lt;/p&gt;

&lt;p&gt;It gets worse with orchestration. If agent A needs to hand off work to agent B, how does B know what A already tried? If A failed for a specific reason, B needs to see that immediately, not guess.&lt;/p&gt;

&lt;p&gt;Shared context solves this: agents write to one source. All agents read from one source. No duplication. No confusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Patterns That Actually Work
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Single Source of Truth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One central state store. All agents query it. All agents update it. Usually a database or cache.&lt;/p&gt;

&lt;p&gt;Pros: Simple to reason about. No conflicts over who's right. Cons: Can bottleneck under load. State must be carefully structured so agents don't step on each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Event-Driven Context&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Agents broadcast what they did or learned. Other agents subscribe to those events and update their local understanding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent A:&lt;/strong&gt; "I fetched user history. Here's what I found." Agent B watches that channel and incorporates it into decisions. Agent C does the same. Each agent has local context, but they stay in sync through events.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; Scalable. Agents can work independently. Cons: Takes a moment for all agents to see the same picture. Harder to debug if events are dropped or delayed.&lt;/p&gt;

&lt;p&gt;Hybrid: Local Cache + Central Sync&lt;/p&gt;

&lt;p&gt;Agents keep a local copy of context for speed. A central sync mechanism keeps copies aligned. Works well when you can tolerate temporary staleness but need eventual consistency.&lt;/p&gt;

&lt;p&gt;Each agent has fast access to data it needs now. A background process ensures all copies converge to the same state within seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Pick the Right Pattern
&lt;/h2&gt;

&lt;p&gt;If your agents need to make decisions in the same instant—like a coordinated API response—go central. Latency matters more than perfect scale.&lt;/p&gt;

&lt;p&gt;If your agents work on longer timelines and can handle a few seconds of async updates, event-driven is cleaner. Add a local cache if you need sub-millisecond reads.&lt;/p&gt;

&lt;p&gt;For most teams, hybrid works. Fast enough for real-time. Scalable enough for growth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where DNotifier Fits
&lt;/h2&gt;

&lt;p&gt;Real-time pub/sub is built for this exact use case. Agents publish context updates. Other agents subscribe to channels. You define what each agent needs to see. &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; handles the routing so every agent stays current without polling or rebuilding your own event system.&lt;/p&gt;

&lt;p&gt;Monitoring and traceability matter too. If agents are sharing context, you need visibility: Who updated what? When? What was the value before and after? &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; gives you that trace so debugging is actually possible when something goes wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Gotchas
&lt;/h2&gt;

&lt;p&gt;Stale reads: Agent reads context, makes a decision, then context changes before decision executes. Mitigate by timestamping context and checking freshness before acting.&lt;/p&gt;

&lt;p&gt;Conflict resolution: Two agents update the same field at the same time. Decide upfront: last write wins? Merge? Reject both? Don't improvise this.&lt;/p&gt;

&lt;p&gt;Over-sharing: Not every agent needs every piece of context. Too much data slows reads. Design channels and context types so agents only see what they need.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Should every agent see all context?
&lt;/h2&gt;

&lt;p&gt;No. Filter by role and need. A routing agent doesn't need the full customer conversation history. A response-generation agent does. Share granularly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What if context updates fail?
&lt;/h2&gt;

&lt;p&gt;Use a queue. Agent writes to a queue. Central system processes the queue and updates state. If update fails, retry. Agents don't wait for acknowledgment.&lt;/p&gt;

&lt;h2&gt;
  
  
  How fresh does context need to be?
&lt;/h2&gt;

&lt;p&gt;Depends on the decision. Milliseconds for real-time routing. Seconds for research-phase agents. Define your requirement and build to it, not to "as fresh as possible."&lt;/p&gt;

&lt;h2&gt;
  
  
  Can agents have conflicting local contexts?
&lt;/h2&gt;

&lt;p&gt;Yes. That's why you need reconciliation. Set a rule: central state is source of truth, or merge rules are explicit. Check conflicts on key decisions.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>architecture</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Implementing Agent Delegation Patterns in Node.js</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Wed, 15 Jul 2026 16:54:11 +0000</pubDate>
      <link>https://dev.to/timalam01/implementing-agent-delegation-patterns-in-nodejs-4oaj</link>
      <guid>https://dev.to/timalam01/implementing-agent-delegation-patterns-in-nodejs-4oaj</guid>
      <description>&lt;p&gt;Enterprise AI applications fail when a single large language model tries to do everything. Complex, multi-step tasks lead to high latency and massive API bills.&lt;/p&gt;

&lt;p&gt;To build production-grade systems, developers use agent delegation patterns in Node.js to break down heavy workloads. This guide shows you how to implement these patterns using clean JavaScript. You will learn how to route tasks, manage state, and build secure systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Agent Delegation Patterns in Node.js?
&lt;/h2&gt;

&lt;p&gt;These patterns represent programmatic designs where a parent process routes tasks to specialized worker instances. In Node.js, you implement this by writing asynchronous routers that distribute specific payloads to dedicated LLM worker classes. This separation of concerns ensures that no single model gets overwhelmed with out-of-context data.&lt;br&gt;
When studying agent delegation patterns in Node.js, you quickly realize that they prevent model overload. Instead of using one massive model, you divide work among highly specialized smaller models.&lt;br&gt;
Agent delegation pattern definition: A coding architecture where a primary script splits a complex request into smaller tasks. It then assigns those tasks to specialized asynchronous worker processes.&lt;/p&gt;

&lt;p&gt;This division of labor keeps your application fast and affordable. For example, you can use cheap models for classification. Then, you can route difficult reasoning tasks to more capable models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing the Right Architecture for Node.js Applications
&lt;/h2&gt;

&lt;p&gt;Choosing the right architecture requires matching your business workflow to the correct routing mechanism. You can build linear pipelines using EventEmitters or complex hierarchical systems using asynchronous message queues. For Node.js systems, event-driven architectures offer the lowest overhead and the highest scalability for multi-agent execution.&lt;/p&gt;

&lt;p&gt;Selecting proper agent delegation patterns in Node.js depends on your system complexity. If tasks are simple, a linear pipeline works best. If tasks require complex decision-making, choose a hierarchical model.&lt;/p&gt;

&lt;p&gt;The diagram above highlights the main stages of multi-agent work. Look at how the system moves from planning and routing to execution and validation. This cycle ensures high-quality results before returning data to the user.&lt;/p&gt;

&lt;p&gt;Here are the main architectural structures you can use in Node.js:&lt;/p&gt;

&lt;p&gt;Hierarchical Routing: A master controller directs worker agents. Workers report back to the master.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pipeline Flow: Data passes from one worker to the next in a strict sequence.&lt;/li&gt;
&lt;li&gt;Hub-and-Spoke: A central coordinator routes all traffic but workers do not communicate directly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Implement Agent Delegation Patterns in Node.js
&lt;/h2&gt;

&lt;p&gt;To implement these patterns, you define a router that analyzes incoming payloads and triggers the appropriate worker class. You write clean asynchronous code using promises to manage state transitions between agents. Let us build a simple router that delegates financial and technical tasks to specialized workers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Shared State Across Your Delegated Agents
&lt;/h2&gt;

&lt;p&gt;Managing shared state requires a centralized database or an in-memory store like Redis. Instead of passing massive context histories between agents, you pass a single session identifier. This approach keeps your payload sizes small, avoids context window limits, and drastically reduces your API token usage.&lt;br&gt;
Solving these state challenges is essential when designing agent delegation patterns in Node.js. If you pass entire conversation logs between workers, you waste bandwidth.&lt;br&gt;
Instead, use a central memory store. Let your workers read and write to this store using a unique session key. This keeps your agents decoupled and highly efficient.&lt;/p&gt;

&lt;h2&gt;
  
  
  Securing Your Multi-Agent Node.js Workflows
&lt;/h2&gt;

&lt;p&gt;Securing your workflows requires strict input validation and least-privilege access controls for each agent. You must never allow a delegated worker to execute raw terminal commands or database queries directly. Always run specialized workers inside sandbox environments to prevent malicious prompt injection attacks from escaping.&lt;/p&gt;

&lt;p&gt;Implementing agent delegation patterns in Node.js also requires a deep focus on application security. When agents call other agents, permissions can easily leak.&lt;/p&gt;

&lt;p&gt;Always validate the inputs of every delegated task. Treat worker outputs as untrusted user data. Use robust API gateways to control what external resources your workers can access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Streamlining Agent Orchestration with DNotifier
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; streamlines your architecture by replacing complex handoff code with a single, production-ready SDK. You can instantly implement robust agent delegation patterns in Node.js without writing custom pub/sub mechanics. The platform handles AI orchestration, real-time tracking, and multi-model support right out of the box.&lt;/p&gt;

&lt;p&gt;The platform handles the heavy lifting of agent delegation patterns in Node.js, including real-time tracing. You can visualize exactly how tasks flow from the parent orchestrator to your workers.&lt;/p&gt;

&lt;p&gt;DNotifier also offers advanced monitoring and observability. You can track latency, token usage, and execution paths for every agent. This takes the guesswork out of debugging complex, multi-step systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions on Node.js Agent Orchestration
&lt;/h2&gt;

&lt;p&gt;Managing a network of asynchronous workers requires careful design decisions. Developers often worry about performance bottlenecks, library choices, and debugging strategies. Here are the answers to the most common questions about building these systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which libraries support agent delegation patterns in Node.js?&lt;/strong&gt;&lt;br&gt;
You can use standard event libraries or robust orchestration frameworks. DNotifier provides the ultimate production-grade SDK for managing multi-agent systems with ease.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you handle network latency during agent delegation?&lt;/strong&gt;&lt;br&gt;
You handle latency by executing tasks asynchronously and using real-time pub/sub systems. DNotifier helps you manage these events without blocking your main application thread.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the best way to debug failing agent handoffs?&lt;/strong&gt;&lt;br&gt;
The best way to debug failing handoffs is to implement deep tracing and monitoring. &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; gives you full observability, showing you exactly where an agent handoff failed.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is Observability into Multi-Agent Systems?</title>
      <dc:creator>T. Alam</dc:creator>
      <pubDate>Thu, 09 Jul 2026 08:04:13 +0000</pubDate>
      <link>https://dev.to/timalam01/what-is-observability-into-multi-agent-systems-4ha1</link>
      <guid>https://dev.to/timalam01/what-is-observability-into-multi-agent-systems-4ha1</guid>
      <description>&lt;p&gt;Observability into multi-agent systems means capturing internal states, communication logs, and decision paths of interacting AI agents. It goes beyond basic error logging by mapping how independent agents pass tasks to each other. This clear visibility helps software architects identify bottlenecks, optimize token usage, and prevent infinite loops.&lt;/p&gt;

&lt;p&gt;Multi-agent systems operate like complex human organizations. One agent acts as a manager, while others execute specialized tasks. When an error occurs, you need to understand the context of the entire conversation.&lt;/p&gt;

&lt;p&gt;Achieving comprehensive observability into multi-agent systems requires capturing full execution graphs. These graphs show the exact lineage of every LLM call and agent decision. Engineers can use this data to debug issues faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Traditional Monitoring Fails Autonomous AI Agents
&lt;/h2&gt;

&lt;p&gt;Traditional monitoring fails autonomous agents because standard tools only track linear metrics like HTTP requests or CPU usage. AI agents are inherently non-linear, stochastic, and stateful. They generate dynamic prompts, execute unpredictable loops, and self-correct in real time, making standard logs useless.&lt;/p&gt;

&lt;p&gt;Standard applications follow deterministic code paths. If an API fails, a stack trace points to the broken line. AI agents change behavior based on semantic inputs, making bugs highly unpredictable.&lt;/p&gt;

&lt;p&gt;This is why engineering teams need specialized observability into multi-agent systems. Standard tools cannot parse prompt chains, vector database queries, and tool execution steps that agents rely on daily.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Pillars of Agent Telemetry
&lt;/h2&gt;

&lt;p&gt;Effective telemetry for autonomous agents relies on three core pillars: trace lineage, prompt tracking, and token metrics. Trace lineage maps the exact sequence of agent handoffs. Prompt tracking monitors changes in system instructions, while token metrics analyze data costs and latency across your network.&lt;/p&gt;

&lt;p&gt;Trace lineage acts as a distributed map for your agent network. When a user submits a query, the system generates a root trace ID. Every subsequent agent interaction inherits this ID, creating a clear execution tree.&lt;/p&gt;

&lt;p&gt;Implementing these pillars guarantees deep observability into multi-agent systems. Developers can easily pinpoint exactly where an agent lost context or started repeating itself.&lt;/p&gt;

&lt;p&gt;Finally, you must monitor token usage and operational latency. Multi-agent loops can consume millions of tokens in minutes. Real-time monitoring alerts your team the moment an agent exceeds its safe operating budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Implement Traceability and Monitoring
&lt;/h2&gt;

&lt;p&gt;Implementing observability requires adding a lightweight telemetry layer directly into your core application code. You must instrument your LLM clients, vector databases, and agent frameworks to emit standardized OpenTelemetry data. This data then streams into a centralized visualization platform for real-time analysis.&lt;/p&gt;

&lt;p&gt;Start by assigning unique session identifiers to every user interaction. Pass this session context through every agent function and tool call. This ensures your logs remain connected across asynchronous boundaries.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt; simplifies this entire architecture by providing built-in monitoring and observability features. The platform gives you complete observability into multi-agent systems through a single unified SDK. You can track execution graphs, monitor semantic search queries, and manage AI workflows without complex custom code.&lt;/p&gt;

&lt;p&gt;With &lt;a href="https://www.dnotifier.com/" rel="noopener noreferrer"&gt;DNotifier&lt;/a&gt;, you gain deep traceability into every agent interaction. The real-time Pub/Sub architecture ensures your monitoring data streams instantly. This prevents processing lag completely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Costs and Latency in Production
&lt;/h2&gt;

&lt;p&gt;Managing costs and latency requires setting strict guardrails around agent execution loops and token consumption. You must implement real-time alerts that trigger when an agent exceeds pre-defined cost thresholds. Additionally, caching semantic queries helps reduce external LLM calls and speeds up system response times.&lt;/p&gt;

&lt;p&gt;Multi-agent systems are notoriously expensive to run at scale. A single complex task can trigger dozens of cascading LLM calls. If one agent misinterprets a response, it can cause a costly infinite loop.&lt;/p&gt;

&lt;p&gt;Maintaining high-performance observability into multi-agent systems also means optimizing your storage layer. Telemetry data grows exponentially in large enterprise deployments. Use semantic search and data aggregation to keep your monitoring costs low.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices for Evaluating Agent Workflows
&lt;/h2&gt;

&lt;p&gt;Evaluating agent workflows requires continuous automated testing using production traffic variations and curated evaluation datasets. You must regularly measure agent accuracy, tool selection correctness, and task completion rates. This systematic approach ensures your multi-agent network remains reliable as your code evolves over time.&lt;/p&gt;

&lt;p&gt;Never deploy prompt changes directly to production without testing them against historical traces. Use your observability data to build a comprehensive evaluation suite. Run these tests automatically within your CI/CD pipeline.&lt;/p&gt;

&lt;p&gt;Continuous evaluation is the final step in mastering observability into multi-agent systems. DNotifier includes advanced prompt testing and AI orchestration tools to streamline this process. The platform allows you to test new prompts against real-world scenarios.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing the Right Observability Architecture
&lt;/h2&gt;

&lt;p&gt;Choosing the right architecture depends on your data privacy requirements, system scale, and engineering resources. Enterprise teams generally choose between building a custom internal telemetry system or integrating a specialized third-party platform. Your choice will determine how quickly your team can debug production issues.&lt;/p&gt;

&lt;p&gt;Building a custom system gives you complete control over your telemetry data. However, it requires significant engineering overhead to maintain. Your team must manage complex data pipelines and storage clusters.&lt;/p&gt;

&lt;p&gt;True observability into multi-agent systems shouldn't distract from your core product development. DNotifier offers a flexible API that integrates seamlessly into any enterprise architecture. It provides multi-model support and multi-agent systems management in one place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;How do you track asynchronous agent handoffs?&lt;/p&gt;

&lt;p&gt;You track asynchronous handoffs by passing a global trace ID through your messaging queue. Every agent reads this ID from the metadata before processing the task. This maintains a continuous chain of custody across your entire infrastructure.&lt;/p&gt;

&lt;p&gt;Can traditional APM tools monitor AI agents?&lt;/p&gt;

&lt;p&gt;Traditional APM tools cannot effectively monitor AI agents because they lack semantic awareness. They cannot parse prompt inputs, track token consumption, or visualize complex agent execution graphs. You need a specialized platform to capture these unique AI metrics.&lt;/p&gt;

&lt;p&gt;What is semantic drift in multi-agent systems?&lt;/p&gt;

&lt;p&gt;Semantic drift occurs when small changes in agent prompts cause unexpected variations in output quality. Over time, these variations cascade through your agent network and disrupt downstream tasks. Monitoring prompt inputs helps detect this drift early.&lt;/p&gt;

&lt;p&gt;How do you stop infinite loops in agent networks?&lt;/p&gt;

&lt;p&gt;You stop infinite loops by implementing strict execution counters and real-time telemetry alerts. Set a hard limit on the number of sequential calls an agent can make. If the agent hits this limit, route the task to a human operator.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>monitoring</category>
    </item>
  </channel>
</rss>
