Go SDK
The official Elydora SDK for Go 1.21+ with typed requests and responses.
Installation
bash
go get github.com/Elydora-Infrastructure/Elydora-Go-SDK/v2Quick Start
go
import (
"crypto/ed25519"
"encoding/base64"
"errors"
"fmt"
"log"
"os"
elydora "github.com/Elydora-Infrastructure/Elydora-Go-SDK/v2"
)
client, err := elydora.NewClient(&elydora.Config{
OrgID: "org_acme",
AgentID: "agent_underwriter",
PrivateKey: os.Getenv("ELYDORA_KEY"),
})Register an Agent
go
seed, err := base64.RawURLEncoding.DecodeString(os.Getenv("ELYDORA_KEY"))
if err != nil {
log.Fatal(err)
}
publicKey := ed25519.NewKeyFromSeed(seed).Public().(ed25519.PublicKey)
publicKeyBase64 := base64.RawURLEncoding.EncodeToString(publicKey)
result, err := client.RegisterAgent(&elydora.RegisterAgentRequest{
AgentID: "agent_underwriter",
DisplayName: "Loan Underwriter v2",
ResponsibleEntity: "Underwriting Team",
IntegrationType: elydora.IntegrationTypeSDK,
Keys: []elydora.RegisterAgentKeyInput{{
KID: "agent_underwriter-key-1",
PublicKey: publicKeyBase64,
Algorithm: "ed25519",
}},
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Agent.Status) // "active"Submit an Operation
go
record, err := client.CreateOperation(&elydora.CreateOperationParams{
OperationType: "loan.approve",
Subject: map[string]interface{}{"id": "borrower:BRW-2026-0042", "type": "borrower"},
Action: map[string]interface{}{"name": "approve", "type": "decision"},
Payload: map[string]interface{}{
"loanId": "LN-2026-001",
"amount": 50000,
},
})
if err != nil {
log.Fatal(err)
}
resp, err := client.SubmitOperation(record)
if err != nil {
log.Fatal(err)
}
// resp.Receipt is the EAR (Elydora Acknowledgement Receipt)
fmt.Println(resp.Receipt.ReceiptID) // "rcpt_xyz789"
fmt.Println(resp.Receipt.SeqNo) // 42
fmt.Println(resp.Receipt.ChainHash) // "sha256:..."Verify an Operation
go
result, err := client.VerifyOperation(operationID)
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Valid) // true
fmt.Println(result.Checks.Signature) // true
fmt.Println(result.Checks.Chain) // trueError Handling
go
_, err := client.SubmitOperation(record)
if err != nil {
var elydoraErr *elydora.ElydoraError
if errors.As(err, &elydoraErr) {
fmt.Println(elydoraErr.Code) // "AGENT_FROZEN"
fmt.Println(elydoraErr.Message) // "Agent is frozen..."
}
}CLI Installation
The Go SDK includes a CLI for one-command installation across all 15 hook integrations in the AI Agent Integration catalog. Interactive installs collect secrets through echo-disabled prompts; automation uses owner-only secret files. See the integration guide for details.
Interactive install
go install github.com/Elydora-Infrastructure/Elydora-Go-SDK/v2/cmd/elydora@latest
elydora install --agent claudecode \
--org-id "your_org_id" --agent-id "your_agent_id" \
--kid "your_key_id" --base-url "https://api.elydora.com"Automation with owner-only secret files
go install github.com/Elydora-Infrastructure/Elydora-Go-SDK/v2/cmd/elydora@latest
elydora install --agent claudecode \
--org-id "your_org_id" --agent-id "your_agent_id" \
--kid "your_key_id" --base-url "https://api.elydora.com" \
--private-key-file "/secure/path/private.key" \
--token-file "/secure/path/api.token"Configuration Options
- OrgID — Your organization identifier (required)
- AgentID — The agent identifier (required)
- PrivateKey — Base64url-encoded Ed25519 private key seed (required)
- BaseURL — API base URL (defaults to production)
- TTLMs — Default TTL in milliseconds (default: 30000)
- MaxRetries — Number of retry attempts (default: 3)