ADS Subscriber icon

ADS Subscriber

Create a subscriber to listen for ADS events

Overview

This node, named ADS Subscriber, is designed to create a subscriber that listens for events from the Agent Data Shuttle (ADS) system. It acts as a trigger within an n8n workflow, activating when ADS events occur. The node integrates with a language model (LLM) input to contextualize incoming ADS event data by generating a prompt based on the event's context.

Common scenarios where this node is beneficial:

  • Automating workflows that respond dynamically to real-time ADS events.
  • Enriching ADS event data with natural language prompts generated by an AI language model.
  • Triggering downstream processes or agents based on specific ADS event contexts.

Practical example:
A user configures this node to listen for updates from an ADS system about customer interactions. When an event arrives, the node uses a connected language model to generate a contextualized prompt describing the event, which can then be used to trigger further automated responses or notifications.

Properties

Name Meaning
ADS Subscriber Name An identifier name for the ADS Subscriber instance.
Agent Description A helpful description of the agent that will be triggered by this ADS Subscriber.

Output

The node outputs JSON data with the following structure:

  • ads_agent_invocation_prompt: A string containing a prompt generated by the connected language model. This prompt contextualizes the ADS event and can be used to invoke or guide an agent.
  • ads_event_payload: The original payload of the ADS event received by the node.

If the node is manually triggered without actual ADS event data, it outputs a placeholder prompt indicating that the node should normally be triggered by ADS events.

Dependencies

  • Requires an API key credential providing connection details to the ADS system, including connection strings and Redis credentials.
  • Depends on a connected AI language model node input to generate contextualized prompts.
  • Uses external libraries:
    • @agentdatashuttle/adsjs for ADS connectivity and subscription management.
    • Utilities from n8n-workflow for error handling.
    • A local utility module for validating the language model instance.

Troubleshooting

  • Error: "A valid Language Model needs to be provided to the LLM link"
    This occurs if the connected input node is not a valid language model instance. Ensure that the node connected to the "LLM" input is a supported language model node.

  • Error: "ADS Event Contextualization Prompt not available. Please try later"
    This indicates that the expected contextualization prompt was not found in the incoming event data. Verify that the ADS event payload includes the required prompt field.

  • No output or placeholder output only
    If the node is manually executed without incoming ADS event data, it returns a placeholder message. To test properly, trigger the node via actual ADS events.

Links and References

Discussion