# Agent CLI

For many use cases, your agents won't need a full REST API and all the bells and whistles - you may just need a simple command line application.  Run once and done until the next time - or easily setup to run on a scheduled task via AWS.

The SDK provides that functionality out of the box, either as an interactive prompt or accepting parameters when you execute your jar.

### Enabling the CLI&#x20;

The CLI functions as part of a Spring profile.  There are two modes - standard CLI (executes one task and exits) or interactive CLI.  To use the CLI at all (and pre-configure the local database and disable web endpoints, etc) you must activate the `cli` profile.  To interact with your agents through a simple prompt interface, you can enable `cli-interactive`.

To enable it you can either pass the the profiles as a property in `application.properties` as seen below:

```properties
spring.profiles.active=cli,cli-interactive
```

Or you can pass them as a parameter when running your compiled application:

```bash
java -Dspring.profiles.active=cli,cli-interactive -jar ./build/libs/sample-all.jar 
```

### Running your CLI application

Running your agent CLI is as simple as building the bootJar and then running the combined jar from the folder that contains your project:

```
./gradlew bootRun
```

Don't forget that you'll need to set environent variables or have everything contained in your application.properties to run appropriately. &#x20;

You can also just run .`/gradlew bootJar` separately and then run the `java -jar` command like we showed above when activating the CLI.


---

# 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/agents-in-the-flow-of-work/agent-cli.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.
