Data & analysis

go-weave

Try it

Unofficial Go client for the W&B Weave trace server API, generated with oapi-codegen. `weave.NewClientWithResponses(baseURL, auth)` from `github.com/psyb0t/go-weave` gives typed methods for every endpoint of the Weave trace server (start, end, read and query calls, objects, tables, files, feedback, costs, refs, threads, annotation queues, evaluations, agents, completions, OTel trace export, and the v2 datasets, models, ops, scorers, scores, predictions and evaluation runs). Auth is HTTP Basic with the W&B username and API key, set in a request editor. Use when Go code needs to log traces to Weave or read them back, or the project already imports go-weave.

What it does

Typed Go client for the W&B Weave trace server. Every endpoint is a method on , and responses decode into and the other status fields.

The skill document

go-weave

Typed Go client for the W&B Weave trace server. Every endpoint is a method on *weave.ClientWithResponses, and responses decode into JSON200 and the other status fields.

For install, the endpoint groups, streaming responses and errors, see references/setup.md.

Security & safety

  • Read the credentials from WANDB_USERNAME and WANDB_API_KEY. Never hardcode them, commit them or log them, and never print request headers.
  • Trace inputs and outputs you send go to the trace server base URL the code passes, https://trace.wandb.ai unless the user runs a dedicated or self-hosted W&B instance.
  • The delete and purge endpoints (CallsDelete, ObjDelete, CostPurge, FeedbackPurge and the v2 ...Delete... methods) remove project data. Call them only on data the task created or the user named, and only when the user asked.

When to use

  • Go code needs to record calls (spans) in Weave, attach feedback or costs, or query traces, objects and tables.
  • The project already imports github.com/psyb0t/go-weave.

When NOT to use

  • The code is Python or TypeScript. Use the official weave package, which also wraps functions as ops automatically.
  • You only export OpenTelemetry spans. An OTLP exporter pointed at the Weave OTel endpoint does that without this client.

Usage

import (
	"context"
	"net/http"
	"os"
	"time"

	"github.com/psyb0t/go-weave"
)

auth := weave.WithRequestEditorFn(func(_ context.Context, req *http.Request) error {
	req.SetBasicAuth(os.Getenv("WANDB_USERNAME"), os.Getenv("WANDB_API_KEY"))

	return nil
})

client, err := weave.NewClientWithResponses("https://trace.wandb.ai", auth)
if err != nil {
	return err
}

started, err := client.CallStartCallStartPostWithResponse(ctx, weave.CallStartReq{
	Start: weave.StartedCallSchemaForInsert{
		ProjectId:  "/",
		OpName:     "my-op",
		StartedAt:  time.Now().UTC(),
		Inputs:     map[string]interface{}{"prompt": "hello"},
		Attributes: map[string]interface{}{},
	},
})
if err != nil {
	return err // transport error
}

if started.JSON200 == nil {
	return fmt.Errorf("call start: status %d: %s", started.StatusCode(), started.Body)
}

read, err := client.CallReadCallReadPostWithResponse(ctx, weave.CallReadReq{
	ProjectId: "/",
	Id:        started.JSON200.Id,
})
if err != nil {
	return err
}

if read.JSON200 != nil && read.JSON200.Call != nil {
	_ = read.JSON200.Call.OpName
}

Method names come from FastAPI operation IDs: handler name, path, HTTP method. CallReadCallReadPost is POST /call/read, ServerInfoServerInfoGet is GET /server_info. Most bodies carry ProjectId as /.

Errors come back two ways: a non-nil err is a transport or decode failure, and an API error is a nil JSON200 with JSON422 (HTTPValidationError) or no typed field set. Always check StatusCode() before using JSON200.

Related skills

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván857 installs69 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván561 installs18 stars

More from psyb0t

Browse all skills

Drive a user-deployed mt5-httpapi MetaTrader 5 bridge over HTTP, with per-action confirmation on every real-money call.

by psyb0t108 installs4 stars

Docker-packaged browser automation for QA against anti-bot stacks and authorized detection testing.

by psyb0t138 installs2 stars

Self-hosted OpenAI-compatible speech service — transcription, translation, and synthesis from one container.

by psyb0t13 installs

Run ffmpeg, sox, and ImageMagick jobs against your files in a fixed-allowlist SSH sandbox.

by psyb0t71 installs

Generate speech audio via Qwen3-TTS over SSH with preset voices, voice cloning, and voice design.

by psyb0t55 installs

Drive one or more IMAP/SMTP mailboxes through a single REST + MCP endpoint — read, search, send, mark-seen, and delete across accounts in parallel.

by psyb0t15 installs