> ## Documentation Index
> Fetch the complete documentation index at: https://studio.chat-atp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Studio CLI

> Use ChatATP Studio from your terminal

The `studio` CLI lets you manage ChatATP Studio resources from a terminal or automation script. It supports formatted output for interactive use and JSON output for shell pipelines.

## Install

### Python

Requires Python 3.10 or newer:

```bash theme={null}
pip install "chatatp-studio[cli]"
```

### JavaScript

Requires Node.js 18 or newer:

```bash theme={null}
npm install --global @chatatp/studio
```

Verify the installation:

```bash theme={null}
studio --version
studio --help
```

Both packages provide the same `studio` command and command structure.

## Sign in

```bash theme={null}
studio auth login
```

For a non-interactive login:

```bash theme={null}
studio auth login \
  --email you@example.com \
  --password 'your-password'
```

Check the active account:

```bash theme={null}
studio auth whoami
```

Sign out when finished:

```bash theme={null}
studio auth logout
```

## Global options

Global options can be used with any command:

| Option            | Purpose                                                    |
| ----------------- | ---------------------------------------------------------- |
| `--json`          | Return machine-readable JSON instead of a formatted table. |
| `--api-url <url>` | Use a different API URL for one command.                   |
| `--version`       | Show the installed CLI version.                            |
| `--help`          | Show help for a command.                                   |

Discover the exact options for any command:

```bash theme={null}
studio agents --help
studio kb documents upload --help
studio memory user create --help
```

## Commands

| Command       | Use it to                                                               |
| ------------- | ----------------------------------------------------------------------- |
| `auth`        | Sign in, sign out, register, and manage your account.                   |
| `config`      | View or change local CLI preferences.                                   |
| `agents`      | Create, configure, list, and preview Agents.                            |
| `assistant`   | Chat with the Studio Copilot and manage sessions.                       |
| `kb`          | Manage Knowledge Bases, documents, URLs, search, and Agent attachments. |
| `memory`      | Manage Agent and per-user memories.                                     |
| `automations` | Manage builder automations and execution runs.                          |
| `schedules`   | Manage conversation schedules and execution runs.                       |
| `mcp`         | Manage MCP servers and connections.                                     |
| `http-api`    | Manage HTTP API tools and connections.                                  |
| `llm`         | Browse providers and manage model configurations.                       |
| `platforms`   | Browse and connect messaging platforms.                                 |
| `teams`       | Manage teams, members, and invitations.                                 |
| `users`       | Manage users and invitations.                                           |

Most resource commands support `list`, `get`, `create`, `update`, and `delete`:

```bash theme={null}
studio agents list
studio agents get 7
studio agents create --data '{"name":"Support Agent"}'
studio agents update 7 --data '{"description":"Answers support questions"}'
studio agents delete 7
```

Use `--data @file.json` when the payload is easier to maintain in a file.

## Knowledge Bases

```bash theme={null}
studio kb list
studio kb create --data '{"name":"Product docs","description":"Support documentation"}'
studio kb documents upload <knowledge-base-id> --file ./manual.pdf
studio kb documents list <knowledge-base-id>
studio kb domains add <knowledge-base-id> --url https://docs.example.com
studio kb stats <knowledge-base-id>
studio kb search <knowledge-base-id> --query "reset password"
studio kb agent attachments attach <agent-id> --kb-id <knowledge-base-id>
studio kb agent attachments detach <agent-id> <knowledge-base-id> --yes
```

Document and website indexing happens in the background. Use `documents list` or `stats` to monitor indexing status.

## Memory

Manage Agent memory:

```bash theme={null}
studio memory list <agent-id>
studio memory create <agent-id> --data '{"title":"Response style","content":"Prefer concise answers","memory_type":"preference"}'
studio memory search <agent-id> --query "response style"
studio memory stats <agent-id>
```

Manage memory associated with a platform user:

```bash theme={null}
studio memory user list <agent-id> --agent-user <agent-user-id>
studio memory user create <agent-id> --data '{"agent_user":"42","title":"Plan","content":"Pro"}'
studio memory user search <agent-id> --agent-user 42 --query "plan"
```

## Automations

```bash theme={null}
studio automations list
studio automations create --data '{"agent":7,"name":"Daily follow-up","prompt_text":"Review unresolved conversations","schedule_type":"daily","schedule_config":{"time":"09:00"}}'
studio automations pause <automation-id>
studio automations resume <automation-id>
studio automations run-now <automation-id>
studio automations runs <automation-id>
studio automations update <automation-id> --data '{"prompt_text":"Review urgent conversations"}'
studio automations delete <automation-id>
```

## Schedules

Schedules run Agent prompts for a specific conversation:

```bash theme={null}
studio schedules list
studio schedules create --data '{"agent":7,"conversation":91,"title":"Renewal reminder","prompt_text":"Remind the user about renewal","schedule_type":"one_time","schedule_config":{"run_at":"2026-10-01T09:00:00Z"}}'
studio schedules pause <schedule-id>
studio schedules resume <schedule-id>
studio schedules run-now <schedule-id>
studio schedules runs <schedule-id>
studio schedules delete <schedule-id>
```

## JSON and scripting

Use `--json` when another command needs to consume the result:

```bash theme={null}
studio --json agents list
studio --json kb list
```

Example workflow with PowerShell:

```powershell theme={null}
$agent = studio --json agents list | ConvertFrom-Json
$agent.data | Select-Object id, name, status
```

Example workflow with `jq`:

```bash theme={null}
studio --json agents list | jq '.data[] | {id, name, status}'
```

## Configuration

The CLI remembers your signed-in account and preferences locally. Use the config commands to inspect or change them:

```bash theme={null}
studio config show
studio config get api_url
studio config set api_url https://your-api.example.com
studio config path
```

For CI or scripts, provide credentials through environment variables instead of storing them interactively:

```bash theme={null}
STUDIO_API_URL=https://your-api.example.com \
STUDIO_TOKEN=your-token \
studio --json agents list
```

Use `studio <command> --help` whenever you need the current arguments or options for an installed command.
