SDKs

AISP SDKs

Go is the strongest current implementation path. Python and Node.js are assisted-beta integration targets validated per customer workflow.

Installation
# Confirm Go module path during assisted onboarding
Create a session
package main

import (
    "context"
    "fmt"
    "github.com/blackholemesh/aisp-go"
)

func main() {
    ctx := context.Background()
    sess, err := aisp.NewSession(ctx, "agent_abc123")
    if err != nil { panic(err) }
    defer sess.Close()
    fmt.Println("Session ID:", sess.ID())
}

Why SDKs over raw NATS?

Session lifecycle

SDKs handle INIT → ACTIVE → SUSPENDED → TERMINATED automatically. Raw NATS requires a manual state machine.

Ed25519 signing

Every message is auto-signed. Without the SDK you implement signing on every outbound message yourself.

CRDT memory

SDKs expose a clean get/set API. Raw NATS exposes the full CRDT merge complexity to your application.

Reconnect logic

SDKs handle network partitions and session resumption. Raw NATS connections require manual reconnect handling.

REST API Reference

Base URL: https://api.aisp.network/api/aisp

POST/session/createCreate a new agent session
GET/session/{id}Get session info and status
POST/session/{id}/suspendSuspend a session (persists state)
DELETE/session/{id}Terminate a session
POST/memory/setWrite a key to a memory namespace
GET/memory/getRead a key from a memory namespace
GET/peersList discoverable peers in the realm
POST/message/sendSend a message to a peer