> For the complete documentation index, see [llms.txt](https://k4k3ru.gitbook.io/k4k3ru-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k4k3ru.gitbook.io/k4k3ru-docs/agent.md).

# Agent

K4K3RU Agent is an interactive command-line client for account onboarding and selected K4K3RU operations. It guides you through common tasks without requiring you to construct JSON-RPC requests manually.

Agent is a client of the K4K3RU Gateway API. It is not an autonomous trading agent, does not connect directly to market venues, and does not place orders.

## Requirements

Agent supports:

* macOS on ARM64 or x64
* Linux on ARM64 or x64
* Node.js 18 or later

## Install Agent

Install the npm package globally:

```bash
npm install --global k4k3ru-agent
```

To update an existing installation, run:

```bash
npm install --global k4k3ru-agent@latest
```

## Start Agent

Start the interactive session:

```bash
k4k3ru-agent
```

Type `/` to open command discovery. Use the arrow keys to select a command, then press Tab or Enter to complete it.

Run `/exit` or press Ctrl+C to end the session.

## First-Time Setup

For a new account:

1. Run `/account signup` and complete email one-time password (OTP) verification.
2. Run `/account api-key create` to create an API credential. Agent defaults to the local `whoami@hostname` name, Ed25519, and a 30-day lifetime.
3. Run `/account app usage-balance` to confirm your available usage ticks.
4. Run `/markethub list-symbols` to discover available canonical symbols.
5. Run `/markethub bbo get` to retrieve the consolidated best bid and offer.

If you already have an account on another machine, run `/account signin` before creating or using a locally stored API credential.

## What Agent Can Do

Agent currently supports:

* Email-OTP account sign-up and sign-in
* API credential creation and local credential listing
* Usage-balance and credit-product queries
* Market venue and symbol discovery
* Consolidated BBO and OrderBook snapshots and subscriptions
* Hosted onchain payment-intent creation and status lookup

See the [Command Reference](/k4k3ru-docs/agent/command-reference.md) for the complete released command list.

## Security

Agent stores account context and API credentials under `~/.k4k3ru`. The `auth.json` file contains sensitive signing material.

Do not share, print, or commit `auth.json`. Restrict access to your operating-system account and remove credentials that you no longer intend to use through an approved credential-management workflow when one is available.

## Next Steps

* [Account and API Credentials](/k4k3ru-docs/agent/account.md)
* [Market Data](/k4k3ru-docs/agent/market-data.md)
* [Payments and Usage Credits](/k4k3ru-docs/agent/payments-and-usage.md)
* [Configuration and Local State](/k4k3ru-docs/agent/configuration.md)
* [Command Reference](/k4k3ru-docs/agent/command-reference.md)


---

# 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://k4k3ru.gitbook.io/k4k3ru-docs/agent.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.
