Skip to content
MacrofoldDocs
Build with the API

SDKs

Choose a Macrofold client for TypeScript, Python, Go, Rust, or Java.

Use Macrofold from your application to manage projects, start cloud agents, and stream their progress. Every SDK uses the same API contract, permissions, and resource model.

Choose your language

LanguageImportGuide
TypeScriptimport { Client } from 'macrofold'TypeScript
Pythonfrom macrofold import ClientPython
Gomacrofold "github.com/Macrofold/Macrofold/sdk/go"Go
Rustuse macrofold::ClientRust
Javaimport dev.macrofold.ClientJava

Each guide starts with installation from source. Set your service origin and a scoped API key in the application environment. The local simulator lets you develop without paid model calls.

Requests and streaming

TypeScript and Python expose operation IDs through request. Go, Rust, and Java expose generated, typed API groups. Use your editor's completion alongside the interactive /reference API documentation.

Use the maintained stream helper for incremental run events. It resumes from the last delivered sequence after a disconnected stream and suppresses duplicates. Save that sequence if your application must resume after restarting. Detaching the stream leaves the remote run running; cancel through the run API explicitly.

Reliable mutations

TypeScript and Python create idempotency keys and preserve them across bounded retries. Go, Rust, and Java require an explicit key for operations that need one and make one REST attempt. Generate a unique key per intended action, store it with the request, and reuse that exact key and body if the response is lost. Do not retry an uncertain mutation with a new key.

All clients preserve monetary values as decimal strings. Constructors require HTTPS except on loopback development hosts and refuse redirects. Keep API keys in server-side code. For expiring OAuth credentials, TypeScript and Python accept token suppliers; recreate the Go, Rust, or Java client with a renewed token before new requests.

See API conventions for errors, pagination, asynchronous operations, and organization selection. Contributors can read SDK architecture and verification.