# CLI and coding agents

> The agnt CLI, and how to build on AGNT from Claude Code, Codex or Cursor.

Part of the AGNT docs. AGNT (https://agnt.ai) is proprietary, application-agnostic infrastructure made by 3Gen Internet Corporation: the agent harness and the services that applications are built on. OpenAssistant (https://openassistant.us) and the OpenAssistant Network are the first, and currently the only, applications built on AGNT; the Network runs on AGNT's SIMON server. It is not affiliated with other projects named AGNT, such as the open-source github.com/agnt-gg/agnt.

Web page: https://agnt.ai/reference/guides/cli. All guides: https://agnt.ai/llms.txt

The `agnt` CLI lets you inspect runs, read evaluations, and manage skills and workflows from a terminal. Every command takes `--profile <name>`, and most take `--json` for machine-readable output, so a coding agent can drive it as easily as a person.

## Install and configure

```bash
npm install -g @agnt-sdk/studio
agnt configure --profile default --api-url https://api.agnt.ai --api-key ak_live_...
```

`configure` writes the profile to `~/.agnt/credentials`, one section per profile, in the same shape as `aws configure --profile`. Commands use `--profile`, then `AGNT_PROFILE`, then `default`.

## Commands

| Command | Description |
|---|---|
| `agnt init` | Create `agnt.config.js` in the current directory (used by the SDK and `pull`) |
| `agnt pull [address]` | Pull prompt manifests: `harborview/weekly-portfolio-briefing` for one, `harborview/*` for all public ones |
| `agnt run list` | Recent tasks and chats. `--since 24h`, `--status`, `--limit`, `--exclude-internal` |
| `agnt run task <taskId>` | The full activity timeline for one task: tool calls, results, status changes, approvals. Paginates; `--all` removes the cap. |
| `agnt run chat <chatId>` | The same for a chat |
| `agnt eval summary` | Run Review averages, outcome buckets and the by-task-type table. `--days` |
| `agnt eval list` | Evaluations, worst first. Filter by `--days` (default 30), `--outcome`, `--sentiment`, `--task-class`, `--min-score` and `--max-score`; page with `--page` and `--limit`. |
| `agnt eval get <reviewId>` | One evaluation in full, with the commands to open its task, chat and trace |
| `agnt skill list \| get \| create \| update` | Manage account skills. `create` defaults to a knowledge skill; `--instructions-file` reads the body from disk. |
| `agnt skill push <file>` | Create or update a skill from a manifest JSON. `--conflict skip\|overwrite\|merge` |
| `agnt skill export <nameOrId>` | Export a skill as a portable manifest that round-trips with `push` |
| `agnt skill publish <nameOrId> --environment live` | Snapshot a version and deploy it to an environment. `--deploy` marks it active. |
| `agnt workflow push <file> \| pull <name> \| list` | Workflow skills as JSON definition files. `push --update` edits in place. |

`agnt eval` requires an account-level API key.

- **Run Review** is the automatic grading of completed runs. Each completed task and chat is scored from the user's side, with an outcome, a sentiment and a task type. `agnt eval` reads those evaluations.
- **Environments** are named deployment targets in your account, such as `dev` and `live`. `agnt skill publish` snapshots a skill version into one environment, and `--deploy` makes that version the one the environment runs.

## Debug a run

The timeline shows every step the assistant took. Find failed runs, then read one in full:

```bash
agnt run list --since 2h --status error
agnt run task 6702c3a9b8c7d6e5f4a3b2c1 > task.txt
grep -nE "approv|pending|status_change" task.txt
```

## Use AGNT from Claude Code, Codex or Cursor

Give the coding agent two things:

1. **The docs index.** [`/llms.txt`](/llms.txt) links every guide and API section as its own Markdown file (any reference page plus `.md`), and [`/llms-full.txt`](/llms-full.txt) holds every guide in one file.
2. **The CLI.** With a profile configured, the agent can list runs, read timelines, and push skills and workflows. `--json` gives it structured output.

Add a block like this to your project's `CLAUDE.md` or `AGENTS.md`:

```markdown
## AGNT
- Docs: https://agnt.ai/llms.txt (read the relevant guide before calling an endpoint)
- API reference: https://agnt.ai/reference/api
- CLI: `agnt` (@agnt-sdk/studio), profile `default` in ~/.agnt/credentials. Prefer `--json`.
- Debug a run: `agnt run task <taskId>`; find runs with `agnt run list --since 24h`.
- Skills and workflows live as JSON in ./agnt/ and deploy with `agnt skill push` and `agnt workflow push --update`.
```

A typical loop: the agent edits `agnt/skills/weekly-portfolio-briefing.json`, runs `agnt skill push` and `agnt skill publish weekly-portfolio-briefing --environment dev`, triggers a test task, reads the result with `agnt run task`, and checks `agnt eval list --days 1` before publishing to `live`.

## See also

- [Quickstart](/reference/guides/quickstart): the API flow the CLI inspects
- [Tasks and approvals](/reference/guides/tasks-and-approvals): workflows and skills of kind workflow
- [Prime: the harness](/reference/guides/prime): what a run does
