Go SDK Overview
Go SDK Overview
Section titled “Go SDK Overview”ai-lib-go (v1.1.0, Go 1.21+) is the Go runtime for AI-Protocol.
| Package | Layer | Role |
|---|---|---|
pkg/ailib | Execution (E) | Client, manifest HTTP chat, capability endpoints |
pkg/contact | Policy (P) | FallbackClient, circuit-breaker policy |
Primary execution path
Section titled “Primary execution path”Client.Chat → manifest endpoint resolution → JSON HTTP → micro-retry (internal/resilience) → ExecutionMetadata on response.
Without a manifest, WithBaseURL + WithAPIKey uses OpenAI-compatible defaults.
Streaming: ChatStream → SSE decoder (openai_sse by default).
Capability boundaries
Section titled “Capability boundaries”| Area | Reality |
|---|---|
| MCP / Computer Use | Manifest HTTP routes + capability gate — not full wire clients |
| Circuit breaker | pkg/contact only |
| Multimodal | Pass-through Message.Content JSON |