> For the complete documentation index, see [llms.txt](https://developer.sahamati.org.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.sahamati.org.in/sahamatinet-agent-sna/integration-guide/sna-library-snalib.md).

# SNA Library (snalib)

Sahamati provides sna libraries to reduce the integration effort with SNA. The snalib-dist directory in the GitHub repository can be used by your AA service to push the api transaction details to the SNA agent. Libraries for Node, Go, dotnet and Java are available, along with example source code and a Java JAR.

### Steps to Integrate

1. Pull the latest main branch from the repository:

<https://github.com/Sahamati/sahamatinet-agent-downloadables>

2. Find the snalib source code, example source, and Java JAR under the following path in the repository: sahamatinet-agent-downloadables/snalib-dist
3. Use the library for your AA service stack:
   * **Node:** `snalib-dist/node/`
   * **Go:** `snalib-dist/go/`
   * **Dotnet:** `snalib-dist/dotnet/`
   * **Java:** `snalib-dist/java/` (source and JAR)
4. Refer to the example source code in the repository to see how to call `sna.dispatch()` at each integration point.

> 📌 SNA is designed to be non-blocking. Metric data is sent asynchronously to the SNA agent to avoid adding latency to your AA service's API response times.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.sahamati.org.in/sahamatinet-agent-sna/integration-guide/sna-library-snalib.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
