Mastra
Wrap a Mastra Agent with Iqrar — telemetry across LLM calls, tool execution, and workflow steps with no changes to your agent definition.
bun add @iqrar/agent
import { Agent } from "@mastra/core/agent";
import { Iqrar } from "@iqrar/agent";
const iqrar = Iqrar({
org: "acme",
jurisdiction: "EU",
endpoint: process.env.IQRAR_API,
agentId: "mastra-support",
capabilities: ["consumer_chatbot"],
});
const agent = iqrar.wrap(
new Agent({
name: "support",
instructions: "...",
model: openai("gpt-4o"),
tools: { ... },
}),
);
await agent.generate("hello");
The Iqrar wrapper proxies every method on the agent so agent.generate, agent.stream, and tool invocations all emit telemetry transparently.
See also
· ·