Go SDK for the agent:// protocol — resolve, connect, and serve Agenium agents.
go get github.com/agenium-ai/agenium-goclient := agenium.NewClient("")
resp, err := client.Send(ctx, "agent://my-agent", &agenium.Message{
From: "caller",
To: "my-agent",
Type: agenium.MessageTypeText,
Body: "Hello!",
})handler := func(ctx context.Context, frame *agenium.Frame) (*agenium.Frame, error) {
return &agenium.Frame{
Version: agenium.ProtocolVersion,
Message: &agenium.Message{
From: "my-agent",
To: frame.Message.From,
Type: agenium.MessageTypeResult,
Body: "Got it!",
},
}, nil
}
server := agenium.NewServer("My Agent", "my-agent", handler,
agenium.WithAPIKey("dom_abc123..."), // auto-registers with DNS
agenium.WithAddr(":8080"),
)
server.ListenAndServe(ctx)resolver := agenium.NewResolver("")
record, err := resolver.Resolve(ctx, "my-agent")
// record.Endpoint → "http://1.2.3.4:8080"reg := agenium.NewRegistrar("", "dom_your64hexkey")
err := reg.Register(ctx, "my-agent", "http://my-server:8080")agent://URI resolution via Agenium DNS (default:185.204.169.26:3000)- DNS response caching (5 min TTL)
- Auto-registration with
dom_API keys - Agent Card serving at
/.well-known/agent.json - Health endpoint at
/health - Context-based cancellation
- Standard library only — no external dependencies
go test ./...MIT
This project includes optional bug reporting to the Agenium monitoring server.
Set the following environment variables to enable bug reporting:
BUG_REPORT_URL=http://130.185.123.153:3100
BUG_REPORT_TOKEN=your_token_here
Bug reporting is disabled by default — it only activates when BUG_REPORT_TOKEN is set. Reports are sent asynchronously (fire and forget) and never block the main application.