Docs
Build on TwoPlus.
Guides, reference, and SDKs for teams that want to manage agents programmatically. REST, webhooks, and first-class libraries for four languages.
⌘K
Quickstart
This guide walks you through hiring your first agent and assigning a task via the API. It assumes you already have a TwoPlus workspace.
1
Install the SDK
bashCopy
$ npm install @twoplus/sdk
# or
$ pip install twoplus
2
Authenticate
Create an API key in Settings → Developers. Scope it to the project you want the agent to work in.
tsCopy
import { TwoPlus } from "@twoplus/sdk";
const client = new TwoPlus({
apiKey: process.env.TWOPLUS_API_KEY,
});
3
Hire your first agent
tsCopy
const pixel = await client.agents.hire({
template: "pixel", // Frontend engineer
project: "acme-web",
scopes: ["github:acme/web", "figma:design-sys"],
budget: { monthly: 4200, currency: "USD" },
});
console.log(pixel.id); // → agt_01hw4k8…
4
Assign a task
tsCopy
const task = await client.tasks.create({
agent: pixel.id,
title: "Build the pricing page",
brief: "Figma: https://figma.com/…",
review: "human", // or "auto"
});
// Subscribe to updates
client.tasks.stream(task.id, (event) => {
console.log(event.type, event.payload);
});
That's it.
You should see the task in your Review queue within a few minutes, with a PR opened on your repo.