Docs/Getting Started/Installation

Installation

Install the NxtOne SDK in your Java, Python, or Node.js application.

NxtOne is an SDK you add to your application as a regular dependency — there is no NxtOne process, container, or daemon to run next to it. The SDK runs inside your service's own process and sends behavioral events straight to the hosted NxtOne platform over HTTPS. Installing it comes down to three things: add the dependency, activate it at startup, and give it your API key.

1. Requirements

RuntimeMinimum versionNotes
JavaJava 17+ (Spring Boot 3.x for the starter)On JDK 21+, add -XX:+EnableDynamicAgentLoading.
PythonPython 3.10+—
Node.jsNode.js 20.6+One package for both TypeScript and JavaScript.

On a read-only root filesystem, the Java and Python SDKs need a writable temp directory: the Java SDK copies its JAR there at startup, and the Python SDK creates a buffer directory there (used only when memory is full or sends fail). The Node.js SDK writes nothing to disk.

2. Installing the SDK

LanguageInstallPackage
Java (Spring Boot)Maven / Gradle dependencyai.nxtone:nxtone-agent-spring-boot-starter
Java (any JVM app)Maven / Gradle dependencyai.nxtone:nxtone-agent
Pythonpip install nxtonenxtone
Node.js (TypeScript / JavaScript)npm install @nxtone/agent@nxtone/agent
NestJS adapternpm install @nxtone/nest@nxtone/nest
Use the coordinates exactly as shown. The Maven group is ai.nxtone, and Node.js has a single package, @nxtone/agent, for both TypeScript and JavaScript. Java versions are published as releases — set nxtone.version to the latest release rather than copying a version number from an example.
Java (Spring Boot)

Add the starter. It attaches the SDK when the application starts, so there is no annotation, no change to main(), and no -javaagent flag.

xml
<dependency> <groupId>ai.nxtone</groupId> <artifactId>nxtone-agent-spring-boot-starter</artifactId> <version>${nxtone.version}</version> </dependency>
gradle
dependencies { // set nxtoneVersion in gradle.properties to the latest release implementation "ai.nxtone:nxtone-agent-spring-boot-starter:${nxtoneVersion}" }
Java (without Spring Boot)

Add the core artifact ai.nxtone:nxtone-agent and call Nxtone.attach() as the first line of main():

java
public static void main(String[] args) { Nxtone.attach(); // must be the first line // ...start your application }

In a shaded uber-JAR, also set NXTONE_AGENT_JAR to the path of the SDK JAR. Loading that JAR with -javaagent also works, but it is optional.

Python
bash
pip install nxtone

Activate the SDK in code by decorating your entry point with @nxtone.NxtOneAgent:

python
import nxtone @nxtone.NxtOneAgent def main(): # start your application here ... if __name__ == "__main__": main()

nxtone.run(main) and @nxtone.instrument are also accepted. There is no python -m nxtone wrapper — the code change is the whole integration. See Python (FastAPI).

Node.js (TypeScript / JavaScript)
bash
npm install @nxtone/agent

Load the SDK before your application with Node's --import flag:

bash
node --import @nxtone/agent/register dist/main.js

Alternatively, call await nxtone.init({ projectId }) (imported from @nxtone/agent) before your server starts listening. NestJS apps also add NxtOneModule.forRoot() from @nxtone/nest — see Node.js (NestJS).

3. API key and project ID

Every SDK reads the same core settings from the environment:

bash
export NXTONE_API_KEY="<your-api-key>" export NXTONE_PROJECT_ID="payment-service"
VariableRequiredDescription
NXTONE_API_KEYYesYour API key from the NxtOne dashboard. Without it the SDK does nothing and your service runs unobserved — it never fails your app.
NXTONE_PROJECT_IDRecommendedGroups execution flows in the UI. Set it explicitly per service — the default is not service-specific (unknown on Java and Node.js, the project folder name on Python).
NXTONE_EXCLUDENoPackages or paths to leave uninstrumented. See Filtering.

Each runtime can also read a config file: Spring Boot nxtone.* properties or nxtone.properties for Java, nxtone.toml (under an [nxtone] table) for Python, and nxtone.properties for Node.js. See Environment Variables for the full reference.

4. Verifying the installation

Start your service as usual and check its stderr. The SDK logs there, so its lines appear wherever your application's logs go:

RuntimeWhat to look for
Javanxtone: agent attached (pid=…), then nxtone: application ready — capture window open
Node.jsNXTONE_SESSION_ID=…
PythonLittle or nothing — the SDK logs at warn level by default (NXTONE_LOG_LEVEL).
AnyA hint that the API key is missing means the SDK is running as a no-op — check the environment the process actually received.

Then send a request to your service: its execution flow appears in NxtOne under the project ID you set. If nothing shows up, work through Troubleshooting.

5. Network access

The SDK only makes outbound connections; it opens no ports. Allow HTTPS (443) from your services to the NxtOne API (api.nxtone.ai for Java, www.api.nxtone.ai for Python and Node.js) and to Amazon S3, which the SDK uses for large values.