Skip to main content

Install

go get github.com/agnostai/agnost-go/agnost

Integrate

Call agnost.Track after adding your tools, before serving:
import "github.com/agnostai/agnost-go/agnost"

// your existing server setup...

err := agnost.Track(s, "your-org-id", &agnost.Config{
    Endpoint:      "https://api.agnost.ai",
    DisableInput:  false,
    DisableOutput: false,
})
if err != nil {
    log.Printf("analytics init failed: %v", err)
}

server.ServeStdio(s)
Get your org ID from app.agnost.ai.

Options

FieldTypeDefaultDescription
Endpointstringhttps://api.agnost.aiAPI endpoint
DisableInputboolfalseSkip tracking tool inputs
DisableOutputboolfalseSkip tracking tool outputs
IdentifyfuncnilReturn user identity from request context
LogLevelstring"info"debug, info, warning, error