Skip to content

Quickstart

This walks the whole loop once: deploy a solver and its data, create a project from it, ask Aura to solve it, and read the result back.

You need an Aura API key (sk-aura-…). Mint one in the Aura web app under Company settings → API keys, and put it in your environment:

Terminal window
export AURA_API_KEY="sk-aura-..."
Terminal window
npm install @strangeworks/aura-sdk

A deployment is a solver plus its data, uploaded under a name your company can create projects from.

Its layout is fixed: the solver package goes under run/, the dataset under top-level data/. The solver reads ../data/ at solve time, so the same solver can run against a different dataset.

  • Directoryrun/
    • pyproject.toml
    • Directorysrc/
      • Directorysolver/
  • Directorydata/
    • instances.json

See the layout contract for what the server checks.

import { AuraClient, deployFromFolder } from "@strangeworks/aura-sdk";
const aura = new AuraClient({ apiKey: process.env.AURA_API_KEY! });
await aura.createDeployment("vrp");
await deployFromFolder(aura, "vrp", "./my-model/solver", { destPrefix: "run/" });
await deployFromFolder(aura, "vrp", "./my-model/data", { destPrefix: "data/" });
const check = await aura.checkDeployment("vrp");
if (!check.ok) throw new Error(`Not runnable: ${check.missing.join(", ")}`);

check is the server-side run contract: ok, plus missing and warnings naming what a project created from this deployment would fail on. Deploying again syncs rather than adds — remote files no longer present locally are removed, so renames leave nothing stale.

A project created from a deployment lands directly in run mode, so you can chat with it immediately.

const project = await aura.createProject({
name: "vrp demo",
fromDeployment: "acme/vrp", // "<company>/<name>"
});
const reply = await aura.chat(project.id, "Solve this and summarize the result.");
console.log(reply.content);

chat() dispatches your message and polls until that turn finishes, returning the agent’s reply. It waits for the reply to your message specifically — see Chat with a project for what that guarantees.

const [latest] = await aura.listExecutions(project.id);
console.log(latest.status, latest.output_summary);
const solution = await aura.readFile(
{ source: "workspace", projectId: project.id },
"run/output/solution.json",
);
console.log(JSON.parse(solution.text ?? "{}"));
  1. Core concepts — what deployments, projects, conversations and snapshots each own, so the API stops needing guesses.

  2. Deploy a model — the manifest, the include/exclude rules, and the run/ + data/ contract in full.

  3. Errors — the three failure modes of a turn, and which one you are looking at.