MangoDocs

Mango SDKs

Edit on GitHub

Use the first-party Go, Python, or TypeScript/JavaScript SDK to avoid repeating HTTP, multipart, pagination, and SSE code in every application. The client connects to your Mango server, which continues to own execution, persistence, scheduling, and sandboxes.

Packages

LanguagePackage / moduleInstallation and examples
Gogithub.com/yanpgwang/mango/sdk/goGo SDK
Pythonmango-sdk (import mango_sdk)Python SDK
TypeScript / JavaScriptmango-sdkTypeScript SDK

Start with the multi-language quickstart, or read the language-specific guides: Go, Python, and TypeScript / JavaScript.

Install an alpha

The packages cover the current OpenAPI operation inventory, including Memory, Skills, Files, multi-agent Threads and Environment Work. Coverage means API access, not an expansion of the server capabilities. These are alpha SDKs; a stable SDK contract has not been established. Match the SDK version to the server revision you deploy.

Python and TypeScript/JavaScript are published on PyPI and npm. Install by exact version; Go has no independently tagged release yet and uses source installation.

npm install mango-sdk@0.1.0-alpha.1

The TypeScript package includes compiled JavaScript and declarations; consuming it does not require building the SDK. The alpha is not a stable release even if npm displays it under latest. See the release record for verified artifacts and the release guide for the publishing process. Package metadata alone is not evidence of publication.

Install from source

Use source installation when developing against this checkout, running the repository examples, or using the Go SDK before a tagged release. Run from the Mango repository root unless a command says to use your application directory.

npm --prefix sdk/typescript ci
npm --prefix sdk/typescript run build
# Then, in your application directory:
npm install /absolute/path/to/mango/sdk/typescript

Authentication and errors

Configure your Mango URL and Workspace API key. Model-provider credentials stay on the Mango worker, not in the SDK client. Errors expose HTTP status, Mango error type and request ID for application handling and log correlation.

Optional fields preserve the difference between omission, explicit null, false, zero and empty collections. The language README explains its optional-value representation.

Events and recovery

The SDKs expose live SSE iteration and persisted event listing. Open a stream before sending work to observe the new turn. On reconnection, open a new stream first, list history while it is connected, and deduplicate the sources by event ID. Preview deltas are ephemeral, not durable history.

The SDK does not automatically resend a message or tool result after an ambiguous HTTP failure. Check persisted events before deciding to retry; an automatic resend could duplicate work. See Session events.

Development and verification

make sdk-install
make sdk-check
make sdk-test
make sdk-conformance

make sdk-generate regenerates all language bindings from the checked-in OpenAPI document. Generated-source checks are separate from transport tests. HTTP conformance exercises real Mango handlers with test-only storage and model implementations. Service recovery and real-model workflows remain separate validation tiers.

The SDKs do not depend on the documentation framework. Fumadocs includes named regions from the runnable quickstart files under each SDK's examples/ directory; it does not maintain a second copy of those snippets. sdk-test checks their language types, and sdk-conformance runs those exact files against Mango's HTTP handlers with deterministic test-only repositories and model behavior.

The API reference keeps HTTP routes, request/response schemas, and lifecycle constraints visible. SDK tabs explain how to invoke that same contract, not a second contract or a promise that every server capability is production-ready.

On this page