Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 2.43 KB

File metadata and controls

76 lines (54 loc) · 2.43 KB

Hawk SDK for Go

Official Go client for the Hawk daemon API

Go License CI


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.

Features

  • 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

Installation

go get github.com/GrayCodeAI/hawk-sdk-go

Quick Start

import 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)

Examples

See the examples/ directory for complete runnable examples.

Ecosystem Boundaries

  • hawk-sdk-go is a consumer of Hawk public APIs and contracts.
  • Do not import support engine repos such as eyrie, yaad, tok, trace, sight, or inspect.
  • Do not import hawk/internal/* or removed legacy path hawk/shared/types.
  • Cross-repo shared vocabulary should come from Hawk public surfaces or hawk-core-contracts, not engine internals.

API Reference

Client Methods

  • Health(ctx) - Check daemon health and version
  • Chat(ctx, req) - Send a chat message
  • ChatStream(ctx, req) - Stream chat responses
  • Sessions(ctx) - List active sessions
  • Session(ctx, id) - Get session details

Contributing

Contributions are welcome — please read CONTRIBUTING.md before opening a pull request.

License

MIT - see LICENSE for details.