Skip to Content
Cursor

Align Models With Cursor

AI-first code editor built on VS Code, with an agent that edits across files and follows your project rules. Made by Cursor.

IDE9 steps
  1. Step 1: Get Your API Key

    Sign up, then create an API key on the Nugen platform. You do not need a model yet: your agent builds an expert model with you in the steps below.

    Get an API Key
  2. Step 2: Add the Key to Your Environment

    Set the key in the shell your agent runs in, so it can call Nugen without the key ever appearing in your code.

    Terminal
    export NUGEN_API_KEY="your-api-key"

    On Windows PowerShell, use $env:NUGEN_API_KEY="your-api-key" instead. To keep it across sessions, add the line to your shell profile or a .env file that is listed in .gitignore. Once your agent has deployed an aligned model, it saves the model ID as NUGEN_MODEL_ID the same way.

  3. Step 3: Install the Nugen Plugin

    The Cursor plugin adds the Nugen skill, so Cursor's agent can run the alignment workflow from your editor. Add the Nugen toolkit repository as a plugin in Cursor.

    Get the Cursor plugin
  4. Step 4: Install the Nugen Extension

    Download the Nugen extension file, then install it from the folder that contains it. You can also choose Extensions: Install from VSIX in the Command Palette.

    Download nugen.vsix
    Terminal
    cursor --install-extension nugen.vsix
  5. Step 5: Add the Nugen MCP Server

    The Nugen plugin already registers these servers. To add them yourself instead, save this as .cursor/mcp.json in your project, or as ~/.cursor/mcp.json for every project. Start Cursor from a terminal where NUGEN_API_KEY is set, so that Cursor can read it.

    .cursor/mcp.json
    {  "mcpServers": {    "mcp-exec": {      "url": "https://mcp.nugen.in/mcp",      "headers": {        "Authorization": "Bearer ${env:NUGEN_API_KEY}"      }    },    "mcp-docs": {      "url": "https://docs.nugen.in/mcp"    }  }}
  6. Step 6: Install the Nugen SDK

    The SDK wraps the whole workflow: knowledge, benchmarks, alignment projects, deployments, evaluations and inference. Install the one for your project's language so your agent writes less code by hand.

    Browse the SDKs
    Terminal
    # Pythonpip install nugen-sdk==2026.11.4# TypeScriptnpm install @nugen-in/[email protected]
  7. Step 7: Check Your Key

    Run this once to confirm the key works. It lists the open-weight base models you can align right now, so you get a JSON list of models back.

    Terminal
    curl https://api.nugen.in/api/v3/models/base \  -H "Authorization: Bearer $NUGEN_API_KEY"
  8. Step 8: Add Nugen to AGENTS.md

    Cursor reads AGENTS.md at the root of your project as instructions for its agent. Download the Nugen instructions there.

    Terminal
    curl -o AGENTS.md https://nugen.in/AGENTS.md

    On Windows PowerShell, use curl.exe instead of curl.

  9. Step 9: Ask Your Agent to Align a Model

    Paste this prompt to start. Your agent reads the Nugen skill, asks about your domain, then adds your knowledge, sets the benchmark and runs the alignment for you.

    Prompt
    # Nugen SDKYou are helping me build on the Nugen API. Nugen Intelligence: build multi-model AI applications from expert models you own.Read these first:- https://nugen.in/AGENTS.md- https://nugen.in/skills/nugen/SKILL.mdGet an API key at https://nugen.in/signup and set `NUGEN_API_KEY`. Never hard-code it.Start by asking me what problem I want to solve. Then use the overview linked from SKILL.md to choose the path, and take me through it one step at a time, running each step with me.Inference capture is off by default. Ask me before you turn it on.
Need help?

The API reference covers every endpoint and parameter.

Read the API Reference (opens in a new tab)Raise a Ticket (opens in a new tab)

Prompts to Start With

Once your agent is set up, paste one of these.

  • Align a Model to Your Knowledge

    Add the files in ./knowledge to Nugen as knowledge, generate a 50-prompt benchmark from them, and start an alignment project on a small open-weight base model. Poll the status and tell me when the expert model is ready.

  • Compare Against a General Model

    Evaluate my expert model on our benchmark with its base model as the baseline, and summarise where the expert model is better and where it still falls short.

  • Run Retrieval on One Model ID

    Use my expert model ID for embeddings, reranking and chat to respond to prompts over ./knowledge, so retrieval, ranking and generation share one understanding of the domain.

  • Keep the Model Improving

    Turn on Nugen inference capture for my organisation, and add a script that re-runs the benchmark evaluation on my expert model and reports any change in score.