# libpanto-go Idiomatic Go bindings for `libpanto-c` via cgo. ## Build Build the C ABI first: ```sh cd ../libpanto-c zig build ``` Then use the Go package from this directory: ```sh go test ./... ``` At runtime, make sure `../libpanto-c/zig-out/lib` (or the installed equivalent) is on your platform's dynamic library path. ## Example ```go panto.Init() defer panto.Deinit() agent, err := panto.NewAgent(panto.Config{ Provider: panto.ProviderConfig{ OpenAIChat: &panto.OpenAIChatConfig{ APIKey: os.Getenv("OPENAI_API_KEY"), BaseURL: "https://api.openai.com/v1", Model: "gpt-4.1-mini", }, }, }) if err != nil { /* handle */ } defer agent.Close() stream, err := agent.Run("hello") if err != nil { /* handle */ } defer stream.Close() for ev := range stream.Iter() { // ev.Tag identifies the active payload. } if err := stream.Err(); err != nil { /* handle */ } ```