# Converting your CLI to a native application

It is also possible to compile your Agent SDK application to a native executable.  To get started, you will need to ensure that you have GraalVM installed and configured by downloading the GraalVM at <https://www.graalvm.org/downloads/>. GraalVM 24 is the preferred version.

Once you have GraalVM installed, you need to update your build.xml for your project to mirror the following:

```gradle
plugins {
    id 'java'
    id "io.freefair.lombok" version "8.6"
    id("org.springframework.boot") version "3.5.3"
    id 'org.graalvm.buildtools.native' version '0.10.6'
}
```

You may also want to disable most logging in this mode.  You can do that by adding the following to application.properties:

```properties
logging.level.root = OFF
```

Now, you just need to tell Gradle to build the native image. &#x20;

{% hint style="info" %}
Remember, you need to set GraalVM as your default Java VM first - this includes setting the JAVA\_HOME environment variable!
{% endhint %}

```
./gradlew nativeCompile
```

You'll see some output as it compiles that looks like the following:

```
========================================================================================================================
GraalVM Native Image: Generating 'agent-sdk-sample' (executable)...
========================================================================================================================
For detailed information and explanations on the build output, visit:
https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md
------------------------------------------------------------------------------------------------------------------------
```

After a bit, you'll see it successfully complete and you'll have a native executable!  Now we can run:

```
./build/native/nativeCompile/agent-sdk-sample
```

```
matt@Matthews-MBP-3 nativeCompile % ./agent-sdk-sample

______                _      _             _
| ___ \              | |    | |           (_)
| |_/ /__  ___  _ __ | | ___| | ___   __ _ _  ___
|  __/ _ \/ _ \| '_ \| |/ _ \ |/ _ \ / _` | |/ __|
| | |  __/ (_) | |_) | |  __/ | (_) | (_| | | (__
\_|  \___|\___/| .__/|_|\___|_|\___/ \__, |_|\___|
               | |                    __/ |
               |_|                   |___/

 :: Spring Boot ::                (v3.5.3)
 :: Peoplelogic Agent SDK ::   (v1.0.7.35)
```

That's it!


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.peoplelogic.dev/guides/getting-started-with-the-talent-agent-sdk/advanced/converting-your-cli-to-a-native-application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
