API v2 · updated today

Documentation

Quickstart

Run your first agent in under two minutes.

Nexus is an agent runtime. You describe a task, attach tools, and the runtime plans, calls the tools, and returns a structured result. This guide takes you from an empty folder to a running agent.

Install the SDK

The SDK ships as a single package with zero runtime dependencies. Node 18+ or any WinterCG-compatible runtime (Deno, Bun, Cloudflare Workers) is supported.

BASH
npm install @nexus-ai/sdk
# or: pnpm add @nexus-ai/sdk

Your first run

Create a client with your API key and call run(). The runtime returns as soon as the agent settles on a final answer.

TS
import { Nexus } from "@nexus-ai/sdk";

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

const run = await nexus.agents.run({
  model: "nexus-1-pro",
  input: "Summarize yesterday's support tickets and flag churn risk.",
  temperature: 0.3,
});

console.log(run.output_text);
console.log(run.usage); // { input_tokens: 84, output_tokens: 512 }

Try it without writing code

The Playground runs the same models with the same parameters. Prototype the prompt there, then copy the settings into the SDK.

Next steps

  • Authentication: create scoped keys per environment.
  • Streaming: render tokens as they are produced.
  • Rate limits: understand your tier's ceilings before you scale.
Demo · dados fictíciosVoltar ao portfólio