primethink-cli 1.4.1__tar.gz → 1.5.0__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.
Files changed (52) hide show
  1. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/DEVELOPER.md +12 -7
  2. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/MANIFEST.in +5 -0
  3. {primethink_cli-1.4.1/primethink_cli.egg-info → primethink_cli-1.5.0}/PKG-INFO +21 -12
  4. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/README.md +15 -11
  5. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/SPECS.md +6 -3
  6. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/USER_GUIDE.md +12 -2
  7. primethink_cli-1.5.0/docs/agent-tools.md +116 -0
  8. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/docs/cli-reference.md +82 -7
  9. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/docs/install.md +14 -0
  10. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/primethink.py +183 -17
  11. primethink_cli-1.5.0/primethink_agent_tools/__init__.py +63 -0
  12. primethink_cli-1.5.0/primethink_agent_tools/client.py +46 -0
  13. primethink_cli-1.5.0/primethink_agent_tools/settings.py +99 -0
  14. primethink_cli-1.5.0/primethink_agent_tools/tools.py +1594 -0
  15. {primethink_cli-1.4.1 → primethink_cli-1.5.0/primethink_cli.egg-info}/PKG-INFO +21 -12
  16. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/primethink_cli.egg-info/SOURCES.txt +10 -0
  17. primethink_cli-1.5.0/primethink_cli.egg-info/entry_points.txt +5 -0
  18. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/primethink_cli.egg-info/requires.txt +6 -0
  19. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/primethink_cli.egg-info/top_level.txt +1 -0
  20. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/primethink_mcp.py +44 -2
  21. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/pyproject.toml +20 -3
  22. primethink_cli-1.5.0/pytest.ini +4 -0
  23. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/skills/primethink-cli/SKILL.md +7 -5
  24. primethink_cli-1.5.0/tests/__init__.py +1 -0
  25. primethink_cli-1.5.0/tests/conftest.py +58 -0
  26. primethink_cli-1.5.0/tests/test_agent_tools.py +795 -0
  27. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_cli.py +1 -1
  28. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_mcp_server.py +51 -1
  29. primethink_cli-1.5.0/tests/test_packaging.py +120 -0
  30. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_project_workflows.py +271 -0
  31. primethink_cli-1.4.1/primethink_cli.egg-info/entry_points.txt +0 -2
  32. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/LICENSE +0 -0
  33. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/docs/primethink_help_llms.txt +0 -0
  34. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/install/homebrew/primethink-cli.rb +0 -0
  35. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/install/install.cmd +0 -0
  36. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/install/install.ps1 +0 -0
  37. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/install/install.sh +0 -0
  38. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/primethink_cli.egg-info/dependency_links.txt +0 -0
  39. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/scripts/build.sh +0 -0
  40. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/scripts/deploy.sh +0 -0
  41. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/scripts/publish.sh +0 -0
  42. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/setup.cfg +0 -0
  43. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/setup.py +0 -0
  44. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/skills/__init__.py +0 -0
  45. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_agent_commands.py +0 -0
  46. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_env_config.py +0 -0
  47. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_install_developer_skill.py +0 -0
  48. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_install_skill.py +0 -0
  49. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_live_app.py +0 -0
  50. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_search_commands.py +0 -0
  51. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_task_commands.py +0 -0
  52. {primethink_cli-1.4.1 → primethink_cli-1.5.0}/tests/test_whoami.py +0 -0
@@ -55,8 +55,8 @@ pip install -e ".[dev]"
55
55
  primethink-cli/
56
56
  ├── primethink.py # Main CLI implementation (single module)
57
57
  ├── primethink_mcp.py # MCP server (pt mcp), reuses primethink.py's helpers; optional [mcp] extra
58
- ├── internal_tools/ # primethink-agent-tools: LangChain tools plugin for PT agents
59
- │ # (own distribution; depends on primethink-cli; reuses its helpers)
58
+ ├── primethink_agent_tools/ # Agent tools plugin: LangChain tools for PT agents; optional [agent-tools] extra
59
+ │ # (entry point primethink.tools; reuses primethink.py's helpers)
60
60
  ├── pyproject.toml # Package configuration (entry point: pt)
61
61
  ├── setup.py # Legacy packaging shim
62
62
  ├── requirements.txt # Runtime dependencies
@@ -85,7 +85,10 @@ primethink-cli/
85
85
  ├── test_task_commands.py # Task command tests
86
86
  ├── test_live_app.py # Safe GitHub template scaffolding tests
87
87
  ├── test_install_developer_skill.py # Recursive public skill installer tests
88
- └── test_install_skill.py # bundled CLI skill installer tests
88
+ ├── test_install_skill.py # bundled CLI skill installer tests
89
+ ├── test_mcp_server.py # MCP server tests (skipped without the mcp SDK)
90
+ ├── test_agent_tools.py # Agent tools plugin tests (skipped without langchain-core)
91
+ └── test_packaging.py # Wheel/entry-point/extras contract (runs on a base install)
89
92
  ```
90
93
 
91
94
  ## Architecture
@@ -142,7 +145,7 @@ def my_command(thing_id, profile, api_url):
142
145
 
143
146
  Security boundaries are enforced before the destination is exposed: HTTPS GitHub repository URLs only, compressed/expanded size and file-count limits, repository-relative manifest paths, path-traversal and duplicate-path checks, symbolic-link rejection, and refusal to touch an existing destination. Tests build in-memory ZIP archives and mock `requests.request`; do not make live GitHub calls in the test suite. The default catalog lives in the separate `primethink-app-templates` repository.
144
147
 
145
- Because this command only creates local source files and does not call the PrimeThink API, it has no MCP or `primethink-agent-tools` equivalent.
148
+ Because this command only creates local source files and does not call the PrimeThink API, it has no MCP or agent-tools equivalent.
146
149
 
147
150
  #### 4. Agent Skill Installation
148
151
 
@@ -185,16 +188,18 @@ Key differences from the CLI, driven by MCP-over-stdio constraints:
185
188
 
186
189
  `mcp` is an optional dependency (the `[mcp]` extra, Python 3.10+); `pt mcp` imports `primethink_mcp` lazily and prints an install hint if the SDK is missing. Tests live in `tests/test_mcp_server.py` and `pytest.importorskip("mcp")` so they skip cleanly where the SDK isn't installed.
187
190
 
188
- #### 7. Agent Tools Plugin (`internal_tools/`)
191
+ #### 7. Agent Tools Plugin (`primethink_agent_tools/`)
189
192
 
190
- `internal_tools/` is a **separate distribution** (`primethink-agent-tools`) that depends on `primethink-cli` and exposes the admin/management API as LangChain tools for PrimeThink agents, discovered via the `primethink.tools` entry point. It reuses the CLI's code rather than re-implementing it:
193
+ `primethink_agent_tools/` ships **inside the `primethink-cli` wheel**, enabled by the optional `[agent-tools]` extra (`langchain-core`, `pydantic`; Python 3.9+). It exposes the admin/management API as LangChain tools for PrimeThink agents, discovered via the `primethink.tools` entry point that `pyproject.toml` declares (`primethink_admin = "primethink_agent_tools:register"`). It reuses the CLI's code rather than re-implementing it:
191
194
 
192
195
  - **Transport reuse without a rewrite.** Tools call `primethink._api_call` (the CLI's `requests` layer) through a small async wrapper (`client.api_json`) that runs it in `asyncio.to_thread` — the agent runtime is async, and `requests` is sync. No httpx dependency; `requests` comes transitively from `primethink-cli`.
193
196
  - **Payload reuse.** Tools import `_clean_payload`, `_TASK_PORTABLE_FIELDS`, `_VERSION_FIELDS`, etc. from `primethink`, so payload shaping matches `pt`/`pt mcp`. Only endpoint path strings are written locally (the accepted trade for not restructuring the CLI).
194
197
  - **Auth.** Per-user token from the `ADMIN_PRIMETHINK_API_TOKEN` setting, resolved via the injected `get_user_setting_value` context (`settings.PrimethinkSettingsProvider`), with a `StaticSettingsProvider` fallback for tests/standalone.
195
198
  - **Scope.** Admin/management only (tasks, agents, chats, collections + collection↔chat assignment). Excludes hot-path search, document byte transfer, messaging/orchestration, and destructive deletes — those stay native.
196
199
 
197
- This directory is **not** part of the `primethink-cli` wheel (the main `pyproject.toml` ships only `primethink`/`primethink_mcp`); it builds and tests independently (`pip install -e ./internal_tools[dev]`, `cd internal_tools && pytest`). When you add or change an API command that belongs in the agent surface, add/update the matching tool in `internal_tools/src/primethink_agent_tools/tools.py` and its test.
200
+ Because the plugin and the private CLI helpers it imports (`_api_call`, `_clean_payload`, `_TASK_PORTABLE_FIELDS`, `_VERSION_FIELDS`) always ship in the same wheel, there is no cross-package version skew to guard against. The base CLI install is unaffected: the entry point is declared, but nothing loads it unless the PrimeThink API calls it, and `register()` imports langchain lazily — and when it is called without the extra, it raises a `ModuleNotFoundError` whose message names `pip install 'primethink-cli[agent-tools]'` (the API logs it and continues without the plugin). The API image installs `primethink-cli[agent-tools]==<version>`; see [`docs/agent-tools.md`](docs/agent-tools.md) for setup.
201
+
202
+ Tests live in `tests/test_agent_tools.py` and `pytest.importorskip("langchain_core")`, so they skip where the extra isn't installed (the `dev` extra installs it); the packaging contract (entry point, `pyproject.toml` packages/extras, RECORD contents of a non-editable install, the `register()` install hint) lives in `tests/test_packaging.py` and needs no extra. When you add or change an API command that belongs in the agent surface, add/update the matching tool in `primethink_agent_tools/tools.py` and its test.
198
203
 
199
204
  ## Adding New Commands
200
205
 
@@ -7,6 +7,11 @@ recursive-include docs *.md *.txt
7
7
  recursive-include install *.sh *.ps1 *.cmd *.rb
8
8
  recursive-include scripts *.sh
9
9
  recursive-include skills *.md
10
+ # setuptools auto-includes tests/test_*.py; add the package marker and shared
11
+ # fixtures the test modules import (`from tests.conftest import ...`), plus the
12
+ # pytest config, so a bare `pytest` inside an unpacked sdist collects `tests/`.
13
+ recursive-include tests *.py
14
+ include pytest.ini
10
15
  # Internal design/spec artifacts live under docs/ but must not ship in the sdist.
11
16
  prune docs/superpowers
12
17
  global-exclude __pycache__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primethink-cli
3
- Version: 1.4.1
3
+ Version: 1.5.0
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
@@ -26,10 +26,15 @@ Requires-Dist: click>=8.0.0
26
26
  Requires-Dist: requests>=2.25.0
27
27
  Provides-Extra: mcp
28
28
  Requires-Dist: mcp<2,>=1.2.0; extra == "mcp"
29
+ Provides-Extra: agent-tools
30
+ Requires-Dist: langchain-core>=0.3.0; extra == "agent-tools"
31
+ Requires-Dist: pydantic>=2.0; extra == "agent-tools"
29
32
  Provides-Extra: dev
30
33
  Requires-Dist: pytest>=7.0.0; extra == "dev"
31
34
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
32
35
  Requires-Dist: mcp<2,>=1.2.0; python_version >= "3.10" and extra == "dev"
36
+ Requires-Dist: langchain-core>=0.3.0; python_version >= "3.10" and extra == "dev"
37
+ Requires-Dist: pydantic>=2.0; python_version >= "3.10" and extra == "dev"
33
38
  Dynamic: license-file
34
39
 
35
40
  # PrimeThink CLI
@@ -79,7 +84,7 @@ pt chat send --agent AGENT_ID --message "your message"
79
84
  | `pt profile remove` | Remove a profile |
80
85
  | `pt chat send` | Send a message to a chat (by ID/mention) or an agent |
81
86
  | `pt chat list` | List chats (paginated, filterable by star/archive/workspace) |
82
- | `pt chat create` | Create a new chat |
87
+ | `pt chat create` | Create a new chat (`--from-task-id` launches a task into it) |
83
88
  | `pt chat rename` | Rename a chat |
84
89
  | `pt chat goal` | Update a chat's goal |
85
90
  | `pt chat type` | Switch a chat between `live-app` and `chat` mode |
@@ -158,7 +163,8 @@ pt chat send --agent AGENT_ID --message "your message"
158
163
  | `pt task delete` | Delete a task (asks for confirmation; `--yes` to skip) |
159
164
  | `pt task duplicate` | Duplicate a task |
160
165
  | `pt task set-public` / `pt task set-private` | Make a task public / private |
161
- | `pt task publish` | Create/update a task from a project directory |
166
+ | `pt task publish` | Create/update a task from a project directory (`--type`, feature toggles, optional `task.json`) |
167
+ | `pt task launch` | Launch a task into a new chat, optionally inside a workspace |
162
168
  | `pt task test` | Sync a task goal into a new or existing chat |
163
169
  | `pt task export` | Export a task's portable config as JSON (for `pt task import`) |
164
170
  | `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
@@ -349,8 +355,12 @@ pt task import tasks/briefing.json --profile production
349
355
 
350
356
  # Publish a conventional task project (GOAL.md required); pass an ID to update
351
357
  pt task publish ./tasks/briefing --virtual-assistant-id 7
358
+ pt task publish ./tasks/briefing --virtual-assistant-id 7 --type group --chat-history --docs-enabled --scheduled-jobs
352
359
  pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
353
360
 
361
+ # Launch a task into a chat (optionally inside a workspace), as the web app does
362
+ pt task launch 99 --workspace-id 738
363
+
354
364
  # Make the resulting task public/private, or test its goal in a chat
355
365
  pt task set-public 99
356
366
  pt task set-private 99
@@ -439,21 +449,20 @@ for the full tool list.
439
449
 
440
450
  ## Agent Tools Plugin
441
451
 
442
- Beyond the CLI and MCP server, this repo also ships **[`primethink-agent-tools`](internal_tools/)**
443
- (under `internal_tools/`) — a plugin that exposes the PrimeThink admin/management
444
- API (tasks, agents, chats, collections) as **LangChain tools for PrimeThink
445
- agents**, reusing the same client code as `pt`. It's a separate distribution that
446
- depends on `primethink-cli`, so the CLI stays lean, and the plugin is installed
447
- only in the agent runtime:
452
+ Beyond the CLI and MCP server, the package also ships the **agent tools plugin**
453
+ (`primethink_agent_tools`) — it exposes the PrimeThink admin/management API
454
+ (tasks, agents, chats, collections) as **LangChain tools for PrimeThink
455
+ agents**, reusing the same client code as `pt`. It's enabled by the optional
456
+ `agent-tools` extra, so plain CLI installs stay lean (no langchain) and the
457
+ plugin is installed only in the agent runtime / API image:
448
458
 
449
459
  ```bash
450
- pip install primethink-cli primethink-agent-tools
460
+ pip install 'primethink-cli[agent-tools]'
451
461
  ```
452
462
 
453
463
  The PrimeThink API discovers it automatically via the `primethink.tools` entry
454
464
  point. Authentication uses a per-user `ADMIN_PRIMETHINK_API_TOKEN` setting. See
455
- [`internal_tools/README.md`](internal_tools/README.md) for the tool list, auth,
456
- and setup.
465
+ [`docs/agent-tools.md`](docs/agent-tools.md) for the tool list, auth, and setup.
457
466
 
458
467
  ## Agent Skills
459
468
 
@@ -45,7 +45,7 @@ pt chat send --agent AGENT_ID --message "your message"
45
45
  | `pt profile remove` | Remove a profile |
46
46
  | `pt chat send` | Send a message to a chat (by ID/mention) or an agent |
47
47
  | `pt chat list` | List chats (paginated, filterable by star/archive/workspace) |
48
- | `pt chat create` | Create a new chat |
48
+ | `pt chat create` | Create a new chat (`--from-task-id` launches a task into it) |
49
49
  | `pt chat rename` | Rename a chat |
50
50
  | `pt chat goal` | Update a chat's goal |
51
51
  | `pt chat type` | Switch a chat between `live-app` and `chat` mode |
@@ -124,7 +124,8 @@ pt chat send --agent AGENT_ID --message "your message"
124
124
  | `pt task delete` | Delete a task (asks for confirmation; `--yes` to skip) |
125
125
  | `pt task duplicate` | Duplicate a task |
126
126
  | `pt task set-public` / `pt task set-private` | Make a task public / private |
127
- | `pt task publish` | Create/update a task from a project directory |
127
+ | `pt task publish` | Create/update a task from a project directory (`--type`, feature toggles, optional `task.json`) |
128
+ | `pt task launch` | Launch a task into a new chat, optionally inside a workspace |
128
129
  | `pt task test` | Sync a task goal into a new or existing chat |
129
130
  | `pt task export` | Export a task's portable config as JSON (for `pt task import`) |
130
131
  | `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
@@ -315,8 +316,12 @@ pt task import tasks/briefing.json --profile production
315
316
 
316
317
  # Publish a conventional task project (GOAL.md required); pass an ID to update
317
318
  pt task publish ./tasks/briefing --virtual-assistant-id 7
319
+ pt task publish ./tasks/briefing --virtual-assistant-id 7 --type group --chat-history --docs-enabled --scheduled-jobs
318
320
  pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
319
321
 
322
+ # Launch a task into a chat (optionally inside a workspace), as the web app does
323
+ pt task launch 99 --workspace-id 738
324
+
320
325
  # Make the resulting task public/private, or test its goal in a chat
321
326
  pt task set-public 99
322
327
  pt task set-private 99
@@ -405,21 +410,20 @@ for the full tool list.
405
410
 
406
411
  ## Agent Tools Plugin
407
412
 
408
- Beyond the CLI and MCP server, this repo also ships **[`primethink-agent-tools`](internal_tools/)**
409
- (under `internal_tools/`) — a plugin that exposes the PrimeThink admin/management
410
- API (tasks, agents, chats, collections) as **LangChain tools for PrimeThink
411
- agents**, reusing the same client code as `pt`. It's a separate distribution that
412
- depends on `primethink-cli`, so the CLI stays lean, and the plugin is installed
413
- only in the agent runtime:
413
+ Beyond the CLI and MCP server, the package also ships the **agent tools plugin**
414
+ (`primethink_agent_tools`) — it exposes the PrimeThink admin/management API
415
+ (tasks, agents, chats, collections) as **LangChain tools for PrimeThink
416
+ agents**, reusing the same client code as `pt`. It's enabled by the optional
417
+ `agent-tools` extra, so plain CLI installs stay lean (no langchain) and the
418
+ plugin is installed only in the agent runtime / API image:
414
419
 
415
420
  ```bash
416
- pip install primethink-cli primethink-agent-tools
421
+ pip install 'primethink-cli[agent-tools]'
417
422
  ```
418
423
 
419
424
  The PrimeThink API discovers it automatically via the `primethink.tools` entry
420
425
  point. Authentication uses a per-user `ADMIN_PRIMETHINK_API_TOKEN` setting. See
421
- [`internal_tools/README.md`](internal_tools/README.md) for the tool list, auth,
422
- and setup.
426
+ [`docs/agent-tools.md`](docs/agent-tools.md) for the tool list, auth, and setup.
423
427
 
424
428
  ## Agent Skills
425
429
 
@@ -38,7 +38,7 @@ To obtain an API key, go to `Settings > API Keys` in the PrimeThink app and gene
38
38
  | `pt chat send CHAT_ID` | `POST /api/v1/chats/{chat_id_or_mention}/messages` |
39
39
  | `pt chat send --agent ID` | `POST /api/v1/virtual-assistants/{agent_id}/messages` |
40
40
  | `pt chat list` | `GET /api/v1/chats` |
41
- | `pt chat create` | `POST /api/v1/chats` |
41
+ | `pt chat create` | `POST /api/v1/chats` (`--from-task-id` adds `?copy_from_task_id=`) |
42
42
  | `pt chat rename` | `PUT /api/v1/chats/{chat_id}/name` |
43
43
  | `pt chat goal` | `PUT /api/v1/chats/{chat_id}/goal` |
44
44
  | `pt chat type` | `PUT /api/v1/chats/{chat_id}/page_type?page_type=html\|chat` |
@@ -114,7 +114,8 @@ To obtain an API key, go to `Settings > API Keys` in the PrimeThink app and gene
114
114
  | `pt task delete` | `DELETE /api/v1/tasks/{task_id}` |
115
115
  | `pt task duplicate` | `POST /api/v1/tasks/{task_id}/duplicate` |
116
116
  | `pt task set-public` / `set-private` | `PATCH /api/v1/tasks/{task_id}/public-status?task_type=public\|private` |
117
- | `pt task publish` | `POST /api/v1/tasks/` or `PATCH /api/v1/tasks/{task_id}` |
117
+ | `pt task publish` | `POST /api/v1/tasks/` or `PATCH /api/v1/tasks/{task_id}` (type/toggles from options or the project's `task.json`) |
118
+ | `pt task launch` | `POST /api/v1/chats?copy_from_task_id={task_id}[&task_version_number=N]` (body: optional `chat_workspace_id`, `name`) |
118
119
  | `pt task test` | `POST /api/v1/chats` (new only), `PUT /api/v1/chats/{chat_id}/page_type` (existing only), `PUT /api/v1/chats/{chat_id}/goal` |
119
120
  | `pt live-app publish` | task create/update + task version + task directory/document/version endpoints |
120
121
  | `pt live-app test` | chat create/page-type/goal + chat directory/document/version endpoints |
@@ -309,11 +310,13 @@ pt chat list [--page N] [--page-size N] [--search TEXT] [--starred/--no-starred]
309
310
 
310
311
  **Body**: JSON object; all fields optional and omitted unless set — `name`, `goal`, `virtual_assistant_id` (int), `chat_workspace_id`, `parent_chat_id` (int), `type` (`standard` | `direct_users`; server default `standard`), `public` (bool), `members` (int array).
311
312
 
313
+ **Query parameters** (task launch): `copy_from_task_id` (int) makes the server copy that task's goal, default agent, settings, documents, collections and scheduled job into the new chat and post its initial prompt — the route the web app uses to open a task; `task_version_number` (int, optional) launches a specific version. A `task_id` in the body is ignored by the server. Exposed as `pt task launch` / `pt chat create --from-task-id` and the `launch_task` MCP tool.
314
+
312
315
  **Success statuses**: 200, 201
313
316
 
314
317
  **CLI Command**:
315
318
  ```bash
316
- pt chat create [--name TEXT] [--goal TEXT | --goal-file PATH] [--virtual-assistant-id ID] [--workspace-id ID] [--parent-chat-id ID] [--type TYPE] [--public/--no-public] [--member USER_ID]...
319
+ pt chat create [--name TEXT] [--goal TEXT | --goal-file PATH] [--virtual-assistant-id ID] [--workspace-id ID] [--parent-chat-id ID] [--type TYPE] [--public/--no-public] [--member USER_ID]... [--from-task-id TASK_ID]
317
320
  ```
318
321
 
319
322
  ---
@@ -77,7 +77,7 @@ pt version
77
77
 
78
78
  You should see output like:
79
79
  ```
80
- PrimeThink CLI v1.3.3
80
+ PrimeThink CLI v1.5.0
81
81
  ```
82
82
 
83
83
  ## Getting Started
@@ -977,8 +977,12 @@ pt task duplicate 99
977
977
 
978
978
  # Publish a conventional task project; GOAL.md is required
979
979
  pt task publish ./tasks/briefing --virtual-assistant-id 7
980
+ pt task publish ./tasks/briefing --virtual-assistant-id 7 --type group --chat-history --docs-enabled --scheduled-jobs
980
981
  pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
981
982
 
983
+ # Launch a task into a new chat, optionally inside a workspace (prints the chat JSON + URL)
984
+ pt task launch 99 --workspace-id 738
985
+
982
986
  # Sync the project goal into a new temporary chat or an existing chat
983
987
  pt task test ./tasks/briefing
984
988
  pt task test ./tasks/briefing --chat-id CHAT_UUID
@@ -994,7 +998,9 @@ pt task delete 99 --yes
994
998
 
995
999
  A project directory can override its folder name with `.name.config`, its description with `.description.config`, and its initial prompt with `INITIAL_PROMPT.md`. For type changes other than public/private (e.g. `group` or `catalog`), use `pt task update 99 --type group`.
996
1000
 
997
- `pt task publish` prints progress lines rather than JSON, ending with `Task ID: 81`. It takes no task-field options — a created task is private and published with the optional features (memory, chat history, search, summary, documents and collections, scheduled jobs, email integration) switched off. Turn them on afterwards with `pt task update`; a later `pt task publish --task-id` only re-syncs name, description, goal, initial prompt, virtual assistant, and page type, so those settings are not overwritten.
1001
+ `pt task publish` prints progress lines rather than JSON, ending with `Task ID: 81`. Task type and feature toggles come from its options (`--type`, `--chat-history`, `--docs-enabled`, `--scheduled-jobs`, `--global-memory`, `--search-in-chat`, `--search-in-documents`, `--summary-enabled`, `--email-integration`, `--share-action`, `--public-chat`, `--run-immediately`), else from an optional `task.json` in the project directory (`{"type": "group", "chat_history": true, "documents_and_collections_enabled": true, "scheduled_jobs_enabled": true}`), else from the conservative defaults: a created task is **private** with memory, chat history, search, summary, documents and collections, scheduled jobs and email integration **switched off** — so a task that relies on its documents or on scheduling must enable them. A later `pt task publish --task-id` re-syncs name, description, goal, initial prompt, virtual assistant and page type plus every type/toggle given on the command line and every accepted field present in `task.json`; settings the project does not state are not overwritten.
1002
+
1003
+ `pt task launch TASK_ID` starts a task the way the web app does when you open one: it creates a chat (inside `--workspace-id` when given) that inherits the task's goal, default agent, settings, documents, collections and scheduled job, posts the task's initial prompt, and prints the chat JSON followed by `Chat URL: …`. `pt chat create --from-task-id TASK_ID` does the same through the generic chat-create command.
998
1004
 
999
1005
  `pt task test` creates a **new** chat unless you pass `--chat-id`, and prints the chat URL as its last line. A test chat is temporary by default; pass `--permanent` when you mean to keep it. To keep re-testing in the same chat, record the ID on the first run:
1000
1006
 
@@ -1827,6 +1833,10 @@ pt mcp
1827
1833
 
1828
1834
  Point your MCP client at `pt mcp` and provide a `PRIMETHINK_TOKEN` in its server env. See the [MCP Server](#mcp-server) section for a full client-config example.
1829
1835
 
1836
+ ### Q: What is the `agent-tools` extra?
1837
+
1838
+ **A**: It enables the plugin that lets PrimeThink **agents** (not you) manage tasks, agents, chats, and collections through the same client code as `pt`. It's installed in the PrimeThink API image by platform operators, not on your machine — a plain `pip install primethink-cli` doesn't need it. See [docs/agent-tools.md](docs/agent-tools.md).
1839
+
1830
1840
  ### Q: How do I uninstall the CLI?
1831
1841
 
1832
1842
  **A**:
@@ -0,0 +1,116 @@
1
+ # Agent tools plugin (`primethink-cli[agent-tools]`)
2
+
3
+ PrimeThink API tools for PrimeThink **agents**, packaged as a discoverable
4
+ plugin. It exposes the admin/management surface of the PrimeThink API — tasks,
5
+ agents, chats, and collections (including collection↔chat assignment) — as
6
+ LangChain tools, **reusing the `primethink-cli` client code** so the tool
7
+ encoding never drifts from `pt` / `pt mcp`.
8
+
9
+ The plugin is the `primethink_agent_tools` package **inside the `primethink-cli`
10
+ distribution**, enabled by the optional **`agent-tools` extra**. A plain
11
+ `pip install primethink-cli` stays lean (no langchain); the extra pulls in
12
+ `langchain-core` and `pydantic` and is installed only where the tools run — the
13
+ agent runtime / API image. One wheel, one version: the plugin and the CLI
14
+ helpers it imports always ship together.
15
+
16
+ ## What it provides
17
+
18
+ A single capability, code **`primethink_admin`**, with 98 tools (every tool
19
+ name is prefixed `primethink_`):
20
+
21
+ - **Tasks** — list, create, update, get, export, import, duplicate, launch, publish/unpublish, create-version, upload-image
22
+ - **Task evaluation** — list/add/update evaluation items, set evaluation settings, run an evaluation, list runs, get a run, get results, run a simulation, list simulations
23
+ - **Agents** — list, get, create, update, list-types, resolve-capabilities, attach/detach collections, list documents
24
+ - **Capabilities** — list, create, update, archive, duplicate; **model catalog** — list models, list embedding models
25
+ - **Chats** — list, create (optionally from a task), rename, set-goal, archive/unarchive, list-messages, list-files, save-as-task
26
+ - **Chat members & users** — list chat users, invite/remove members, list/search visible users
27
+ - **Notifications** — list, unread-count, mark read/unread, mark-all-read
28
+ - **Scheduled jobs** — list, create, update, set-status
29
+ - **Chat workspaces** — list, create, rename, set-goal, archive, pin, add/remove chat
30
+ - **Collections** — list, create, get, update, reindex, copy, list-files, assign-to-chat (bulk), list-chat-collections, remove-from-chat, set-collection-status
31
+ - **Directories & document versions** — create/move/rename directory; list versions, create text version, set production version (chat/collection/task)
32
+ - **Tags** — list, create, assign; **Groups** — list, get, create, update, list members, remove members, invite, add/remove agents
33
+
34
+ ### Deliberately *not* here
35
+
36
+ Semantic search, document byte transfer (upload/download/sync), messaging/
37
+ orchestration, and destructive deletes are **excluded** — those are hot-path,
38
+ large-payload, or already covered by native platform capabilities, and should
39
+ not round-trip through the public API. See the design notes in
40
+ [`DEVELOPER.md`](../DEVELOPER.md).
41
+
42
+ ## Authentication
43
+
44
+ The tools call the PrimeThink API with a **per-user token** read from PrimeThink
45
+ settings under the name **`ADMIN_PRIMETHINK_API_TOKEN`**. When the API injects a
46
+ plugin context providing `get_user_setting_value`, the token is resolved for the
47
+ acting user (`logged_user_id` / `group_id` come from `RunnableConfig`). This is
48
+ the same `${SETTING}` mechanism MCP capabilities use, so both surfaces share one
49
+ auth story.
50
+
51
+ The API base URL comes from the `PRIMETHINK_API_URL` setting or env var, falling
52
+ back to the CLI's default (`https://api.primethink.ai`).
53
+
54
+ ## Install
55
+
56
+ **Requires Python 3.9+** — the base CLI still supports 3.8, but the tool
57
+ signatures use `typing.Annotated` (3.9+) and `langchain-core>=0.3.0` does not
58
+ resolve on 3.8. The `dev` extra installs the plugin's test dependencies only on
59
+ 3.10+, so plugin tests skip on a 3.9 checkout.
60
+
61
+ ```bash
62
+ # In the API image (production): one pinned line in requirements.txt
63
+ primethink-cli[agent-tools]==1.5.0
64
+
65
+ # From a checkout (dev): the dev extra already includes langchain-core
66
+ pip install -e ".[dev]"
67
+ ```
68
+
69
+ **Upgrading a dev environment that had the old standalone plugin** (installed
70
+ with `pip install -e internal_tools` before 1.5.0; it was never published to
71
+ PyPI): uninstall it first — `pip uninstall primethink-agent-tools` — and only
72
+ then install `primethink-cli[agent-tools]`. Both distributions own the same
73
+ `primethink_agent_tools` modules and declare the same `primethink_admin` entry
74
+ point, so leaving both installed yields duplicate registrations, and removing
75
+ the old one afterwards deletes files the new install relies on.
76
+
77
+ The PrimeThink API discovers the plugin at startup via the `primethink.tools`
78
+ entry point declared by `primethink-cli` — no code changes in the API repo.
79
+ Verify discovery:
80
+
81
+ ```bash
82
+ python -c "from importlib.metadata import entry_points; print(list(entry_points().select(group='primethink.tools')))"
83
+ # [EntryPoint(name='primethink_admin', value='primethink_agent_tools:register', group='primethink.tools')]
84
+ ```
85
+
86
+ Then, as a super-admin, convert the registered `primethink_admin` code into a
87
+ capability (`POST /capabilities/from-registered-tool`, type `internal`), assign
88
+ it to an agent, and set `ADMIN_PRIMETHINK_API_TOKEN` for each user who should be
89
+ able to use it. The tools become available in that agent's chats.
90
+
91
+ Installing the base CLI without the extra is harmless: the entry point is
92
+ declared, but nothing loads it unless the PrimeThink API calls it, and
93
+ `register()` imports langchain lazily. If the API *does* call it on an install
94
+ without the extra, `register()` raises a `ModuleNotFoundError` that names the
95
+ fix (`pip install 'primethink-cli[agent-tools]'`); the API logs it under
96
+ "Failed to load tool plugin: primethink_admin" and starts without the plugin.
97
+ The same message appears on Python 3.8 — the wheel installs there because the
98
+ CLI supports 3.8, but the plugin's tool signatures need `typing.Annotated`
99
+ (3.9+) and the extra's `langchain-core` does not resolve on 3.8, so `register()`
100
+ checks the interpreter first rather than failing on an opaque `typing` import.
101
+
102
+ ## Develop / test
103
+
104
+ Tests live in `tests/test_agent_tools.py` and run with the rest of the suite;
105
+ they `pytest.importorskip("langchain_core")` so they skip cleanly where the
106
+ extra isn't installed. The packaging contract (entry point, `pyproject.toml`
107
+ packages/extras, RECORD of a non-editable install, the `register()` install
108
+ hint) is covered by `tests/test_packaging.py`, which needs no extra:
109
+
110
+ ```bash
111
+ pip install -e ".[dev]"
112
+ pytest -q
113
+ ```
114
+
115
+ Tests mock `primethink.requests.request` (the reused transport) exactly like the
116
+ main CLI tests, so no network access is needed.
@@ -1,6 +1,6 @@
1
1
  # PrimeThink CLI — Command Reference
2
2
 
3
- Complete reference for every command in the PrimeThink CLI (`pt`), version 1.3.3.
3
+ Complete reference for every command in the PrimeThink CLI (`pt`), version 1.5.0.
4
4
 
5
5
  Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collection`, `agent`, `task`, `search`, and `image`.
6
6
 
@@ -126,6 +126,7 @@ Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collect
126
126
  - [`pt task set-public`](#pt-task-set-public)
127
127
  - [`pt task set-private`](#pt-task-set-private)
128
128
  - [`pt task publish`](#pt-task-publish)
129
+ - [`pt task launch`](#pt-task-launch)
129
130
  - [`pt task test`](#pt-task-test)
130
131
  - [`pt task export`](#pt-task-export)
131
132
  - [`pt task import`](#pt-task-import)
@@ -220,7 +221,7 @@ Display the CLI version.
220
221
 
221
222
  ```bash
222
223
  pt version
223
- # PrimeThink CLI v1.3.3
224
+ # PrimeThink CLI v1.5.0
224
225
  ```
225
226
 
226
227
  ### `pt whoami`
@@ -650,11 +651,13 @@ pt chat create [OPTIONS]
650
651
  | `--type` | Chat type: `standard` or `direct_users` (server default: `standard`) |
651
652
  | `--public/--no-public` | Make the chat public |
652
653
  | `--member` | User ID to add as a member; repeat the flag for multiple members |
654
+ | `--from-task-id` | Launch this task into the new chat: copies its goal, default agent, settings, documents, collections and scheduled job and posts its initial prompt (sent as the `copy_from_task_id` query parameter; see [`pt task launch`](#pt-task-launch)) |
653
655
 
654
656
  ```bash
655
657
  pt chat create --name "Q3 planning"
656
658
  pt chat create --name "Research" --goal-file ./research-goal.md --virtual-assistant-id 7
657
659
  pt chat create --name "Team room" --member 12 --member 15 --public
660
+ pt chat create --workspace-id 738 --from-task-id 280
658
661
  ```
659
662
 
660
663
  ### `pt chat rename`
@@ -2227,20 +2230,46 @@ pt task set-private TASK_ID [--profile NAME] [--api-url URL]
2227
2230
 
2228
2231
  ### `pt task publish`
2229
2232
 
2230
- Create a private task from a conventional project directory, or synchronize the metadata into an existing task when `--task-id` is passed.
2233
+ Create a task from a conventional project directory, or synchronize the metadata into an existing task when `--task-id` is passed.
2231
2234
 
2232
2235
  ```bash
2233
- pt task publish DIRECTORY --virtual-assistant-id ID [--task-id ID] [--profile NAME] [--api-url URL]
2236
+ pt task publish DIRECTORY --virtual-assistant-id ID [--task-id ID] [--type TYPE] [TOGGLES] [--profile NAME] [--api-url URL]
2234
2237
  ```
2235
2238
 
2236
- `GOAL.md` is required and must not be empty. The task name defaults to the directory name and can be overridden by `.name.config`; the description defaults to the name and can be overridden by `.description.config`; optional `INITIAL_PROMPT.md` supplies the initial prompt. Creation uses the same conservative defaults as the reference workflow (private, published, standard chat, optional features disabled). Updating synchronizes name, description, goal, initial prompt, and virtual assistant without replacing unrelated server fields.
2239
+ `GOAL.md` is required and must not be empty. The task name defaults to the directory name and can be overridden by `.name.config`; the description defaults to the name and can be overridden by `.description.config`; optional `INITIAL_PROMPT.md` supplies the initial prompt.
2240
+
2241
+ | Option | Description |
2242
+ |---|---|
2243
+ | `--task-id` | Update this task instead of creating one |
2244
+ | `--virtual-assistant-id` | Virtual assistant ID (required) |
2245
+ | `--type` | Task type: `private`, `public`, `group`, `system`, `catalog` (default: `private`) |
2246
+ | `--global-memory/--no-global-memory` | Enable global memory |
2247
+ | `--chat-history/--no-chat-history` | Enable chat history |
2248
+ | `--search-in-chat/--no-search-in-chat` | Enable search in chat |
2249
+ | `--search-in-documents/--no-search-in-documents` | Enable search in documents |
2250
+ | `--summary-enabled/--no-summary-enabled` | Enable summary |
2251
+ | `--docs-enabled/--no-docs-enabled` | Enable documents and collections |
2252
+ | `--scheduled-jobs/--no-scheduled-jobs` | Enable scheduled jobs |
2253
+ | `--email-integration/--no-email-integration` | Enable email integration |
2254
+ | `--share-action/--no-share-action` | Enable share action |
2255
+ | `--public-chat/--no-public-chat` | Enable public chat |
2256
+ | `--run-immediately/--no-run-immediately` | Run the goal immediately when the task is launched |
2257
+
2258
+ **Precedence:** an explicit option wins over the project's optional `task.json`, which wins over the conservative defaults. Without either, a created task is `private`, `published`, `standard` chat type, with global memory, chat history, search in chat, search in documents, summary, **documents and collections**, **scheduled jobs**, email integration, share action, and run-immediately all **disabled**, and with empty schedule, extra agents, action name, and mimetypes — so a task that needs its documents, chat history or scheduling must say so (or be fixed afterwards with [`pt task update`](#pt-task-update)).
2259
+
2260
+ `task.json` is a JSON object of task fields using the portable field names of `pt task export`/`pt task import` (e.g. `type`, `chat_history`, `documents_and_collections_enabled`, `scheduled_jobs_enabled`, `global_memory`, `mimetypes`, `extra`). Keys that come from the project files or options (`name`, `description`, `goal`, `initial_prompt`, `page_type`, `virtual_assistant_id`), unknown keys and `null` values are ignored; a file that is not a JSON object is an error. Only `pt task publish` reads `task.json`: `pt live-app publish` ignores it, and it is never uploaded as an app asset (a `task.json` in the project root is skipped by the artifact scan). Payloads carrying `schedule_nl`/`schedule_prompt` use the long request timeout, like `pt task create`/`update`.
2261
+
2262
+ ```json
2263
+ { "type": "group", "chat_history": true, "documents_and_collections_enabled": true, "scheduled_jobs_enabled": true }
2264
+ ```
2237
2265
 
2238
2266
  ```bash
2239
2267
  pt task publish ./tasks/morning-briefing --virtual-assistant-id 7
2268
+ pt task publish ./tasks/morning-briefing --virtual-assistant-id 7 --type group --chat-history --docs-enabled --scheduled-jobs
2240
2269
  pt task publish ./tasks/morning-briefing --task-id 99 --virtual-assistant-id 7
2241
2270
  ```
2242
2271
 
2243
- The command accepts no task-field options. A created task is always `private`, `published`, `standard` chat type, with global memory, chat history, search in chat, search in documents, summary, documents and collections, scheduled jobs, email integration, share action, and run-immediately disabled, and with empty schedule, extra agents, action name, and mimetypes. Use [`pt task update`](#pt-task-update) for anything else; because an update run only PATCHes name, description, goal, initial prompt, virtual assistant, and page type, those settings survive later re-publishing.
2272
+ Updating (`--task-id`) PATCHes name, description, goal, initial prompt, virtual assistant and page type, **plus** every type/toggle set on the command line and **every accepted field present in `task.json`** (not only toggles — e.g. `schedule_nl`, `mimetypes`, `extra`); server fields the project does not state are left alone, so settings changed in the UI survive later re-publishing unless the project now states them.
2244
2273
 
2245
2274
  Output is progress lines, not JSON; the task ID is on the last line.
2246
2275
 
@@ -2266,6 +2295,52 @@ publish command can print its ID line and still exit non-zero, because a fatal f
2266
2295
  failure is reported after the sync summary, so a non-empty ID may still come from a run that
2267
2296
  did not fully succeed.
2268
2297
 
2298
+ ### `pt task launch`
2299
+
2300
+ Launch a task into a new chat — what the web app does when you open a task, optionally inside a chat workspace. The new chat gets the task's goal, default agent, settings, documents, collections and scheduled job, and the task's initial prompt is posted.
2301
+
2302
+ ```bash
2303
+ pt task launch TASK_ID [--workspace-id ID|UUID] [--name NAME] [--version N] [--web-url URL] [--profile NAME] [--api-url URL]
2304
+ ```
2305
+
2306
+ | Option | Description |
2307
+ |---|---|
2308
+ | `--workspace-id` | Chat workspace (ID or UUID) to launch the task into; omit for a top-level chat |
2309
+ | `--name` | Chat name (default: the task name) |
2310
+ | `--version` | Task version number to launch (default: the current task) |
2311
+ | `--web-url` | Web application URL for the printed link (default: derived from the API URL, `api.` → `app.`) |
2312
+
2313
+ ```bash
2314
+ pt task launch 280 --workspace-id 738
2315
+ pt task launch 280 --workspace-id ca74dfc4-eb41-4c3f-ae53-b6b1c415617f --name "Collector (CTO)"
2316
+ ```
2317
+
2318
+ Output is the created chat as JSON (`id`, `uuid`, `task_id`, `default_virtual_assistant_id`, …) followed by a `Chat URL:` line:
2319
+
2320
+ ```text
2321
+ {
2322
+ "id": 50020,
2323
+ "uuid": "132f94b9-…",
2324
+ "task_id": 280,
2325
+ ...
2326
+ }
2327
+ Chat URL: https://app.primethink.ai/chats/132f94b9-…
2328
+ ```
2329
+
2330
+ The same launch is available as [`pt chat create --from-task-id`](#pt-chat-create) and as the `launch_task` MCP tool. Under the hood it is `POST /api/v1/chats?copy_from_task_id=TASK_ID` — the task cannot be passed in the body (the server ignores a body `task_id`). Provisioning example — start a task in every workspace that doesn't have it yet:
2331
+
2332
+ ```bash
2333
+ # Raise --page-size (or loop over --page) if you have more than 100 workspaces / 200 chats per workspace.
2334
+ for ws in $(pt workspace list --page-size 100 | jq -r 'if type == "array" then .[] else .items[] end | .id'); do
2335
+ chats=$(pt chat list --workspace-id "$ws" --page-size 200) || { echo "chat lookup failed for workspace $ws, skipping" >&2; continue; }
2336
+ present=$(printf '%s' "$chats" | jq 'if type == "array" then . else .items end | map(select(.task_id == 280)) | length') || { echo "unexpected chat list for workspace $ws, skipping" >&2; continue; }
2337
+ if [ "$present" = "0" ]; then
2338
+ pt task launch 280 --workspace-id "$ws"
2339
+ fi
2340
+ done
2341
+ ```
2342
+ A lookup or parsing failure skips the workspace instead of launching a duplicate.
2343
+
2269
2344
  ### `pt task test`
2270
2345
 
2271
2346
  Apply a task project's required `GOAL.md` to a newly created chat or an explicit existing chat. Existing chats are switched to normal chat mode.
@@ -2683,7 +2758,7 @@ Core API management commands have tool equivalents; local scaffolding and the pr
2683
2758
  | Directories | `create_directory`, `delete_directory`, `move_directory`, `rename_directory` (each takes `owner_type` = chat/collection/task/agent) |
2684
2759
  | Document versions | `list_document_versions`, `create_document_version`, `create_document_text_version`, `set_production_version`, `delete_document_version` (each takes `owner_type` = chat/collection/task) |
2685
2760
  | Collections | `list_collections`, `create_collection`, `get_collection`, `update_collection`, `reindex_collection`, `copy_collection`, `delete_collection`, `delete_collection_file`, `list_collection_files`, `upload_collection_files`, `upload_collection_text`, `download_collection_file`, `sync_collection_to`, `sync_collection_from` |
2686
- | Tasks | `list_tasks`, `create_task`, `update_task`, `get_task`, `upload_task_text`, `add_task_documents`, `delete_task_documents`, `export_task`, `delete_task`, `duplicate_task`, `publish_task`, `unpublish_task`, `import_task`, `create_task_version`, `upload_task_image` |
2761
+ | Tasks | `list_tasks`, `create_task`, `update_task`, `get_task`, `upload_task_text`, `add_task_documents`, `delete_task_documents`, `export_task`, `delete_task`, `duplicate_task`, `launch_task` (start a task in a new chat, optionally in a workspace — `create_chat` also takes `from_task_id`), `publish_task`, `unpublish_task`, `import_task`, `create_task_version`, `upload_task_image` |
2687
2762
  | Task evaluation | `list_task_evaluations`, `add_task_evaluation`, `update_task_evaluation`, `delete_task_evaluation`, `set_task_evaluation_settings`, `run_task_evaluation`, `list_task_evaluation_runs`, `get_task_evaluation_run`, `get_task_evaluation_results`, `download_task_evaluation_run`, `run_task_simulation`, `list_task_simulations`, `delete_task_simulation` |
2688
2763
  | Agents | `list_agents`, `get_agent`, `create_agent`, `update_agent`, `delete_agent`, `list_agent_types`, `list_agent_documents`, `upload_agent_documents`, `attach_agent_collections`, `detach_agent_collection`, `upload_agent_image`, `delete_agent_image` |
2689
2764
  | Capabilities | `list_capabilities`, `create_capability`, `update_capability`, `delete_capability`, `archive_capability`, `duplicate_capability`, `resolve_capabilities` |
@@ -45,6 +45,19 @@ pip install 'primethink-cli[mcp]'
45
45
 
46
46
  See the [CLI reference](cli-reference.md#mcp-server-pt-mcp) for details.
47
47
 
48
+ #### Optional: agent tools plugin (for the PrimeThink API image)
49
+
50
+ The `agent-tools` extra enables the LangChain tools plugin that PrimeThink
51
+ agents use to manage tasks, agents, chats, and collections. It is meant for the
52
+ agent runtime / API image, not for end users, and pulls in `langchain-core`
53
+ (Python 3.9+):
54
+
55
+ ```bash
56
+ pip install 'primethink-cli[agent-tools]'
57
+ ```
58
+
59
+ See [agent-tools.md](agent-tools.md) for details.
60
+
48
61
  ### Homebrew (macOS & Linux)
49
62
  ```bash
50
63
  # Add our tap (one-time setup)
@@ -70,6 +83,7 @@ pt --help
70
83
 
71
84
  - **Python 3.8+** (required for pip installation)
72
85
  - **Python 3.10+** (only for the optional MCP server, `pip install 'primethink-cli[mcp]'`)
86
+ - **Python 3.9+** (only for the optional agent tools plugin, `pip install 'primethink-cli[agent-tools]'`)
73
87
  - **Homebrew** (only for Homebrew installation)
74
88
 
75
89
  ## Getting Started