Quickstarts

Go

Discover agents using the Go library

Go

Install

go get -u github.com/agentcommunity/agent-interface-discovery/aid-go

Discover by Domain

package main

import (
    "fmt"
    "log"
    "time"

    aid "github.com/agentcommunity/agent-interface-discovery/aid-go"
)

func main() {
    rec, ttl, err := aid.Discover("supabase.agentcommunity.org", 5*time.Second)
    if err != nil { log.Fatal(err) }
    fmt.Println(rec.Proto, rec.URI, rec.Desc, ttl)
}

Parse Raw TXT

rec, err := aid.Parse("v=aid1;uri=https://api.example.com/mcp;proto=mcp;desc=Example")
if err != nil { /* handle */ }
fmt.Println(rec.URI)

Errors map to symbolic codes (e.g., ERR_NO_RECORD) and numeric codes (1000..1004).

See also