Skip to main content
niadraHooks() returns onPrepareModelMessages, onEnd and onHandoff for new Agent({ hooks }), and niadraTools(session) returns the kit as VoltAgent tools. VoltAgent’s own memory (conversations, working memory) stays VoltAgent’s; Niadra is the customer’s memory shared with the company’s other agents. TypeScript only.

Install

The integration ships with @niadra/sdk 0.3.0, ready on main and on npm when it is published; until then the npm package is 0.1.1.

The five primitives

The conversation comes from the operation’s context (context: { niadra: convo } on generateText or streamText), or is fixed when you pass session while building the hooks.

Minimal example

Agent memory

niadraHooks({ agentMemory: true }) and niadraTools(convo, { agentMemory: true }) put the agent’s own notes before the customer’s context and add the two tools. See Agent memory.

Limits

  • VoltAgent 2.x runs on AI SDK 6; the adapter follows it.
  • When the model’s name does not tell the provider, pass provider in the hooks options for the usage of the agent’s turn.
  • Nothing here stops the agent: with Niadra slow or down, the messages go to the model as they came.
  • Tested against @voltagent/core 2.10.0 with a real Agent over a test model and Niadra on the emulator.

Next steps

Vercel AI SDK

the middleware for calling the AI SDK directly.

History navigation

the three tools the agent receives.