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 mix remote tools with local 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);