sdk-go
Skill8.2k starsChanged 58 days agoApache-2.0View on GitHub
How the Go SDK in sdks/go is built, tested and released. Read before changing sdks/go, adding a resource method, or cutting a Go SDK version.
- Commits and pushes
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about GetStream/Agents
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.404 → 0.6.405”GitHub · Nov 30, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.403 → 0.6.404”GitHub · Nov 30, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.402 → 0.6.403”GitHub · Nov 29, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.399 → 0.6.402”GitHub · Nov 27, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.7.1 → 0.6.399”GitHub · Nov 27, 2026
The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 8
Talked about on GitHub (8 times).
On GitHub · 8
- Nov 30, 2026agent-skills.github.getstream.agents: 0.6.404 → 0.6.405 — sudosubin/agents.nix0 reactions
- Nov 30, 2026agent-skills.github.getstream.agents: 0.6.403 → 0.6.404 — sudosubin/agents.nix0 reactions
- Nov 29, 2026agent-skills.github.getstream.agents: 0.6.402 → 0.6.403 — sudosubin/agents.nix0 reactions
- Nov 27, 2026agent-skills.github.getstream.agents: 0.6.399 → 0.6.402 — sudosubin/agents.nix0 reactions
- Nov 27, 2026agent-skills.github.getstream.agents: 0.7.1 → 0.6.399 — sudosubin/agents.nix0 reactions
3 more on GitHub
- Nov 25, 2026fix: retain 7 reviewed references that left discovery (Nov 25) — tekvisions/voice-index0 reactions
- Nov 24, 2026agent-skills.github.getstream.agents: 0.7.0 → 0.7.1 — sudosubin/agents.nix0 reactions
- Nov 17, 2026agent-skills.github.getstream.agents: init at 0.7.0 — sudosubin/agents.nix0 reactions
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/python.mdcCursor rule
- pr-reviewSkill
- typesafe-aiSkill
- vgpuSkill
- accelerate-sales-engineerSkill
- add-connectorSkill
- check_pricesSkill
- cliSkill
- commitSkill
- connectorsSkill
- dashboardSkill
- decision_modelSkill
- deploySkill
- docsSkill
- generative-uiSkill
- good_morningSkill
- goSkill
- go-testingSkill
- integrate_new_modelsSkill
- llm-interfaceSkill
- loop_performance_benchSkill
- migrate-to-accelerateSkill
- new_modelsSkill
- paginationSkill
- parallel-agentsSkill
- performance_benchmarkSkill
- phonecheckSkill
- pricingSkill
- prospect-competitor-researchSkill
- provider_auditSkill
- prSkill
- querySkill
- refresh_model_statsSkill
- router-detectionSkill
- router-interfaceSkill
- router-llmSkill
- router-searchSkill
- router-stsSkill
- router-sttSkill
- router-ttsSkill
- scheduled-tasksSkill
- sdk-dartSkill
- sdk-dotnetSkill
- sdk-jsSkill
- sdk-kotlinSkill
- sdk-phpSkill
- sdk-rubySkill
- sdk-rustSkill
- sdkSkill
- sdk-swiftSkill
- securitySkill
- sttSkill
- telnyxSkill
- ttsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Always keep the SDK to latest version of Golang
- Distinctive: line 35
Always update dependencies to latest version
- Very specific: line 66
Every refusal is a *stream.RouterError, built by stream.NewRouterError from the answer.
- Very specific: line 84
No mocks: each package has its own stand-in router, an httptest.Server with a real gorilla upgrader (router in client/client_test.go and …
- Distinctive: line 104
Every identifier in a code block exists.
- Very specific: line 115
Check out the commit to tag (git switch --detach <the main commit>), run the smoke set from sdks/go with E2E_REQUIRED=1, as above, and keep …
- Very specific: line 140
Add retract vX.Y.Z // why to sdks/go/go.mod on main, and release the next patch the same way.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go SDK conventions
The per-language half of sdk for sdks/go, module
github.com/GetStream/Vision-Agents/sdks/go. Go goes first (AGENTS.md "SDK changes"), so a
shared API change lands here before the other SDKs. Write the Go itself by the
go and go-testing skills.
Layout
| Package | What it is |
agents | An agent spelled out in code: agents.New, folder sync, tools, phone, dispatch workers (agents.NewDispatch). What most programs start from |
client | Agents addressed by name (client.New(backend).Agent("docs")), their sessions, responses, items, forks, guests, usage callbacks |
stream | Backend (where the router is, who is billed), Pipeline (one session and its socket), RouterError, routers (stream.NewClient(backend).Router(name)), phone |
tools | The function registry and the JSON Schema read off an argument struct |
edge | Stream Video calls and the monitor link, through getstream-go |
acceleration | Generated from the spec. Never edited by hand |
stream.Backend is the one value every package shares. A client's Backend() carries its
usage watcher, so an agent, worker or router built on it reports to that client's
WithUsage and WithBalanceWarning; client.New with no options on such a backend shares
the watcher rather than wrapping it twice.
Go version
Always keep the SDK to latest version of Golang
Dependencies
- Always update dependencies to latest version
- Changes to dependencies cannot break the public API
The generated client
go generate ./... in sdks/go runs oapi-codegen on ../../acceleration/api/openapi.yaml with
api/oapi-codegen.yaml, which leaves out the Staff operations and the four socket
operations: stream holds the three it uses by hand on stream/socket.go, and
openSocketSession has no Go client yet. The output is committed; CI's go job regenerates
it and fails on a diff.
Models public, operations not:
- Generated types (
acceleration.Session,AgentConfig,SttOptions, enums) are the SDK's models and may appear in signatures. Do not wrap one for its own sake. - Generated operations (
*WithResponse) are never the API: README, examples and docs call a method ofclient,agentsorstream. A new endpoint is finished when it has one. stream.Backend.Client()andagents.Agent.Client()hand out the generated client for an operation with no method yet. Their doc comments say it carries no compatibility promise; keep that true and add no third accessor.- A parameter never takes
*acceleration.ClientWithResponses. Take astream.Backend.
Known gaps, generated only (docs on getstream.io call some of them raw today): simulations and
their runs, voices, knowledge documents and URLs beyond ingest and add, scheduled tasks,
campaigns, channels, connectors, a connection's credentials and tools, SIP trunks, 10DLC and opt-outs, phone
transfer, digits and release, account, credits, spend limits, usage events, teams, prices,
stats, policies, provider keys, runs, OCR and classify. Folder sync does not read
resume_history: from agent.yaml yet, so one that names it is refused.
Errors, retries and idempotency
- Every refusal is a
*stream.RouterError, built bystream.NewRouterErrorfrom the answer. Transport failures are wrapped with%w, soerrors.Is(err, context.Canceled)holds. - The SDK retries no HTTP request: it cannot know which of the caller's are safe to send twice.
RouterError.RetryAftersays how long the router asked for. Responses.Createsends a freshrequest_idper text question, so the router answers a resend once. A tool call is keyed by its id (tools.Registryreceipts), so a call the router sends again is joined or answered from its first result.- A text session's socket is the one thing reconnected: doubling waits from one second to 30,
for five minutes (
Pipeline.firstRetry,resumeFor), giving up on a 4xx other than 429.
Tests
cd sdks/go
go test -race ./...
go vet ./... && go vet -tags e2e .No mocks: each package has its own stand-in router, an httptest.Server with a real gorilla
upgrader (router in client/client_test.go and stream/accelerated_test.go, restartable
and reopened in stream/resume_test.go, pool in stream/dispatch_test.go, worked in
agents/dispatch_test.go, backend in agents/agent_test.go, moneyRouter in
client/usage_test.go, vendors in stream/phone_test.go). Reuse the package's own before
writing another. readme_test.go holds the README's quickstart to examples/quickstart.
e2e_test.go (tag e2e) drives a real router and real models, so it costs money and never
runs in CI. Without STREAM_ACCELERATION_URL it skips; with E2E_REQUIRED=1 every skip fails
instead. Its package comment names the release smoke set; run it against a router that
searches, holds knowledge and bills:
E2E_REQUIRED=1 go test -tags e2e -count=1 -v -run "$SMOKE" .README
The README renders on pkg.go.dev too, where only links inside the module resolve: a link
outside sdks/go is an absolute https://github.com/GetStream/Vision-Agents/tree/main/....
Every identifier in a code block exists; the quickstart is the example file verbatim.
Releasing
sdks/go is developed and released on main, the default branch, so go get ...@latest,
@main and pkg.go.dev see it. A version is a tag sdks/go/vX.Y.Z on a main commit; nothing
is copied. While 0.x, a minor may break a signature; a patch only fixes.
- Land the change on
mainby a pull request, with theCHANGELOG.mdentry. TheGo SDKsteps of theCI (SDKs)workflow (.github/workflows/ci-sdks.yml) checksdks/goalone on Go 1.25, as a consumer gets it. - Check out the commit to tag (
git switch --detach <the main commit>), run the smoke set fromsdks/gowithE2E_REQUIRED=1, as above, and keep its output, so the result is the tagged commit's. Tag the commit that holds the change by its SHA, not whatever
mainis by then. Never create a GitHub Release for it:release.ymlpublishes the Python packages on a release.set -euo pipefail # a failed check below stops before the tag git fetch origin SHA=<the main commit> git merge-base --is-ancestor "$SHA" origin/main # exits 0, else the script stops git tag sdks/go/vX.Y.Z "$SHA" git push origin sdks/go/vX.Y.Zrelease-sdk-go.ymlruns on the tag: it checks the tag is onmain, checks the tagged copy and builds the quickstart in an empty module through proxy.golang.org. By hand, withGOPRIVATEcleared:GOPRIVATE= GONOSUMDB= GOFLAGS=-mod=mod GOPROXY=https://proxy.golang.org \ go list -m -versions github.com/GetStream/Vision-Agents/sdks/go
A version found broken is never moved or deleted: the proxy and the checksum database keep it.
Add retract vX.Y.Z // why to sdks/go/go.mod on main, and release the next patch the
same way; @latest then skips the retracted one.
Reject in review
- A
*WithResponsecall in the README, an example or a docs page where a method exists. - A parameter of a generated client type, or a new accessor for the generated client.
- A retry of an HTTP request without an owner, a bound and a named threat (AGENTS.md).
- A stdlib or language feature newer than the
godirective.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

