Skip to content
MANTYX.IO

Drive MANTYX agents from your code.

MANTYX runs the full agent loop, workspace tools, memory, and observability. These SDKs connect your process to that runtime so you can mixremote tools withlocal handlers in one loop.

Pick your stack

Same wire protocol, three first-party clients.

A one-shot run, in any language

Same call shape across all three SDKs — pick the tab for your stack.

oneshot.ts
import { MantyxClient, defineLocalTool } from "@mantyx/sdk";
import { z } from "zod";
import { readFile } from "node:fs/promises";
const client = new MantyxClient({
apiKey: process.env.MANTYX_API_KEY!,
workspaceSlug: "acme-corp",
});
const result = await client.runAgent({
systemPrompt: "You are a helpful filesystem assistant.",
prompt: "Read /etc/hostname and tell me what it says.",
tools: [
defineLocalTool({
name: "read_file",
parameters: z.object({ path: z.string() }),
execute: ({ path }) => readFile(path, "utf8"),
}),
],
});
console.log(result.text);

Plan-only runs

Get a structured multi-step checklist with runPlan — no agent loop, no tools. The final checklist lives on result.plan.

plan-only.ts
import { MantyxClient } from "@mantyx/sdk";
const client = new MantyxClient({
apiKey: process.env.MANTYX_API_KEY!,
workspaceSlug: process.env.MANTYX_WORKSPACE_SLUG!,
});
const result = await client.runPlan({
systemPrompt: "You break complex work into ordered steps.",
prompt: "Migrate billing tables from Postgres 14 to 16 and backfill rows.",
});
for (const step of result.plan?.steps ?? []) {
console.log(`[${step.status}] ${step.title}`);
}