NiadraADK gives you before_model (injects the context), after_model (records the answer) and tools (the history kit as ADK BaseTools). In TypeScript, niadraAdk({ session }) returns the two callbacks and the tools for the ADK for TypeScript.
Install
@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
Minimal example
examples/google_adk_agent.py.
In TypeScript
niadraAdk({ session }) serves one agent definition for every ADK session: session is a fixed conversation or a function of the context (userId, sessionId, state), called once per ADK session id. beforeModelCallback records the user’s message of each invocation once and adds the pack after your instruction in systemInstruction and the turn_block as a text part of the last user content; ADK rebuilds the request from the session’s events on every call, so nothing of it lands in the session. afterModelCallback records the final answer with usageMetadata and a transfer_to_agent call as a handoff between agents; partial (streamed) responses and tool calls record nothing. tools declares the kit’s JSON Schemas (parametersJsonSchema) and finds the customer from the tool’s context, never from the model’s arguments. Give the same ...memory to sub-agents.
Agent memory
NiadraADK(conversation, agent_memory=True) puts the agent’s own notes before the customer’s context and adds the two tools. See Agent memory.
Limits
- If the agent already has callbacks, pass lists: the ADK runs them in order.
- Nothing here fails the invocation: without a pack, the request goes on with the agent’s instruction.
- Tested against
google-adk2.9 with the model replaced by a fake and Niadra on the emulator; in TypeScript, against@google/adk2.1.0, with a realInMemoryRunnerand sub-agents over a scripted model.
Next steps
Google GenAI
the client
wrap(), for those not on the ADK.History navigation
the three tools the agent receives.

