Go SDK for the AEO Protocol v0.1 — parse, build, validate, and fetch AEO declaration documents. Zero non-stdlib dependencies.
go get github.com/mizcausevic-dev/aeo-sdk-gopackage main
import (
"context"
"fmt"
"log"
aeo "github.com/mizcausevic-dev/aeo-sdk-go"
)
func main() {
// Fetch and parse from a live well-known URL
doc, err := aeo.FetchWellKnown("https://mizcausevic-dev.github.io")
if err != nil {
log.Fatal(err)
}
fmt.Println(doc.Entity.Name) // "Miz Causevic"
fmt.Println(doc.ClaimIDs()) // [current-role location ...]
fmt.Println(doc.FindClaim("years-experience").Value) // 30
// Parse from bytes
doc2, _ := aeo.ParseDocumentString(`{"aeo_version":"0.1", ...}`)
// Custom HTTP client with context
ctx := context.Background()
client := aeo.DefaultClient()
_, _ = client.FetchWellKnown(ctx, "https://example.com")
_ = doc2
}- Parse —
ParseDocument(bytes),ParseDocumentString(s),LoadDocument(path)— all usejson.DisallowUnknownFieldsfor strict conformance - Build —
Document,Entity,Authority,Claim,Verification,CitationPreferences,AnswerConstraints,Auditare all exported struct types with proper JSON tags - Serialize —
doc.Marshal()returns pretty-printed JSON - Fetch —
aeo.FetchWellKnown(origin)does HTTP discovery against/.well-known/aeo.jsonwithAccept: application/aeo+json, application/json. CustomClientlets you bring your own*http.Clientand pass acontext.Context. - Query —
doc.ClaimIDs()anddoc.FindClaim(id)helpers
Supports the AEO Protocol at conformance Level 1 (Declare). Signature verification (L2) and audit-endpoint posting (L3) deferred to v0.2.
None. Uses only the standard library: encoding/json, net/http, context, io.
go vet ./...
go test -race -v ./...
go build ./...Full spec at github.com/mizcausevic-dev/aeo-protocol-spec.
MIT-licensed. Free for commercial and non-commercial use with attribution. The AEO Protocol specification this SDK implements is also MIT (see aeo-protocol-spec).
| Spec | Implementation |
|---|---|
| AEO Protocol | aeo-sdk-python · aeo-sdk-typescript · aeo-sdk-rust · aeo-sdk-go (this) · aeo-cli · aeo-crawler |
| Prompt Provenance | — |
| Agent Cards | — |
| AI Evidence Format | — |
| MCP Tool Cards | — |
Connect: LinkedIn · Kinetic Gain · Medium · Skills