honk
02/27/2026, 4:30 PMhonk
02/27/2026, 4:32 PMthis.composio = new Composio({
apiKey: process.env.COMPOSIO_API_KEY,
provider: new SanitizedMastraProvider(),
toolkitVersions: {
googlecalendar: '20260223_00' // had to do this as otherwise everything breaks
}
})Uday
03/01/2026, 4:41 PMSanitizedMastraProvider(), could you specify any changes made to the provider if any?honk
03/01/2026, 7:45 PMhonk
03/01/2026, 7:46 PManyOf
https://cdn.discordapp.com/attachments/1476979873430896762/1477753979340460264/Screenshot_2026-03-01_at_19.46.36.png?ex=69a5e924&is=69a497a4&hm=779b0a748fabbb422521bef435e269a96d9be6a232fcd960a0ec0e79668f71b0&honk
03/01/2026, 7:47 PMUday
03/02/2026, 4:41 AMhonk
03/03/2026, 8:59 AMhonk
03/04/2026, 11:45 AMUday
03/05/2026, 6:30 AM0.6.3.

Here's a snippet for your ref:
import { Composio } from '@composio/core';
import { MastraProvider } from '@composio/mastra';
import { Agent } from '@mastra/core/agent';
import { createAnthropic } from '@ai-sdk/anthropic';
const COMPOSIO_API_KEY = '<api-key>';
const ANTHROPIC_API_KEY = '<api-key>';
const anthropic = createAnthropic({ apiKey: ANTHROPIC_API_KEY });
// Initialize Composio with MastraProvider and toolkit versions
const composio = new Composio({
apiKey: COMPOSIO_API_KEY,
provider: new MastraProvider(),
toolkitVersions: {
googlecalendar: '20260225_00',
},
});
// Get tools
const tools = await composio.tools.get('<user-id>', 'GOOGLECALENDAR_CREATE_EVENT');
// Create agent with Anthropic Claude 3 Haiku
const agent = new Agent({
id: 'calendar-agent',
name: 'Calendar Agent',
instructions: 'You are a helpful calendar assistant.',
model: anthropic('claude-sonnet-4-6'),
tools: tools,
});
// Run using legacy generate API (for AI SDK v4-style model)
const { text } = await agent.generateLegacy([
{ role: 'user', content: 'Create a online-meeting tomorrow at 2pm for 30 minutes with title <> meeting and attendees uday@composio.dev' },
]);
console.log(text);