Skip to main content

What is the Agent Toolkit?

The @novu/agent-toolkit package lets you expose Novu notification workflows as tools for LLM agents. It works with OpenAI, LangChain, and Vercel AI SDK. The toolkit automatically discovers your Novu workflows and converts them into strongly-typed tools that an LLM can invoke, letting your AI agent send notifications, manage subscriber preferences, and trigger any workflow you’ve built in Novu.
The Agent Toolkit is a code-level SDK for embedding Novu tools inside your own AI agents. For giving AI coding assistants (Claude Code, Cursor, Copilot) context about Novu, see Agent Skills. For connecting AI tools to Novu via the Model Context Protocol, see MCP.

Installation

Then install the peer dependency for the AI framework you use:

Quick Start

Configuration

Every adapter’s createNovuAgentToolkit accepts a NovuToolkitConfig object:

Framework Adapters

Each adapter exposes a createNovuAgentToolkit function that returns tools in the native format for that framework.
The returned toolkit provides:
  • tools - Array of OpenAI-compatible function tool definitions.
  • handleToolCall(toolCall) - Executes a tool call and returns a \{ role: 'tool', tool_call_id, content \} message ready to append to the conversation.

Built-in Tools

The toolkit ships with two built-in tools that are always available regardless of which workflows you have configured.

trigger_workflow

Triggers any Novu workflow by its identifier. Use this as a generic entry point to send notifications.

update_preferences

Updates notification channel preferences for a subscriber, either globally or for a specific workflow.

Dynamic Workflow Tools

On initialization the toolkit fetches your Novu workflows and creates a dedicated tool for each one. These tools are named trigger_<workflow_id> (with hyphens replaced by underscores) and include the workflow’s payload schema so the LLM knows exactly what data to provide. Filter which workflows are exposed using the workflows config option:
For example, if you have a workflow with ID welcome-email, the toolkit generates a trigger_welcome_email tool whose parameter schema matches the workflow’s payloadSchema. The LLM sees a purpose-built tool instead of a generic trigger, which improves accuracy and reduces prompt engineering.

Use Cases

  • Customer support agents - Let an AI agent send order confirmations, shipping updates, or support ticket notifications through Novu workflows.
  • Internal tooling - Build Slack bots or internal agents that trigger team notifications, incident alerts, or onboarding workflows.
  • Preference management - Allow users to manage their notification preferences through a conversational AI interface.
  • Multi-channel broadcasting - Enable agents to send coordinated notifications across email, SMS, push, in-app, and chat from a single tool call.

Source Code

The @novu/agent-toolkit package is part of the Novu monorepo on the next branch.

Package Structure

Available Exports