primethink-cli 1.4.0__tar.gz → 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {primethink_cli-1.4.0/primethink_cli.egg-info → primethink_cli-1.4.1}/PKG-INFO +13 -3
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/README.md +12 -2
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/SPECS.md +28 -2
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/USER_GUIDE.md +148 -12
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/docs/cli-reference.md +211 -12
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/primethink.py +884 -16
- {primethink_cli-1.4.0 → primethink_cli-1.4.1/primethink_cli.egg-info}/PKG-INFO +13 -3
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/primethink_mcp.py +434 -18
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/pyproject.toml +1 -1
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/skills/primethink-cli/SKILL.md +42 -4
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_cli.py +262 -4
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_mcp_server.py +292 -10
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_whoami.py +16 -7
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/DEVELOPER.md +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/LICENSE +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/MANIFEST.in +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/docs/install.md +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/docs/primethink_help_llms.txt +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/install/homebrew/primethink-cli.rb +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/install/install.cmd +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/install/install.ps1 +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/install/install.sh +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/primethink_cli.egg-info/SOURCES.txt +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/primethink_cli.egg-info/dependency_links.txt +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/primethink_cli.egg-info/entry_points.txt +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/primethink_cli.egg-info/requires.txt +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/primethink_cli.egg-info/top_level.txt +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/scripts/build.sh +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/scripts/deploy.sh +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/scripts/publish.sh +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/setup.cfg +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/setup.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/skills/__init__.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_agent_commands.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_env_config.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_install_developer_skill.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_install_skill.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_live_app.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_project_workflows.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_search_commands.py +0 -0
- {primethink_cli-1.4.0 → primethink_cli-1.4.1}/tests/test_task_commands.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: primethink-cli
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.1
|
|
4
4
|
Summary: PrimeThink CLI - A powerful tool for interacting with PrimeThink AI API
|
|
5
5
|
Author-email: PrimeThink <support@primethink.ai>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -66,7 +66,7 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
66
66
|
| Command | Description |
|
|
67
67
|
|---|---|
|
|
68
68
|
| `pt version` | Display the CLI version |
|
|
69
|
-
| `pt whoami` | Show the authenticated user
|
|
69
|
+
| `pt whoami` | Show the authenticated user, their groups, active group, and configured providers |
|
|
70
70
|
| `pt mcp` | Run PrimeThink as an MCP server (exposes the API as tools over stdio) |
|
|
71
71
|
| `pt install-skill` | Install the bundled CLI agent skill for Claude Code and compatible agents |
|
|
72
72
|
| `pt install-developer-skill` | Install the complete public PrimeThink developer skill, including nested resources |
|
|
@@ -127,8 +127,10 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
127
127
|
| `pt agent list-docs` | List documents in an agent's knowledge base |
|
|
128
128
|
| `pt agent upload-docs` | Upload files to an agent's knowledge base |
|
|
129
129
|
| `pt agent attach-collections` / `pt agent detach-collection` | Attach / detach collections for agent RAG |
|
|
130
|
+
| `pt agent upload-image` / `pt agent delete-image` | Upload / delete an agent's image |
|
|
130
131
|
| `pt capability list` / `create` / `update` / `delete` | Manage agent capabilities |
|
|
131
132
|
| `pt capability archive` / `unarchive` / `duplicate` | Archive, unarchive, or duplicate a capability |
|
|
133
|
+
| `pt capability resolve` | Resolve capability codes/ids to ids |
|
|
132
134
|
| `pt models list` / `pt models embeddings` | Discover LLM / embedding models from the catalog |
|
|
133
135
|
| `pt scheduled-job list` / `create` / `update` | Manage scheduled jobs (prompts on a schedule) in a chat |
|
|
134
136
|
| `pt scheduled-job set-status` / `delete` | Pause/resume or delete a scheduled job |
|
|
@@ -141,6 +143,10 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
141
143
|
| `pt tag list` / `create` / `assign` | List, create, and assign tags (task/agent/capability/collection) |
|
|
142
144
|
| `pt group list` / `get` / `create` / `update` / `delete` | Manage groups (organizations) |
|
|
143
145
|
| `pt group members` / `remove-member` / `invite` / `add-agent` | Manage group members, invites, and agents |
|
|
146
|
+
| `pt settings list` / `get` / `set` / `delete` | Manage group/user settings and provider API keys (secrets never shown) |
|
|
147
|
+
| `pt user list` / `search` | Look up users you can see by name or email |
|
|
148
|
+
| `pt notification list` / `unread-count` | List your notifications or count the unread ones |
|
|
149
|
+
| `pt notification mark-read` / `mark-unread` / `mark-all-read` / `delete` | Mark notifications read/unread, mark all read, or delete one |
|
|
144
150
|
| `pt task list` | List tasks, filterable by name/type/status and paginated |
|
|
145
151
|
| `pt task actions` | List available task actions |
|
|
146
152
|
| `pt task execute` | Execute a task action with a message and optional files |
|
|
@@ -158,6 +164,10 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
158
164
|
| `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
|
|
159
165
|
| `pt task create-version` | Snapshot a task's current state as a named version |
|
|
160
166
|
| `pt task upload-image` | Upload an image for a task |
|
|
167
|
+
| `pt eval list` / `add` / `update` / `delete` | Manage a task's evaluation-data set (the test plan) |
|
|
168
|
+
| `pt eval settings` | Configure a task's evaluation settings (schedule, evaluator, thresholds) |
|
|
169
|
+
| `pt eval run` / `runs` / `run-get` / `results` / `download` | Run a task evaluation and inspect its runs and results |
|
|
170
|
+
| `pt eval simulate` / `simulations` / `delete-simulation` | Run and manage agent-vs-agent task simulations |
|
|
161
171
|
| `pt search documents` | Semantic search across documents in a vector store collection |
|
|
162
172
|
| `pt search chat` | Semantic search within a chat |
|
|
163
173
|
| `pt search collection` | Semantic search within a collection |
|
|
@@ -171,7 +181,7 @@ Every command that calls the API also accepts `--profile` (use a specific profil
|
|
|
171
181
|
|
|
172
182
|
`--help` works in either position: `pt chat send --help`, `pt chat --help send`, and `pt --help chat send` all print the same page.
|
|
173
183
|
|
|
174
|
-
> **Tip:** `-p` is the short flag for `--profile` in
|
|
184
|
+
> **Tip:** `-p` is the short flag for `--profile` in most groups (e.g. `pt task`, `pt agent`, `pt search`, `pt settings`, `pt user`, `pt notification`, `pt eval`), `pt image generate`, and `pt whoami`, but in the `pt chat` and `pt collection` groups there is no `-p` for profile — there `-p` means `--path` (a directory inside the chat/collection) on the file commands. Use the long form `--profile` when in doubt.
|
|
175
185
|
|
|
176
186
|
## Configuration
|
|
177
187
|
|
|
@@ -32,7 +32,7 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
32
32
|
| Command | Description |
|
|
33
33
|
|---|---|
|
|
34
34
|
| `pt version` | Display the CLI version |
|
|
35
|
-
| `pt whoami` | Show the authenticated user
|
|
35
|
+
| `pt whoami` | Show the authenticated user, their groups, active group, and configured providers |
|
|
36
36
|
| `pt mcp` | Run PrimeThink as an MCP server (exposes the API as tools over stdio) |
|
|
37
37
|
| `pt install-skill` | Install the bundled CLI agent skill for Claude Code and compatible agents |
|
|
38
38
|
| `pt install-developer-skill` | Install the complete public PrimeThink developer skill, including nested resources |
|
|
@@ -93,8 +93,10 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
93
93
|
| `pt agent list-docs` | List documents in an agent's knowledge base |
|
|
94
94
|
| `pt agent upload-docs` | Upload files to an agent's knowledge base |
|
|
95
95
|
| `pt agent attach-collections` / `pt agent detach-collection` | Attach / detach collections for agent RAG |
|
|
96
|
+
| `pt agent upload-image` / `pt agent delete-image` | Upload / delete an agent's image |
|
|
96
97
|
| `pt capability list` / `create` / `update` / `delete` | Manage agent capabilities |
|
|
97
98
|
| `pt capability archive` / `unarchive` / `duplicate` | Archive, unarchive, or duplicate a capability |
|
|
99
|
+
| `pt capability resolve` | Resolve capability codes/ids to ids |
|
|
98
100
|
| `pt models list` / `pt models embeddings` | Discover LLM / embedding models from the catalog |
|
|
99
101
|
| `pt scheduled-job list` / `create` / `update` | Manage scheduled jobs (prompts on a schedule) in a chat |
|
|
100
102
|
| `pt scheduled-job set-status` / `delete` | Pause/resume or delete a scheduled job |
|
|
@@ -107,6 +109,10 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
107
109
|
| `pt tag list` / `create` / `assign` | List, create, and assign tags (task/agent/capability/collection) |
|
|
108
110
|
| `pt group list` / `get` / `create` / `update` / `delete` | Manage groups (organizations) |
|
|
109
111
|
| `pt group members` / `remove-member` / `invite` / `add-agent` | Manage group members, invites, and agents |
|
|
112
|
+
| `pt settings list` / `get` / `set` / `delete` | Manage group/user settings and provider API keys (secrets never shown) |
|
|
113
|
+
| `pt user list` / `search` | Look up users you can see by name or email |
|
|
114
|
+
| `pt notification list` / `unread-count` | List your notifications or count the unread ones |
|
|
115
|
+
| `pt notification mark-read` / `mark-unread` / `mark-all-read` / `delete` | Mark notifications read/unread, mark all read, or delete one |
|
|
110
116
|
| `pt task list` | List tasks, filterable by name/type/status and paginated |
|
|
111
117
|
| `pt task actions` | List available task actions |
|
|
112
118
|
| `pt task execute` | Execute a task action with a message and optional files |
|
|
@@ -124,6 +130,10 @@ pt chat send --agent AGENT_ID --message "your message"
|
|
|
124
130
|
| `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
|
|
125
131
|
| `pt task create-version` | Snapshot a task's current state as a named version |
|
|
126
132
|
| `pt task upload-image` | Upload an image for a task |
|
|
133
|
+
| `pt eval list` / `add` / `update` / `delete` | Manage a task's evaluation-data set (the test plan) |
|
|
134
|
+
| `pt eval settings` | Configure a task's evaluation settings (schedule, evaluator, thresholds) |
|
|
135
|
+
| `pt eval run` / `runs` / `run-get` / `results` / `download` | Run a task evaluation and inspect its runs and results |
|
|
136
|
+
| `pt eval simulate` / `simulations` / `delete-simulation` | Run and manage agent-vs-agent task simulations |
|
|
127
137
|
| `pt search documents` | Semantic search across documents in a vector store collection |
|
|
128
138
|
| `pt search chat` | Semantic search within a chat |
|
|
129
139
|
| `pt search collection` | Semantic search within a collection |
|
|
@@ -137,7 +147,7 @@ Every command that calls the API also accepts `--profile` (use a specific profil
|
|
|
137
147
|
|
|
138
148
|
`--help` works in either position: `pt chat send --help`, `pt chat --help send`, and `pt --help chat send` all print the same page.
|
|
139
149
|
|
|
140
|
-
> **Tip:** `-p` is the short flag for `--profile` in
|
|
150
|
+
> **Tip:** `-p` is the short flag for `--profile` in most groups (e.g. `pt task`, `pt agent`, `pt search`, `pt settings`, `pt user`, `pt notification`, `pt eval`), `pt image generate`, and `pt whoami`, but in the `pt chat` and `pt collection` groups there is no `-p` for profile — there `-p` means `--path` (a directory inside the chat/collection) on the file commands. Use the long form `--profile` when in doubt.
|
|
141
151
|
|
|
142
152
|
## Configuration
|
|
143
153
|
|
|
@@ -93,12 +93,15 @@ To obtain an API key, go to `Settings > API Keys` in the PrimeThink app and gene
|
|
|
93
93
|
| `pt agent upload-docs` | `POST /api/v1/virtual-assistants/{va_id}/documents` (multipart) |
|
|
94
94
|
| `pt agent attach-collections` | `POST /api/v1/virtual-assistants/{va_id}/collections/attach` |
|
|
95
95
|
| `pt agent detach-collection` | `DELETE /api/v1/virtual-assistants/{va_id}/collections/{collection_id}` |
|
|
96
|
+
| `pt agent upload-image` | `POST /api/v1/virtual-assistants/{va_id}/image` (multipart) |
|
|
97
|
+
| `pt agent delete-image` | `DELETE /api/v1/virtual-assistants/{va_id}/image` |
|
|
96
98
|
| `pt capability list` | `GET /api/v1/virtual-assistants/capabilities` |
|
|
97
99
|
| `pt capability create` | `POST /api/v1/virtual-assistants/capabilities` |
|
|
98
100
|
| `pt capability update` | `PATCH /api/v1/virtual-assistants/capabilities/{capability_id}` |
|
|
99
101
|
| `pt capability delete` | `DELETE /api/v1/virtual-assistants/capabilities/{capability_id}` |
|
|
100
102
|
| `pt capability archive` / `unarchive` | `PUT /api/v1/virtual-assistants/capabilities/{capability_id}/archived?archived=true\|false` |
|
|
101
103
|
| `pt capability duplicate` | `POST /api/v1/virtual-assistants/capabilities/{capability_id}/duplicate` |
|
|
104
|
+
| `pt capability resolve` | resolves capability codes/ids to ids via `GET /api/v1/virtual-assistants/capabilities` |
|
|
102
105
|
| `pt models list` | `GET /api/v1/catalog/llm/models` |
|
|
103
106
|
| `pt models embeddings` | `GET /api/v1/catalog/embeddings/models` |
|
|
104
107
|
| `pt task list` | `GET /api/v1/tasks/` |
|
|
@@ -130,7 +133,7 @@ To obtain an API key, go to `Settings > API Keys` in the PrimeThink app and gene
|
|
|
130
133
|
| `pt voice diarize` | `POST /api/v1/voice/diarize` (multipart `file`[, `speaker_file`]) |
|
|
131
134
|
| `pt voice translate` | `POST /api/v1/voice/translate` (multipart `file`) |
|
|
132
135
|
| `pt video analyze` | `POST /api/v1/video/analyze` (multipart `file`) |
|
|
133
|
-
| `pt whoami` | `GET /api/v1/users/me` + `GET /api/v1/users/me/groups` |
|
|
136
|
+
| `pt whoami` | `GET /api/v1/users/me` + `GET /api/v1/users/me/groups` (response also includes `active_group` and `configured_providers`) |
|
|
134
137
|
| `pt workspace list` | `GET /api/v1/chat-workspaces` |
|
|
135
138
|
| `pt workspace create` | `POST /api/v1/chat-workspaces` |
|
|
136
139
|
| `pt workspace rename` | `PUT /api/v1/chat-workspaces/{id}/name` |
|
|
@@ -152,6 +155,29 @@ To obtain an API key, go to `Settings > API Keys` in the PrimeThink app and gene
|
|
|
152
155
|
| `pt group remove-member` | `DELETE /api/v1/groups/{group_id}/members/` (`[user_ids]`) |
|
|
153
156
|
| `pt group invite` | `POST /api/v1/groups/invite/?email=&role_id=` |
|
|
154
157
|
| `pt group add-agent` / `remove-agent` | `POST /api/v1/groups/{group_id}/add_vas` / `DELETE .../remove_vas` (`[vas_ids]`) |
|
|
158
|
+
| `pt settings list` | `GET /api/v1/groups/current/settings` + `GET /api/v1/users/me/settings` (+ dedicated properties); secret values never shown |
|
|
159
|
+
| `pt settings get` | `GET` the group or user setting for KEY (`--scope group\|user`; sensitive values redacted) |
|
|
160
|
+
| `pt settings set` | routed by KEY to the group/user setting endpoint; provider `*_API_KEY` keys stored as secrets |
|
|
161
|
+
| `pt settings delete` | `DELETE` the KV setting for KEY (`--scope group\|user`; dedicated properties can't be deleted) |
|
|
162
|
+
| `pt user list` / `search` | `GET /api/v1/users/me/visible-users[/full]` (search/limit are client-side) |
|
|
163
|
+
| `pt notification list` | `GET /api/v1/notifications?page=&page_size=` (`--unread-only` is client-side) |
|
|
164
|
+
| `pt notification unread-count` | `GET /api/v1/notifications/unread-count` |
|
|
165
|
+
| `pt notification mark-read` / `mark-unread` | `POST /api/v1/notifications/{notification_id}/mark-as-read` / `.../mark-as-unread` |
|
|
166
|
+
| `pt notification mark-all-read` | `POST /api/v1/notifications/mark-all-as-read` |
|
|
167
|
+
| `pt notification delete` | `DELETE /api/v1/notifications/{notification_id}` |
|
|
168
|
+
| `pt eval list` | `GET /api/v1/tasks/{task_id}/evaluation-data` |
|
|
169
|
+
| `pt eval add` | `POST /api/v1/tasks/{task_id}/evaluation-data` |
|
|
170
|
+
| `pt eval update` | `PATCH /api/v1/tasks/{task_id}/evaluation-data/{eval_id}` |
|
|
171
|
+
| `pt eval delete` | `DELETE /api/v1/tasks/{task_id}/evaluation-data/{eval_id}` |
|
|
172
|
+
| `pt eval settings` | `PATCH /api/v1/tasks/{task_id}/evaluation-settings` |
|
|
173
|
+
| `pt eval run` | `POST /api/v1/tasks/{task_id}/evaluation` |
|
|
174
|
+
| `pt eval runs` | `GET /api/v1/tasks/{task_id}/evaluations/runs/` |
|
|
175
|
+
| `pt eval run-get` | `GET /api/v1/tasks/{task_id}/evaluations/runs/{run_id}` |
|
|
176
|
+
| `pt eval results` | `GET /api/v1/tasks/{task_id}/evaluation_results` |
|
|
177
|
+
| `pt eval download` | `GET /api/v1/tasks/{task_id}/evaluations/runs/{run_id}/download` |
|
|
178
|
+
| `pt eval simulate` | `POST /api/v1/tasks/{task_id}/simulations` |
|
|
179
|
+
| `pt eval simulations` | `GET /api/v1/tasks/{task_id}/simulations` |
|
|
180
|
+
| `pt eval delete-simulation` | `DELETE /api/v1/tasks/{task_id}/simulations/{sim_id}` |
|
|
155
181
|
| `pt {chat,collection,task,agent} mkdir` | `POST /api/v1/{owner}/{id}/directories?path=…` |
|
|
156
182
|
| `pt {chat,collection,task,agent} rmdir` | `DELETE /api/v1/{owner}/{id}/directories/delete` (`{dir_path, delete_recursively}`) |
|
|
157
183
|
| `pt {chat,collection,task,agent} move-dir` | `POST /api/v1/{owner}/{id}/directories/move` (`{src_dir, dest_parent, merge_dirs}`) |
|
|
@@ -827,7 +853,7 @@ pt search messages QUERY --collection-name NAME [--chat-id N] [--user-id N] [--a
|
|
|
827
853
|
|
|
828
854
|
**Endpoints**: `GET /api/v1/users/me` and `GET /api/v1/users/me/groups`
|
|
829
855
|
|
|
830
|
-
The CLI calls both and prints one combined JSON object: `{ "user": { ... }, "groups": [ ... ] }`.
|
|
856
|
+
The CLI calls both and prints one combined JSON object: `{ "user": { ... }, "groups": [ ... ], "active_group": { "id": …, "name": … }, "configured_providers": [ ... ] }`. `active_group` is the user's currently active group; `configured_providers` lists the LLM provider slugs that have an API key set.
|
|
831
857
|
|
|
832
858
|
**CLI Command**:
|
|
833
859
|
```bash
|
|
@@ -17,12 +17,16 @@ For a terse, complete listing of every command and option, see the [CLI Referenc
|
|
|
17
17
|
9. [Semantic Search](#semantic-search)
|
|
18
18
|
10. [Managing Agents](#managing-agents)
|
|
19
19
|
11. [Managing Tasks](#managing-tasks)
|
|
20
|
-
12. [
|
|
21
|
-
13. [
|
|
22
|
-
14. [
|
|
23
|
-
15. [
|
|
24
|
-
16. [
|
|
25
|
-
17. [
|
|
20
|
+
12. [Evaluating Tasks](#evaluating-tasks)
|
|
21
|
+
13. [Managing Settings](#managing-settings)
|
|
22
|
+
14. [Finding Users](#finding-users)
|
|
23
|
+
15. [Notifications](#notifications)
|
|
24
|
+
16. [Scaffolding Live Apps](#scaffolding-live-apps)
|
|
25
|
+
17. [MCP Server](#mcp-server)
|
|
26
|
+
18. [Common Use Cases](#common-use-cases)
|
|
27
|
+
19. [Tips and Tricks](#tips-and-tricks)
|
|
28
|
+
20. [Troubleshooting](#troubleshooting)
|
|
29
|
+
21. [FAQ](#faq)
|
|
26
30
|
|
|
27
31
|
## Introduction
|
|
28
32
|
|
|
@@ -107,7 +111,7 @@ Check who you're authenticated as:
|
|
|
107
111
|
pt whoami
|
|
108
112
|
```
|
|
109
113
|
|
|
110
|
-
This prints your user details and
|
|
114
|
+
This prints your user details, groups, active group, and the LLM providers you have API keys for (`configured_providers`) as JSON — if it succeeds, your token works. It also takes `--profile`, which makes it the quickest way to verify which account each profile points at:
|
|
111
115
|
|
|
112
116
|
```bash
|
|
113
117
|
pt whoami --profile production | jq '.user.email'
|
|
@@ -157,11 +161,11 @@ pt task execute --action summarize --message "Test" --profile custom
|
|
|
157
161
|
|
|
158
162
|
This works on every API command, including the `chat`, `collection`, `agent`, `task`, `search`, `image`, and `whoami` commands.
|
|
159
163
|
|
|
160
|
-
> **Heads-up:** in
|
|
161
|
-
> and `pt whoami`, `-p` is the short flag for
|
|
162
|
-
> `pt collection` groups there is no `-p` for profile —
|
|
163
|
-
> `--path` (a directory inside the chat or collection) on
|
|
164
|
-
> form `--profile` when in doubt.
|
|
164
|
+
> **Heads-up:** in most groups (e.g. `pt task`, `pt agent`, `pt search`, `pt settings`,
|
|
165
|
+
> `pt user`, `pt eval`), `pt image generate`, and `pt whoami`, `-p` is the short flag for
|
|
166
|
+
> `--profile`. In the `pt chat` and `pt collection` groups there is no `-p` for profile —
|
|
167
|
+
> there `-p` is the short flag for `--path` (a directory inside the chat or collection) on
|
|
168
|
+
> the file commands. Use the long form `--profile` when in doubt.
|
|
165
169
|
|
|
166
170
|
#### List All Profiles
|
|
167
171
|
|
|
@@ -1108,6 +1112,138 @@ pt scheduled-job delete 45
|
|
|
1108
1112
|
|
|
1109
1113
|
> Because `--schedule-nl` is interpreted by an LLM server-side, `create`/`update` calls that include it use a longer (120s) timeout — don't treat the wait as a hang.
|
|
1110
1114
|
|
|
1115
|
+
## Evaluating Tasks
|
|
1116
|
+
|
|
1117
|
+
The `pt eval` group tests a task against a set of expected question/answer cases, then scores its actual responses. The typical flow is: **build a plan** (`pt eval add`), **configure how it runs** (`pt eval settings`), **run it** (`pt eval run`), then **read the results** (`pt eval results`). Every command takes the task ID.
|
|
1118
|
+
|
|
1119
|
+
### 1. Build the evaluation plan
|
|
1120
|
+
|
|
1121
|
+
Each test case pairs a user query with the ideal response and a match type — `exact` (exact match), `similar` (fuzzy/semantic match), or `agent` (an evaluator agent judges the answer):
|
|
1122
|
+
|
|
1123
|
+
```bash
|
|
1124
|
+
# See existing cases
|
|
1125
|
+
pt eval list 99
|
|
1126
|
+
|
|
1127
|
+
# Add cases
|
|
1128
|
+
pt eval add 99 --user-query "What's your return window?" --ideal-response "30 days" --type similar
|
|
1129
|
+
pt eval add 99 --user-query "Refund a gift?" --ideal-response "Yes, store credit" --type agent --evaluator-agent-id 7
|
|
1130
|
+
|
|
1131
|
+
# Edit or remove a case (delete is destructive; --yes to skip the prompt)
|
|
1132
|
+
pt eval update 99 EVAL_ID --ideal-response "30 days from delivery"
|
|
1133
|
+
pt eval delete 99 EVAL_ID
|
|
1134
|
+
```
|
|
1135
|
+
|
|
1136
|
+
`--examples '{...}'` attaches good/bad example fields; `--chat-group` (default `1`) groups related cases.
|
|
1137
|
+
|
|
1138
|
+
### 2. Configure how evaluations run
|
|
1139
|
+
|
|
1140
|
+
```bash
|
|
1141
|
+
pt eval settings 99 --active --run-time daily --evaluator-agent-id 7 --pass-threshold 0.8
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
`--run-time` is `manual`, `daily`, `weekly`, or `monthly`; `--pass-threshold` is the minimum score to count as a pass; `--message-delay-ms` throttles messages during a run.
|
|
1145
|
+
|
|
1146
|
+
### 3. Run it, then read the results
|
|
1147
|
+
|
|
1148
|
+
```bash
|
|
1149
|
+
# Run the evaluation (optionally against a specific task version or model)
|
|
1150
|
+
pt eval run 99
|
|
1151
|
+
pt eval run 99 --version 2 --model-override gpt-test
|
|
1152
|
+
|
|
1153
|
+
# Inspect past runs and their results
|
|
1154
|
+
pt eval runs 99
|
|
1155
|
+
pt eval run-get 99 RUN_ID
|
|
1156
|
+
pt eval results 99 --run-id RUN_ID
|
|
1157
|
+
pt eval download 99 RUN_ID -o results.json
|
|
1158
|
+
```
|
|
1159
|
+
|
|
1160
|
+
### Simulations
|
|
1161
|
+
|
|
1162
|
+
Simulations drive the task with a *simulator* agent toward a goal for up to `--max-turns`, then score the transcript:
|
|
1163
|
+
|
|
1164
|
+
```bash
|
|
1165
|
+
pt eval simulate 99 --simulator-agent-id 5 --goal "Get a refund on a gift" --max-turns 10 --evaluator-agent-id 7
|
|
1166
|
+
pt eval simulations 99
|
|
1167
|
+
pt eval delete-simulation 99 SIM_ID # destructive; --yes to skip the prompt
|
|
1168
|
+
```
|
|
1169
|
+
|
|
1170
|
+
## Managing Settings
|
|
1171
|
+
|
|
1172
|
+
The `pt settings` group reads and writes group and user settings, including provider API keys. Settings live at two **scopes** — `group` and `user` — and some keys exist at both. **Secret values are never shown**: listing/getting a setting reports only whether it `is_set` and whether it's `sensitive`, and a sensitive value is redacted on `get`.
|
|
1173
|
+
|
|
1174
|
+
```bash
|
|
1175
|
+
# See what's set (optionally narrow to one scope)
|
|
1176
|
+
pt settings list
|
|
1177
|
+
pt settings list --scope group
|
|
1178
|
+
|
|
1179
|
+
# Read one value (sensitive values come back redacted)
|
|
1180
|
+
pt settings get timezone --scope user
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
### Set a provider API key
|
|
1184
|
+
|
|
1185
|
+
Any `*_API_KEY` key (e.g. `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`) is stored as a secret at group scope. After setting one, `pt whoami` lists that provider under `configured_providers`:
|
|
1186
|
+
|
|
1187
|
+
```bash
|
|
1188
|
+
pt settings set ANTHROPIC_API_KEY sk-ant-… --scope group
|
|
1189
|
+
pt whoami | jq '.configured_providers'
|
|
1190
|
+
```
|
|
1191
|
+
|
|
1192
|
+
### Set the group's default agent, or other settings
|
|
1193
|
+
|
|
1194
|
+
```bash
|
|
1195
|
+
# The group default agent is just a setting
|
|
1196
|
+
pt settings set default_agent 7 --scope group
|
|
1197
|
+
|
|
1198
|
+
# Other known group keys: voice, voice_provider, new_chat_logic, group_mode,
|
|
1199
|
+
# default_role, document_analysis_active, public_name, custom_theme_color
|
|
1200
|
+
# User keys: timezone, location, default_language, default_va, auto_archive_option, custom_theme_color
|
|
1201
|
+
pt settings set timezone "Europe/Rome" --scope user
|
|
1202
|
+
```
|
|
1203
|
+
|
|
1204
|
+
Pass `--scope` explicitly whenever a key exists at both scopes. Delete a key/value setting with `pt settings delete KEY --scope … --yes` (dedicated properties can't be deleted).
|
|
1205
|
+
|
|
1206
|
+
## Finding Users
|
|
1207
|
+
|
|
1208
|
+
The `pt user` group looks up the users you can see, by name or email. The endpoint returns your full visible-users list, so the CLI applies `--search` and `--limit` **client-side**:
|
|
1209
|
+
|
|
1210
|
+
```bash
|
|
1211
|
+
# Everyone you can see
|
|
1212
|
+
pt user list
|
|
1213
|
+
|
|
1214
|
+
# Filter by name/email, cap the count, or get richer records
|
|
1215
|
+
pt user search ann@acme.co
|
|
1216
|
+
pt user list --search support --limit 20
|
|
1217
|
+
pt user list --full
|
|
1218
|
+
```
|
|
1219
|
+
|
|
1220
|
+
This pairs with inviting people to a chat by email — `pt chat invite-members` resolves an `--email` to a user ID via the same visible-users directory:
|
|
1221
|
+
|
|
1222
|
+
```bash
|
|
1223
|
+
pt chat invite-members 123 --email teammate@acme.co
|
|
1224
|
+
```
|
|
1225
|
+
|
|
1226
|
+
## Notifications
|
|
1227
|
+
|
|
1228
|
+
The `pt notification` group reads your notifications and marks them read or unread (sending a notification isn't exposed by the API). `--unread-only` filters the current page **client-side**:
|
|
1229
|
+
|
|
1230
|
+
```bash
|
|
1231
|
+
# List notifications (newest first); page through with --page / --page-size
|
|
1232
|
+
pt notification list
|
|
1233
|
+
pt notification list --unread-only
|
|
1234
|
+
|
|
1235
|
+
# How many are unread?
|
|
1236
|
+
pt notification unread-count
|
|
1237
|
+
|
|
1238
|
+
# Mark one read / unread, or clear them all
|
|
1239
|
+
pt notification mark-read 42
|
|
1240
|
+
pt notification mark-unread 42
|
|
1241
|
+
pt notification mark-all-read
|
|
1242
|
+
|
|
1243
|
+
# Delete one (prompts unless --yes)
|
|
1244
|
+
pt notification delete 42 --yes
|
|
1245
|
+
```
|
|
1246
|
+
|
|
1111
1247
|
## Scaffolding Live Apps
|
|
1112
1248
|
|
|
1113
1249
|
`pt live-app new` initializes a Live App locally from PrimeThink's public template catalog. It does not call the PrimeThink API, so no token or profile is needed. This makes it suitable for coding agents that need a safe, deterministic starting point.
|