SDK — Go[ v2.x ]

[ 00 ]overview

Idiomatic Go with context support, structured errors, and concurrent agent execution out of the box.

API Reference

[ 01 ]Install

terminal — install

$ go get github.com/myndlabs/sdk-go

[ 02 ]Quick start

main.go
package main

import (
    "context"
    "fmt"
    "os"

    mynd "github.com/myndlabs/sdk-go"
)

func main() {
    client := mynd.NewClient(os.Getenv("MYND_API_KEY"))

    agent, _ := client.Agents.Create(context.Background(), &mynd.AgentCreateParams{
        Name:         "my-agent",
        Model:        "auto",
        Instructions: "You are a helpful assistant.",
    })

    run, _ := client.Agents.Run(context.Background(), agent.ID, &mynd.RunParams{
        Input: "Explain quantum computing in one sentence.",
    })

    fmt.Println(run.Output)
}

[ 03 ]Features

Context-aware

Full context.Context support for cancellation, timeouts, and tracing.

Structured errors

Typed errors with HTTP status codes, request IDs, and retry hints.

Concurrency

Goroutine-safe client. Run multiple agents concurrently with zero hassle.

Everything else — auth, streaming, errors, pagination — lives in the documentation.

Full docs