---
name: reindeer-external-cli
description: >
  Use the public Reindeer CLI to manage workspaces, agents, runs, cases,
  evaluations, criteria, connectors, artifacts, contexts, functions, extensions,
  notifications, interactions, feedback, changes, changelists, operations, members,
  and service accounts.
  Trigger for Reindeer CLI setup, workspace administration, agent execution,
  connector operations, case investigation, dynamic UI, or public API discovery.
---

# Reindeer CLI

Use the public `reindeer` binary for customer-facing Reindeer operations.

## Operating rules

- Run `reindeer <resource> --help` and `reindeer <resource> <verb> --help` before
  constructing an unfamiliar command. CLI help and the tenant OpenAPI schema are
  authoritative; resource schemas evolve.
- Pass `-w <workspace>` for workspace-scoped resources. Names and IDs are both
  accepted where help says "ID or name."
- Use `-o json` for programmatic output. List responses include pagination
  metadata; follow `next_page_token` when present.
- Prefer full AIP-122 resource names inside JSON bodies, for example
  `workspaces/<workspace>/agents/<agent>/runs/<run>`.
- Treat secret values, OAuth client secrets, and artifact download URLs as
  sensitive. Do not print or persist them unnecessarily.
- Use `--wait` when available. Otherwise poll the returned operation until
  `done` is `true`.

## Install and authenticate

Install on macOS or Linux:

```bash
curl -fsSL https://headless.reindeerlabs.ai/install.sh | bash
reindeer --version
reindeer login
```

Install on Windows:

```powershell
irm https://headless.reindeerlabs.ai/install.ps1 | iex
reindeer --version
reindeer login
```

For service-account authentication, inject `REINDEER_CLIENT_ID` and
`REINDEER_CLIENT_SECRET` into the environment, then run:

```bash
reindeer config set base-url https://api.<tenant>.reindeerlabs.ai --profile automation
reindeer login --service-account --profile automation
reindeer --profile automation -w <workspace> agents list
```

Login saves an expiring access token in the selected CLI profile. It never
stores the client secret. Subsequent commands do not need the credential
variables; run login again after expiry. `logout` removes the saved token.

For a non-interactive agent using a human identity, use both flags and surface
the printed URL to the user:

```bash
reindeer login --headless --no-prompt
```

Target another tenant or saved profile consistently:

```bash
reindeer login --headless --no-prompt \
  --profile demo \
  --base-url https://api.demo.reindeerlabs.ai

reindeer -p demo -b https://api.demo.reindeerlabs.ai -w <workspace> agents list
```

Useful global flags:

| Flag | Purpose |
|---|---|
| `-w, --workspace <name>` | Workspace name or ID |
| `-o, --output json\|table` | Output format |
| `-b, --base-url <url>` | API base URL override |
| `-p, --profile <name>` | Configuration profile |
| `-v, --verbose` | Verbose logging |

Inspect or diagnose local configuration:

```bash
reindeer config list
reindeer config profiles
reindeer doctor
```

## Discover commands and schemas

Start with CLI help:

```bash
reindeer --help
reindeer <resource> --help
reindeer <resource> <verb> --help
```

The public tenant schema is available without authentication:

- OpenAPI: `https://api.<tenant>.reindeerlabs.ai/api/v1/openapi.json`
- Swagger UI: `https://api.<tenant>.reindeerlabs.ai/api/v1/docs`

Use these resource groups:

| Resource | Main verbs |
|---|---|
| `workspaces` | `list`, `get`, `create`, `update`, `delete` |
| `connection-profiles` | `list`, `get`, `create`, `update`, `delete`, `test` |
| `connectors` | `list`, `get`, `create`, `update`, `delete`, `trigger` |
| `artifacts` | `list`, `get`, `create`, `download` |
| `contexts` | CRUD, `versions`, `version`, `new-version` |
| `functions` | CRUD, `versions`, `version`, `push`, `invoke`, `invocations`, `invocation` |
| `agents` | `list`, `get`, `create`, `update`, `delete` |
| `agent-revisions` | `list`, `get` |
| `changes` | `list`, `get` |
| `changelists` | `list`, `get`, `rebuild`, `publish`, `reject` |
| `evaluations` | `list`, `get`, `create` |
| `criteria` | `list`, `get`, `create`, `generate`, `pin`, `activate`, `deactivate` |
| `runs` | `list`, `get`, `create` |
| `steps` | `list`, `get` |
| `cases` | `list`, `get`, `update`, `delete`, `search`, `aggregate`, `history` |
| `interactions` | `inbox`, `list`, `get`, `respond` |
| `feedback` | `case`, `run`, `step`, `change`, `revision`, each with `list`, `get`, `create`, `delete` |
| `extensions` | CRUD, `versions`, `version`, `new-version` |
| `notifications` | `list`, `get`, `create`, `update`, `delete` |
| `secrets` | `list`, `get`, `create`, `update`, `delete` |
| `operations` | `list`, `get` |
| `members` | `list`, `invite`, `update-role`, `remove` |
| `workspace-members` | `list`, `invite`, `update`, `remove` |
| `service-accounts` | CRUD, `rotate-secret` |

## Long-running operations

Mutations and interaction responses may return an operation:

```bash
reindeer operations get <operation-id> -w <workspace> -o json
```

A completed operation has `done: true` and either `result` or `error`. An
operation that creates a run completes before the run itself; then poll
`reindeer runs get`.

## Connection profiles and connectors

Connection profiles hold connector authentication. Use the command-specific
help or OpenAPI schema for the selected `connection_profile_type`.

```bash
reindeer connection-profiles create -w <workspace> --data '{
  "connection_profile_id": "<id>",
  "display_name": "<name>",
  "connection_profile_type": "<type>",
  "config": {}
}'
reindeer connection-profiles test <profile> -w <workspace>
```

Create and trigger an API connector:

```bash
reindeer connectors create -w <workspace> --data '{
  "connector_id": "file-upload",
  "display_name": "File Upload",
  "connector_type": "api",
  "config": {"connector_type":"api","trigger_mode":"per_file"}
}'

reindeer connectors trigger <connector> -w <workspace> --file <path>
```

Pass multiple `--file` flags for multiple files.

## Artifacts

Create a document artifact:

```bash
reindeer artifacts create -w <workspace> --file <path> --data '{
  "artifact_type": "document",
  "unique_key": "<dedup-key>",
  "data": "{\"type\":\"document\",\"filename\":\"<filename>\",\"content_type\":\"<mime>\"}"
}'
```

`data` is a JSON-encoded string, not a nested object. Downloading returns a
short-lived signed URL:

```bash
reindeer artifacts download <artifact-id> -w <workspace> -o json
```

## Contexts and agents

Before writing, restructuring, or reviewing Context artifacts, read
[Writing Effective Context for Reindeer Agents](references/writing-effective-contexts.md).
Use it to separate system-prompt controls, operating policy, schemas, and
reference data; preserve one canonical owner per rule; and review for narrative,
slop, and conflicting rules. For retrieval-only or routine CLI operations, the
commands below are sufficient.

Context entries reference artifacts by full resource name:

```bash
reindeer contexts create -w <workspace> \
  --name <name> \
  --display-name "<display name>" \
  --entries '[{"artifact":"workspaces/<workspace>/artifacts/<artifact-id>","display_name":"<entry>","description":"<description>"}]'

reindeer contexts new-version <context> -w <workspace> \
  --entries '[{"artifact":"workspaces/<workspace>/artifacts/<artifact-id>","display_name":"<entry>","description":"<description>"}]' \
  --change-description "<what changed>"
```

A new context version can trigger compilation of a new agent revision. `--change-description`
(up to 1024 characters) says what changed.

Create an agent with a connector subscription and context:

```bash
reindeer agents create -w <workspace> \
  --name <name> \
  --display-name "<display name>" \
  --subscriptions '{"connector_type":"api","connector":"workspaces/<workspace>/connectors/<connector>","events":[{"type":"api_trigger"}]}' \
  --contexts workspaces/<workspace>/contexts/<context>
```

Pass each subscription as a separate `--subscriptions` value.

## Functions

Workspace Functions are versioned Python handlers compiled by the platform and invoked
under an Agent's scope. Start with the live command help because the Function schema and
supported runtimes evolve:

```bash
reindeer functions --help
reindeer functions push --help
reindeer functions invoke --help
```

Create the Function resource, then compile an immutable version from a local handler.
The handler must define `handler(args, ctx)`:

```bash
reindeer functions create -w <workspace> --data '{
  "function_id": "case-summary",
  "display_name": "Case Summary",
  "description": "Summarize a case for an agent workflow"
}'

reindeer functions push case-summary -w <workspace> \
  --file ./handler.py \
  --schema-file ./input-schema.json \
  --runtime python \
  --binding crm=salesforce \
  --wait
```

`--binding name=type` on `push` declares a ConnectionProfile type. Repeat it for multiple
bindings. Supply exactly one of `--schema` or `--schema-file`.

Invoke the Function under an Agent and bind each declared name to an actual workspace
ConnectionProfile:

```bash
reindeer functions invoke case-summary -w <workspace> \
  --agent <agent> \
  --input '{"case_id":"019a..."}' \
  --binding crm=workspaces/<workspace>/connection-profiles/<profile>
```

Use `--fn-version <number>` to pin an immutable version; otherwise the latest compiled
version is used. Inspect versions and invocation history with:

```bash
reindeer functions versions case-summary -w <workspace>
reindeer functions version case-summary 3 -w <workspace> -o json
reindeer functions invocations case-summary -w <workspace>
reindeer functions invocation case-summary <invocation-id> -w <workspace> -o json
```

## Runs, steps, and cases

Create a run with `--input`. The required `type` is `new_run`,
`previous_run`, or `previous_case`.

```bash
reindeer runs create -w <workspace> --agent <agent> --wait \
  --input '{"type":"new_run","user_input":"<instruction>","artifacts":[]}'
```

Resume a run session:

```bash
reindeer runs create -w <workspace> --agent <agent> --input '{
  "type":"previous_run",
  "previous_run":"workspaces/<workspace>/agents/<agent>/runs/<run>",
  "session":{"session":"resume","user_input":"<follow-up>"}
}'
```

For `previous_run` and `previous_case`, `session` is a nested object. Use
`"session":"new"` for a fresh session linked to the prior input. Poll the run
until its status is no longer `running`.

Inspect related execution data:

```bash
reindeer steps list -w <workspace> --agent <agent> --run-id <run>
reindeer cases list -w <workspace> --agent <agent>
reindeer cases list -w <workspace> --agent <agent> --filter 'created_at >= "2026-10-01T00:00:00Z" AND created_at < "2026-11-01T00:00:00Z"'
reindeer cases search -w <workspace> --agent <agent> --text "<text>"
reindeer cases aggregate -w <workspace> --agent <agent> --dimension state.status
reindeer cases history <case> -w <workspace> --agent <agent>
```

Each `--dimension` produces an independent count breakdown. Omit it for a
summary-only count, or use `--data` for custom measures, joint dimensions,
filters, and time ranges.

Check each case subcommand's help for filters, pagination, and aggregation
options.

## Evaluations

Evaluate a revision against its latest golden dataset, or pass full case
resource names explicitly.

```bash
reindeer evaluations list -w <workspace> --agent <agent>
reindeer evaluations list -w <workspace> --agent <agent> --revision <revision>
reindeer evaluations get -w <workspace> --agent <agent> <evaluation-resource-name>
reindeer evaluations create -w <workspace> --agent <agent> \
  --revision <revision> --wait
reindeer evaluations create -w <workspace> --agent <agent> \
  --revision <revision> \
  --cases workspaces/<workspace>/agents/<agent>/cases/<case-1> \
          workspaces/<workspace>/agents/<agent>/cases/<case-2>
```

`create` always requires `--revision`. For `get`, a full evaluation resource
name carries its revision; with a bare evaluation ID, also pass `--revision`.
Use `get` for per-case scores and the criteria rollup; `list` is a summary.

`criteria_rollup` gives each criterion's results across the evaluation's cases.
To get the full criterion, including its description:

```bash
reindeer criteria get <criterion> -w <workspace> --agent <agent>
```

## Criteria

A criterion is a yes/no question that evaluations ask about each case. Its state
decides whether evaluations use it:

| State | Meaning |
|---|---|
| `active` | Used in evaluations. Reindeer may turn it off when it no longer fits the agent. |
| `pinned` | Always used in evaluations. Reindeer never changes it. |
| `inactive` | Not used in evaluations. |

```bash
reindeer criteria list -w <workspace> --agent <agent> --state active
reindeer criteria create -w <workspace> --agent <agent> \
  --title "Is the invoice number correct?" \
  --description "Passes when it matches the source document." \
  --state pinned
reindeer criteria pin <criterion> -w <workspace> --agent <agent>
reindeer criteria deactivate <criterion> -w <workspace> --agent <agent>
reindeer criteria generate -w <workspace> --agent <agent> --wait
```

A criterion can't be edited: to reword one, create the new wording and
deactivate the old one. Pin a criterion to keep Reindeer from changing it.
`generate` reviews the agent's criteria against its current revision, or the one
`--source-revision` names.

## Changes and changelists

Inspect proposed context edits and the draft revisions built from them. These commands
need an agent scope:

```bash
reindeer changes list -w <workspace> --agent <agent>
reindeer changes get <change-uuid> -w <workspace> --agent <agent> -o json
reindeer changelists list -w <workspace> --agent <agent> --state pending
reindeer changelists get <changelist> -w <workspace> --agent <agent> -o json
```

Both lists support `--page-size` and `--page-token`. Changelist states are `pending`,
`published`, `rejected`, and `closed`. A changelist identifier can be its per-agent
number, UUID, or full resource name.

Rebuild a pending changelist from some of its changes:

```bash
reindeer changelists rebuild <changelist> -w <workspace> --agent <agent> --wait \
  --changes workspaces/<workspace>/agents/<agent>/changes/<change-uuid> \
  --skipped-changes workspaces/<workspace>/agents/<agent>/changes/<other-change-uuid>
```

`--changes` names the changes to build and is required. `--skipped-changes` names the
changes to postpone: they are not built now and come back in the next pending
changelist. Pass several change resource names after either flag. The changelist's
other changes are rejected and not proposed again. A successful rebuild closes this
changelist and the agent's other pending changelists.

```bash
reindeer changelists publish <changelist> -w <workspace> --agent <agent> --wait
reindeer changelists reject <changelist> -w <workspace> --agent <agent> --wait
```

Publishing promotes the draft revision in place. Rejecting rejects every included
change, preventing those changes from being proposed again. Both actions require a
pending changelist; publishing also requires its base context versions to remain
current. Without `--wait`, mutations return an Operation to poll with `operations get`.

## Interactions and feedback

Find pending human-in-the-loop requests and respond:

```bash
reindeer interactions inbox -w <workspace> --agent <agent> --status pending
reindeer interactions respond <interaction> -w <workspace> \
  --agent <agent> --run-id <run> --text "<answer>"
reindeer interactions respond <interaction> -w <workspace> \
  --agent <agent> --run-id <run> --decision allow --note "<optional note>"
```

Use `--selected <label...>` for option labels. A `409` means the interaction
is no longer pending.

Feedback belongs to the case, run, step, change, or revision it is about:

```bash
reindeer feedback case create -w <workspace> --agent <agent> --case-id <case> \
  --sentiment negative --text "<feedback>"
reindeer feedback run list -w <workspace> --agent <agent> --run-id <run>
reindeer feedback step create -w <workspace> --agent <agent> --run-id <run> \
  --step-id <step> --sentiment positive
reindeer feedback change create -w <workspace> --agent <agent> --change <change> \
  --sentiment negative --text "<reason>"
reindeer feedback revision delete <feedback> -w <workspace> --agent <agent> \
  --revision <revision>
```

`--sentiment` is `positive`, `negative`, or `neutral`; `--text` is optional.

To list one kind of feedback across the whole agent, pass `-` as the parent.
For steps, pass `-` as both the run and the step:

```bash
reindeer feedback case list -w <workspace> --agent <agent> --case-id -
reindeer feedback step list -w <workspace> --agent <agent> --run-id - --step-id -
```

## Notifications

Notifications deliver platform events through a connection profile:

```bash
reindeer notifications create -w <workspace> --wait \
  --name run-done \
  --display-name "Run complete" \
  --events run_completion \
  --connection-profile <profile> \
  --scope '{"type":"workspace"}' \
  --enabled true
```

Use `update --enabled false` to pause delivery.

## Extensions and dynamic UI

Extensions are versioned display surfaces. Treat `ExtensionType`,
`ExtensionPayload`, and the dynamic UI component schema in the tenant OpenAPI
document as authoritative.

```bash
reindeer extensions create -w <workspace> --wait \
  --name <name> \
  --type <type> \
  --parent workspaces/<workspace>/agents/<agent> \
  --display-name "<display name>" \
  --payload '{"type":"<type>","view_spec":{}}'

reindeer extensions new-version <extension> -w <workspace> \
  --payload '{"type":"<type>","view_spec":{}}'
```

`update` changes mutable metadata; `new-version` replaces the served payload.

For `display_case_decision` and `display_case_decision_outlook`, render data is
`{case, artifacts: {input}}`. Read case state from `/case/state/...`, read input
artifact references from `/artifacts/input`, and keep editable write paths
relative to `case.state` (for example, read `/case/state/status` but write
`/status`). `DocumentPreview.fieldsPath` must bind to the resolved fields array,
not a plain path string. Do not add a top-level `view_spec.state`.

## Secrets, members, and service accounts

Secret values are write-only:

```bash
reindeer secrets create -w <workspace> \
  --name <name> --description "<description>" --value "<value>"
```

Organization and workspace access. `members` needs an organization role
(`list` needs organization viewer; the rest need organization admin). Workspace
admins manage their workspace with `workspace-members`:

```bash
reindeer members list
reindeer members invite --email <email> --org-role <role>
reindeer workspace-members list -w <workspace>
reindeer workspace-members invite -w <workspace> --email <email> --role <role>
reindeer workspace-members update <member-id> -w <workspace> --role <role>
reindeer workspace-members remove <member-id> -w <workspace>
```

Organization roles (`--org-role`):

- `none`: no organization role; access comes from workspace roles.
- `organization_viewer`: reads everything in every workspace.
- `organization_editor`: builds, runs and configures agents in every workspace,
  creates workspaces and manages service accounts.
- `organization_builder`: a workspace builder in every workspace, plus creating
  workspaces and managing service accounts. Cannot manage members, see usage or
  delete workspaces.
- `organization_admin`: everything an editor can do, plus members, invitations,
  billing, usage, case and workspace deletion and organization configuration.

Workspace roles (`--role`, and the values of `--workspace-roles`):

- `workspace_viewer`: reads everything in the workspace.
- `workspace_operator`: works the cases of the workspace's agents. Updates and
  reruns cases, leaves feedback, answers interactions, starts evaluations,
  invokes functions and uploads artifacts to start runs.
- `workspace_builder`: builds the workspace's agents and their context,
  connectors, connection profiles, functions, extensions, secrets, notifications
  and settings. Cannot manage members or see usage.
- `workspace_editor`: builds, runs and configures agents and their resources.
- `workspace_admin`: everything an editor can do, plus the workspace's members,
  billing, usage and case deletion.

Builders and operators cannot manage members; `members invite` and
`workspace-members update` still need an admin.

Service accounts are organization-scoped OAuth clients:

```bash
reindeer service-accounts create \
  --display-name "<name>" \
  --org-role organization_viewer \
  --workspace-roles '{"<workspace>":"workspace_editor"}'
reindeer service-accounts rotate-secret <service-account>
```

An `organization_builder`, like an `organization_editor`, can create, update and
rotate service accounts, but cannot give one an admin role (`organization_admin`
or `workspace_admin`) or manage one that holds it.

Create and rotate return the client secret once. Capture it securely; list and
get never return it.

## Keep the CLI and skill current

```bash
reindeer upgrade
reindeer install-skill
```

`install-skill` offers detected Claude Code, Codex, and GitHub Copilot
installations, lets the user choose user or project scope, and delegates skill
placement to `gh skill install`. For a non-interactive update, use:

```bash
reindeer install-skill --agent <claude|codex|copilot> --scope user --yes
```
