@pi-archimedes/subagent 1.1.0 → 1.2.0

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 (2) hide show
  1. package/README.md +96 -0
  2. package/package.json +4 -3
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # @pi-archimedes/subagent
2
+
3
+ Subagent dispatch with live TUI streaming and cost tracking for the [Pi coding agent](https://github.com/earendil-works/pi).
4
+
5
+ ## Features
6
+
7
+ - **Single & parallel execution** — dispatch one task or fan out multiple tasks across different agents simultaneously
8
+ - **Live TUI streaming** — watch subagent progress in real-time with tool calls, token counts, and cost updates
9
+ - **Agent discovery** — auto-discovers agents from `.pi/agents/*.md` files at project, user, and global scope
10
+ - **Per-agent model override** — each subagent can use its own model, falling back to the parent's selection
11
+ - **Cost tracking** — detailed token usage (input, output, cache read/write) and cost per subagent, emitted through the core bus for the footer to consume
12
+ - **`/agents` command** — full CRUD TUI for managing agent definitions with model picker, tool picker, and cross-scope collision warnings (available via the meta package)
13
+
14
+ ## Screenshots
15
+
16
+ ### Main view — parallel execution
17
+
18
+ Live progress panel showing two parallel subagents with token stats, cost, and recent output:
19
+
20
+ ![subagents main view](../../docs/images/subagents-main-view.png)
21
+
22
+ ### Agent details view
23
+
24
+ Browse and inspect agent configurations — name, model, tools, system prompt, and more:
25
+
26
+ ![subagents agent view](../../docs/images/subagents-agent-view.png)
27
+
28
+ ### Model selection
29
+
30
+ Pick from all available models registered in Pi's model registry:
31
+
32
+ ![subagents model selection](../../docs/images/subagents-model-selection.png)
33
+
34
+ ### Tool selection
35
+
36
+ Toggle which tools are available to an agent from Pi's full toolset:
37
+
38
+ ![subagents tool selection](../../docs/images/subagents-tool-selection.png)
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ pi install @pi-archimedes/subagent
44
+ ```
45
+
46
+ Or install the full [pi-archimedes](../..) meta package for the integrated experience (cost tracking in footer, shared chrome, etc.):
47
+
48
+ ```bash
49
+ pi install pi-archimedes
50
+ ```
51
+
52
+ ## Usage
53
+
54
+ ### As a tool
55
+
56
+ The `subagent` tool accepts either a single `task` or an array of `tasks` for parallel execution:
57
+
58
+ ```jsonc
59
+ {
60
+ "agent": "reviewer", // optional, defaults to "general"
61
+ "task": "review the PR", // single task
62
+ "model": "openrouter/anthropic/claude-4", // optional override
63
+ "cwd": "/path/to/dir" // optional working directory
64
+ }
65
+ ```
66
+
67
+ Parallel mode:
68
+
69
+ ```jsonc
70
+ {
71
+ "tasks": [
72
+ { "agent": "researcher", "task": "find all usages of foo" },
73
+ { "agent": "reviewer", "task": "review the implementation plan" }
74
+ ]
75
+ }
76
+ ```
77
+
78
+ ### As a command
79
+
80
+ Run `/agents` to open the interactive Agents Manager for creating, editing, and deleting agent definitions.
81
+
82
+ ## Agent files
83
+
84
+ Agents are defined as `.md` files with YAML frontmatter, placed in one of:
85
+
86
+ - **Project scope:** `<cwd>/.pi/agents/` — available only in this project
87
+ - **User scope:** `~/.pi/agents/` — available across all projects
88
+ - **Global scope:** installed via packages or extensions
89
+
90
+ Frontmatter supports: `name`, `model`, `tools`, `thinking`, `inheritProjectContext`, `inheritSkills`, `systemPromptMode`, and `systemPrompt`.
91
+
92
+ ## Integration
93
+
94
+ When installed via `pi-archimedes` (the meta package), subagent cost events flow through `@pi-archimedes/core/bus` and are consumed by `@pi-archimedes/footer`'s `CostAccumulator`. This merges subagent tokens and cost into the main status bar for a unified view.
95
+
96
+ The `/agents` command is also only registered by the meta package (not by standalone `@pi-archimedes/subagent`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-archimedes/subagent",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "main": "./src/index.ts",
13
13
  "dependencies": {
14
- "@pi-archimedes/core": "1.1.0"
14
+ "@pi-archimedes/core": "1.2.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@earendil-works/pi-coding-agent": ">=0.1.0",
@@ -26,6 +26,7 @@
26
26
  "pi": {
27
27
  "extensions": [
28
28
  "./src/index.ts"
29
- ]
29
+ ],
30
+ "image": "https://raw.githubusercontent.com/danielcherubini/pi-archimedes/main/docs/images/subagents-main-view.png"
30
31
  }
31
32
  }