> For the complete documentation index, see [llms.txt](https://docs.peoplelogic.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peoplelogic.dev/guides/getting-started-with-the-talent-agent-sdk/agents-in-the-flow-of-work/agent-cli.md).

# 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
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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` 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>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
