Go SDK
The official Elydora SDK for Go 1.21+. Fully typed, context-aware, and designed for high-throughput agent systems.
Installation
bash
go get github.com/Elydora-Infrastructure/Elydora-Go-SDKQuick Start
go
import "github.com/Elydora-Infrastructure/Elydora-Go-SDK"
client, err := elydora.NewClient(&elydora.Config{
OrgID: "org_acme",
AgentID: "agent_underwriter",
PrivateKey: os.Getenv("ELYDORA_KEY"),
})Register an Agent
go
result, err := client.RegisterAgent(&elydora.RegisterAgentRequest{
AgentID: "agent_underwriter",
DisplayName: "Loan Underwriter v2",
ResponsibleEntity: "Underwriting Team",
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 hook installation in supported AI coding tools (Claude Code, Cursor, Gemini CLI, Kiro CLI, Kiro IDE, OpenCode, Copilot CLI, Letta Code). See the AI Agent Integration guide for details.
bash
go install github.com/Elydora-Infrastructure/Elydora-Go-SDK/cmd/elydora@latest && \
elydora install --agent claudecode \
--org_id "your_org_id" --agent_id "your_agent_id" \
--private_key "your_private_key" --kid "your_key_id" \
--token "your_api_token"Configuration Options
- OrgID — Your organization identifier (required)
- AgentID — The agent identifier (required)
- PrivateKey — Ed25519 private key in PEM or base64 format (required)
- BaseURL — API base URL (defaults to production)
- TTLMs — Default TTL in milliseconds (default: 30000)
- MaxRetries — Number of retry attempts (default: 3)