Installation Guide

Get your first agent authenticated and running with Nayker in under 5 minutes.

1. Install the SDK

First, install the Nayker SDK using your preferred package manager. We recommend npm or pnpm.

NPM
npm install @nayker/node

2. Initialize the Client

Next, initialize the client with your secret key. You can find this in the Nayker Dashboard.

TypeScript
import { NaykerClient } from '@nayker/node';

const nayker = new NaykerClient({
  projectId: process.env.NAYKER_PROJECT_ID,
  apiSecret: process.env.NAYKER_API_SECRET,
  environment: 'production'
});

3. Wrap your Agent

Wrap your agent's sensitive operations. If the action exceeds your configured risk threshold, it will automatically pause and notify your team via Slack.

TypeScript
const agent = await nayker.agent('AGENT_7A92F');

// The agent is now bound to the Nayker Trust Layer.
const result = await agent.execute({
  action: 'send_email',
  payload: {
    to: 'client@example.com',
    body: 'Invoice attached.'
  }
});

console.log(result.status); // "VERIFICATION_REQUIRED" or "APPROVED"