Metadata-Version: 2.4
Name: keystone-cli
Version: 0.4.0
Summary: Keystone CLI — build, test, deploy and operate pro-code agents, and manage knowledge bases, prompts, tool credentials and skills on the Keystone platform.
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: keystone-agent-sdk<0.14,>=0.13.20
Requires-Dist: keystone-request-context<0.4,>=0.3
Requires-Dist: typer<1,>=0.12
Requires-Dist: httpx<1,>=0.27
Requires-Dist: truststore<1,>=0.10
Requires-Dist: pytest<9,>=8
Provides-Extra: dev
Requires-Dist: pytest<9,>=8; extra == "dev"
Requires-Dist: pytest-cov<7,>=6; extra == "dev"
Requires-Dist: ruff==0.15.15; extra == "dev"

# keystone-cli

`keystone` is the command-line tool of the Keystone platform. Use it to build, test, deploy and operate
pro-code agents. You can also manage knowledge bases, prompts, tool credentials and skills with it.

The CLI includes the Keystone agent SDK (`keystone-agent-sdk`). An agent project that you create with
the CLI uses that SDK.

## Install

The CLI needs Python 3.12 or later.

```bash
pip install keystone-cli
keystone --version
```

## Get started

1. Log in. The command opens your browser and keeps your session for later commands.

   ```bash
   keystone login
   ```

2. Select the workspace that your commands use.

   ```bash
   keystone workspace use <name>
   ```

3. Create an agent project from a template, then check it.

   ```bash
   keystone agent init my-agent --template llm
   keystone agent validate my-agent
   ```

4. Run the unit tests of the agent on your computer.

   ```bash
   keystone agent test my-agent
   ```

5. Deploy the agent, make the new version Live, and call it.

   ```bash
   keystone agent deploy my-agent --publish --wait
   keystone agent invoke my-agent --input '{"prompt": "hi"}'
   ```

To see the fields of `agent.yaml`, run `keystone agent manifest`. Every command has `--help`.

## Commands

| Command | What it does |
| --- | --- |
| `keystone login`, `keystone whoami` | Log in, and show your user. |
| `keystone workspace` | List and select the workspace that your commands use. |
| `keystone agent` | Develop and test an agent locally (`init`, `validate`, `run`, `test`, `manifest`), ship it (`deploy`, `publish`, `status`, `retire`, `delete`), and operate and debug it (`invoke`, `logs`, `fetch`, `doctor`, `runs`, `hitl`, `traces`, `threads`). |
| `keystone dev` | Run the graph of the agent locally again each time you save a file. |
| `keystone kb` | Create and manage knowledge bases. |
| `keystone prompt` | Manage the prompts of a workspace. |
| `keystone tool-credentials` | Manage the credentials that the catalogue tools of your agents use. |
| `keystone skills` | Install Claude Code skills for work on agents. |
| `keystone version` | Show the CLI version, the target environment and the version of the bundled agent SDK. |

## When a run fails

Start with this command. It shows the steps, the errors and the logs of one run.

```bash
keystone agent runs debug <agent> <run_id>
```
