Install and set up the MutagenT TypeScript SDK
bun add @mutagent/sdk
// tsconfig.json { "compilerOptions": { "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", "strict": true } }
import { Mutagent } from '@mutagent/sdk'; const client = new Mutagent({ bearerAuth: process.env.MUTAGENT_API_KEY, });
// Test your connection const { prompts } = await client.prompt.getApiPrompt({ limit: 1 }); console.log('Connection successful!'); console.log('Found', prompts?.length ?? 0, 'prompts');
import { Mutagent, // Main client class MutagentError, // Error class SDKOptions, // Client configuration type HTTPClient, // Custom HTTP client interface } from '@mutagent/sdk';