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
@niadra/sdk on npm.
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.
Turn records
With theturns feature on in the space (it ships on), the adapter’s hooks with turns: true record each run as a turn record, with each tool call by the framework’s own id and each model call. The VoltAgent hooks cannot stop a tool, so wrap the tools with Niadra.tool() for a replay to answer them from the record. A turn never waits for Niadra and never repeats the conversation’s text.
Limits
- VoltAgent 2.x runs on AI SDK 6; the adapter follows it.
- When the model’s name does not tell the provider, pass
providerin 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/core2.10.0 with a realAgentover 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.

