Go SDK
The Go client for the Agent-Fabric control-plane API — net/http-based, typed models,
generated from the OpenAPI spec so it never drifts from the server.
New here? Start with the SDKs overview for the auth model and base URLs.
Install
Section titled “Install”import agentfabric "github.com/falcons-eyes/agentfabric-go/agentfabric" // then: go mod tidyAuthenticate and make a call
Section titled “Authenticate and make a call”NewConfiguration() defaults Servers[0] to https://api.falconoon.com. Pass the bearer
token (prod: your Cognito OIDC access token · dev: dev:<workspace>) via the request
context. Each resource is a service on the client; calls use a request-builder + Execute().
import ( "context" "fmt"
agentfabric "github.com/falcons-eyes/agentfabric-go/agentfabric")
cfg := agentfabric.NewConfiguration()client := agentfabric.NewAPIClient(cfg)ctx := context.WithValue(context.Background(), agentfabric.ContextAccessToken, "dev:acme")
// list your networksnets, _, err := client.NetworksAPI.GetApiNetworks(ctx).Execute()if err != nil { panic(err)}for _, nw := range nets { fmt.Println(nw.GetID(), nw.GetName(), nw.GetCIDR())}
// create onenw, _, err := client.NetworksAPI.PostApiNetworks(ctx). CreateNetworkRequest(agentfabric.CreateNetworkRequest{Name: "prod"}).Execute()if err != nil { panic(err)}fmt.Println("created", nw.GetID())- Typed models with
GetX()accessors.Networkuses PascalCase wire keys, so it’snw.GetID(),nw.GetCIDR()— see the casing note in the overview. Execute()returns(value, *http.Response, error); checkerrand, if you need it, the raw response for the status code.
The full endpoint + model surface is the HTTP API reference. Regenerate
from the spec with make sdk-go.