---
title: "Install the SDK and capture a generation | Grafana Labs"
description: "Install the Agent Observability SDK for your language, create the client with no arguments, and run the manual-capture sample to send your first generation."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Install the SDK and capture a generation

This milestone happens on your machine, in the shell from Milestone 4. Install the SDK, copy the capture sample from your language page, and change only how the client is created so it reads those variables.

1. Run the install command for your language in the shell from Milestone 4.
   
   Expand table
   
   | Language                  | Install command                                                                                                                                                                                                                                                                                                           |
   |---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
   | Python                    | `pip install agento11y`                                                                                                                                                                                                                                                                                                   |
   | TypeScript and JavaScript | `npm install @grafana/agento11y`                                                                                                                                                                                                                                                                                          |
   | Go                        | `go get github.com/grafana/agento11y/go`                                                                                                                                                                                                                                                                                  |
   | Java                      | Add the `com.grafana.agento11y:agento11y-core` Maven dependency. The [Java install snippet](https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/sdks/java/#install-the-sdk) does not state a version, so check Maven Central for the current `agento11y-core` version before you add it. |
   | .NET                      | `dotnet add package Grafana.Agento11y` and `dotnet add package Grafana.Agento11y.OpenAI`                                                                                                                                                                                                                                  |
2. In the following table, click the link for the language you are using and locate the code sample.
   
   Expand table
   
   | Language                  | Section                                                                                                                                                              |
   |---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
   | Python                    | [Capture a generation manually](https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/sdks/python/#capture-a-generation-manually)     |
   | TypeScript and JavaScript | [Capture a generation manually](https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/sdks/javascript/#capture-a-generation-manually) |
   | Go                        | [Capture a generation](https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/sdks/go/#capture-a-generation)                           |
   | Java                      | [Capture a generation](https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/sdks/java/#capture-a-generation)                         |
   | .NET                      | [Capture a generation](https://grafana.com/docs/grafana-cloud/observe-and-act/agent-observability/reference/sdks/dotnet/#capture-a-generation)                       |
3. Copy the code sample into a file you can run.
   
   The Python, TypeScript and JavaScript, and Go samples run as copied. The Java sample is a fragment, so wrap it in a class with a `main` method and add imports for the `com.grafana.agento11y` types it uses. The .NET sample uses an `openAIClient` and `inputItems` it doesn’t define, so create an OpenAI client with your provider key and a list of input items before the `OpenAIRecorder.CreateResponseAsync` call.
4. Change how the client is created so it reads the variables from Milestone 4.
   
   Find the lines that create the client. They include the endpoint. Replace them with the one line for your language in the following table, which is also under **Use environment variables instead** on the same page. Leave every other line as it is, including the shutdown call.
   
   For example, in Python, replace:
   
   Python ![Copy code to clipboard](https://grafana.com/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```python
   client = Client(
       ClientConfig(
           generation_export_endpoint="{AGENTO11Y_ENDPOINT}",
       )
   )
   ```
   
   with:
   
   Python ![Copy code to clipboard](https://grafana.com/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```python
   client = Client()
   ```
   
   The import line and the rest of the sample stay as they are. `ClientConfig` in the import is unused after this change, and leaving it there is fine.
   
   Expand table
   
   | Language                  | Client                                              |
   |---------------------------|-----------------------------------------------------|
   | Python                    | `client = Client()`                                 |
   | TypeScript and JavaScript | `const client = new Agento11yClient();`             |
   | Go                        | `client := agento11y.NewClient(agento11y.Config{})` |
   | Java                      | `Agento11yClient client = new Agento11yClient();`   |
   | .NET                      | `var client = new Agento11yClient();`               |
5. Run the file from the shell where you set the variables.
   
   The Python, TypeScript and JavaScript, Go, and Java samples don’t call an LLM provider, so no provider key is needed. Each records one generation: conversation `conv-1`, model `openai/gpt-4o`, and the assistant message `Hello`.
   
   The .NET sample calls the OpenAI provider helper, so run it with your provider key.

The SDK for your language is installed, and you have captured a generation.
