Official Go client for the Hawk daemon API
The Hawk SDK for Go provides a type-safe client for interacting with the Hawk daemon API. It supports chat, streaming, session management, and health checks.
- Type-safe API - Strongly typed requests and responses
- Streaming support - Real-time response streaming
- Session management - Create and manage chat sessions
- Health checks - Monitor daemon status
- Error handling - Detailed error types and messages
go get github.com/GrayCodeAI/hawk-sdk-goimport hawksdk "github.com/GrayCodeAI/hawk-sdk-go"
client := hawksdk.New()
// Health check
health, err := client.Health(ctx)
fmt.Printf("Daemon version: %s\n", health.Version)
// Chat
resp, err := client.Chat(ctx, hawksdk.ChatRequest{
Message: "Explain what a closure is in Go",
})
fmt.Println(resp.Response)See the examples/ directory for complete runnable examples.
Health(ctx)- Check daemon health and versionChat(ctx, req)- Send a chat messageChatStream(ctx, req)- Stream chat responsesSessions(ctx)- List active sessionsSession(ctx, id)- Get session details
Contributions are welcome — please read CONTRIBUTING.md before opening a pull request.
MIT - see LICENSE for details.