SDK

There is no packaged SDK yet, on purpose: the API is small, the answers are plain JSON, and the MCP door already gives an agent everything the console's assistant knows. This page says what to reach for today and what is planned.

Today

An agent or an assistant

Use the MCP server. It is the supported integration for anything model-driven: drafting, validating, explaining failures, reading vendor docs, all tenant-scoped.

A program

Call the API directly with a personal access token. The examples below are the whole of what a client needs.

JavaScript

const base = 'https://console.dev.ductileai.com';
const headers = { authorization: `Bearer ${process.env.DUCTILE_TOKEN}` };

const list = await fetch(`${base}/api/v1/console/businessProcesses?limit=50`, { headers })
  .then((r) => r.json());

const draft = await fetch(`${base}/api/v1/console/assist/generate`, {
  method: 'POST',
  headers: { ...headers, 'content-type': 'application/json' },
  body: JSON.stringify({ brief: 'every morning, email me the invoices that went overdue yesterday' }),
}).then((r) => r.json());
// draft.generation.definition is the process; draft.generation.valid says whether it validated

Python

import os, requests

base = "https://console.dev.ductileai.com"
h = {"Authorization": f"Bearer {os.environ['DUCTILE_TOKEN']}"}

procs = requests.get(f"{base}/api/v1/console/businessProcesses", headers=h, params={"limit": 50}).json()

mcp = requests.post(f"{base}/mcp", headers=h, json={
    "jsonrpc": "2.0", "id": 1, "method": "tools/call",
    "params": {"name": "search_agents", "arguments": {"query": "post a Slack message", "limit": 5}},
}).json()

Planned

Until then the API is the contract. Anything documented here is stable within a major version; anything not documented may change.