Set up

Configuring your environment, and installing the SDK

To interact with Lattice using the Lattice SDK, set up your authorization tokens and environment endpoint as system variables, then install the SDK in a language of your choice. Lattice provides the following canonical REST SDKs:

If you want to use the Lattice SDK for gRPC, see Generate the Lattice SDK for gRPC.

Before you begin

  • If you do not have access to Lattice Sandboxes, or an existing Lattice deployment configured by Anduril, request to join the Lattice SDK developer program.

  • If you are using Lattice Sandboxes, complete the steps in Developing with Lattice Sandboxes to create an environment and generate your authorization tokens.

  • If you are using another deployment of Lattice, verify access to Lattice using your environment endpoint. If you can’t access the environment, contact your Anduril representative for help.

Set system variables

1

Add a system variable for your Lattice environment endpoint (hostname only):

$export LATTICE_ENDPOINT=$YOUR_LATTICE_ENDPOINT
2

Add a system variable for your environement bearer token:

$export ENVIRONMENT_TOKEN=$YOUR_ENVIRONMENT_TOKEN
3

If you are using Lattice Sandboxes

Add your Sandboxes token. If you do not have one, create a new token.

$export SANDBOXES_TOKEN=$YOUR_SANDBOXES_TOKEN
4

To verify, run the following command to print the system environment variables to your terminal:

$echo $LATTICE_ENDPOINT
><environment_id>.env.sandboxes.developer.anduril.com

Get the SDK for REST

Lattice provides REST SDK support in the following languages:

1

Download the latest version of Go.

2

Verify your installation:

$go version
3

Install the latest version of the Lattice SDK:

1go get github.com/anduril/lattice-sdk-go/v2
4

Import Lattice and use the client:

1package main
2
3import (
4 "github.com/anduril/lattice-sdk-go/v2/client"
5 "github.com/anduril/lattice-sdk-go/v2/option"
6)
7
8func main() {
9 client := client.NewClient(
10 option.WithToken("LATTICE_TOKEN"),
11 option.WithBaseURL("LATTICE_URL"),
12 )
13
14 client.Entities.GetEntity(
15 context.TODO(),
16 "ENTITY_ID",
17 )
18}

Generate the SDK for gRPC

To generate your own gRPC artifacts, choose a language from the Lattice SDK Buf Schema Registry. For additional information of using the Buf Schema Registry, please refer to their guide

For example, to generate the gRPC client and required server stubs in Go, do the following:

1

Install the latest versions of Go,

2

Create a new folder and initialize your project:

$go mod init lattice-sdk-go-example

This generates a go.mod file in the project directory.

3

Generate the client and server stubs using the grpc/go framework.

$go get buf.build/gen/go/anduril/lattice-sdk/grpc/go@v1.5.1-20250716223851-f58576d79c34.2

This creates a go.sum file in the project directory.

4

Import Lattice and use the client:

1package main
2
3import (
4 "buf.build/gen/go/anduril/lattice-sdk/grpc/go/anduril/entitymanager/v1/entitymanagerv1grpc"
5)
6
7func main() {
8 client := entitymanagerv1grpc.NewEntityManagerAPIClient(conn)
9
10 response, err := client.GetEntity(ctx, &entitymanagerv1.GetEntityRequest{
11 EntityId: "<ENTITY_ID>",
12 })
13}

What’s next?