Developers

Build on the NEXUS API

Everything you need to integrate adaptive agent orchestration, quality gating, and skill marketplaces into your own products and workflows.

Getting Started

Four steps to your first agent task

Step 01

Create an API key

Sign up for a free account, then generate a scoped API key from your dashboard's API Keys panel.

Step 02

Install the CLI or SDK

Use the NEXUS CLI for project scaffolding and local development, or pull the SDK directly into your app.

Step 03

Run your first task

Submit a task to a ComponentAgent via the API or CLI, and watch CORTEX route it to the right model tier.

Step 04

Wire up MergeGate

Add the MergeGate GitHub Action to your repo so every AI-generated PR is scored before it can merge.

Tools

SDKs & CLI

Official client libraries for every major language, plus a CLI for local development and CI pipelines.

NEXUS CLI

Scaffold projects, run Forge pipelines, and inspect MergeGate scores from your terminal.

npm install -g @nexus-os/cliLearn more

Python SDK

Type-hinted client for the Agents, Marketplace, and Sessions APIs, plus async streaming support.

pip install nexus-osLearn more

TypeScript SDK

First-class types for every endpoint and WebSocket event, generated directly from the OpenAPI spec.

npm install @nexus-os/sdkLearn more

MCP Server

Expose NEXUS capabilities to Claude, Cursor, and other MCP-compatible tools via a local MCP server.

npx @nexus-os/mcp-serverLearn more

API Examples

A few lines, real agents

The Agents and Marketplace APIs are designed to feel familiar — typed clients, predictable resources, and webhooks for async events.

Create a task (TypeScript)

Submit a task to a ComponentAgent. CORTEX selects the model tier automatically based on complexity and your budget.

typescript
import { NexusClient } from "@nexus-os/sdk";

const nexus = new NexusClient({
  apiKey: process.env.NEXUS_API_KEY,
});

// Submit a task — CORTEX picks the model tier
const task = await nexus.agents.createTask({
  projectId: "proj_8f2a1c",
  type: "backend",
  prompt: "Add a rate limiter middleware to the /api/uploads route",
  qualityThreshold: 0.75, // MergeGate pass threshold
});

console.log(task.id, task.status); // "task_91a3", "queued"

Marketplace skills (Python)

List, filter, and install community or official skills directly into a project.

python
import os
from nexus_os import NexusClient

client = NexusClient(api_key=os.environ["NEXUS_API_KEY"])

# Browse skills in the marketplace
skills = client.marketplace.list_skills(
    category="database",
    sort="rating",
)

for skill in skills:
    print(skill.name, skill.version, skill.rating)

# Install a skill into your project
client.marketplace.install_skill(
    project_id="proj_8f2a1c",
    skill_id="skill_pg-zero-downtime-migrate",
)

Subscribe to MergeGate events (cURL)

Register a webhook to receive task completion and MergeGate scoring events as they happen.

bash
# Listen for MergeGate results via webhook
curl -X POST https://api.nexus-os.tech/v1/webhooks \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/hooks/nexus",
    "events": ["task.completed", "mergegate.scored"]
  }'

Ready to start building?

Full API reference, authentication guides, and rate limits are all in the docs. Or jump straight to the source on GitHub.