agent-cost-analyzer 0.0.0-stage → 0.16.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.
- package/LICENSE +21 -0
- package/README.md +75 -2
- package/THIRD-PARTY-NOTICES.md +3510 -0
- package/bin/agent-cost-analyzer.js +22 -0
- package/bin/node-gate.js +41 -0
- package/dist/cli.js +315313 -0
- package/dist/data/learn-scripts/cache-basics.json +163 -0
- package/dist/data/learn-scripts/cache-ttl-1-hour-breakpoint.json +176 -0
- package/dist/data/learn-scripts/cache-ttl-smoke-break.json +190 -0
- package/dist/data/learn-scripts/cascading-model-switch-then-ttl-lapse.json +121 -0
- package/dist/data/learn-scripts/clear.json +133 -0
- package/dist/data/learn-scripts/compaction.json +98 -0
- package/dist/data/learn-scripts/image-attachment-invalidation.json +108 -0
- package/dist/data/learn-scripts/inline-exploration-bloat.json +115 -0
- package/dist/data/learn-scripts/instructions-edit.json +99 -0
- package/dist/data/learn-scripts/mcp-tool-change.json +93 -0
- package/dist/data/learn-scripts/model-switch.json +88 -0
- package/dist/data/learn-scripts/reasoning-budget-toggle.json +98 -0
- package/dist/data/learn-scripts/rewind.json +139 -0
- package/dist/data/learn-scripts/session-forking-multi-branch.json +124 -0
- package/dist/data/learn-scripts/session-forking.json +99 -0
- package/dist/data/learn-scripts/silent-instructions-pullin.json +104 -0
- package/dist/data/learn-scripts/subagent-cheaper-model.json +70 -0
- package/dist/data/learn-scripts/subagent-session.json +70 -0
- package/dist/data/price-book/anthropic-api.json +662 -0
- package/dist/data/price-book/github-copilot.json +1402 -0
- package/dist/data/price-book/google-api.json +507 -0
- package/dist/data/price-book/openai-api.json +1184 -0
- package/dist/data/vendor-profiles/anthropic.json +568 -0
- package/dist/data/vendor-profiles/google.json +190 -0
- package/dist/data/vendor-profiles/microsoft.json +96 -0
- package/dist/data/vendor-profiles/moonshot.json +115 -0
- package/dist/data/vendor-profiles/openai.json +442 -0
- package/dist/data/vendor-profiles/xai.json +217 -0
- package/dist/mcp-apps/views.html +124 -0
- package/dist/web/assets/commit-mono-latin-400-normal-s0S3qwFW.woff +0 -0
- package/dist/web/assets/commit-mono-latin-400-normal-wzhe4RuD.woff2 +0 -0
- package/dist/web/assets/commit-mono-latin-700-normal-1-GU0IUE.woff +0 -0
- package/dist/web/assets/commit-mono-latin-700-normal-DU8mrtj2.woff2 +0 -0
- package/dist/web/assets/index-DeqVluBu.js +76 -0
- package/dist/web/assets/index-EJpifWDV.css +1 -0
- package/dist/web/assets/source-serif-4-latin-400-normal-C1O10bxN.woff +0 -0
- package/dist/web/assets/source-serif-4-latin-400-normal-DJ5YJwmz.woff2 +0 -0
- package/dist/web/assets/source-serif-4-latin-600-normal-DeJomR3S.woff +0 -0
- package/dist/web/assets/source-serif-4-latin-600-normal-DouSKlru.woff2 +0 -0
- package/dist/web/index.html +32 -0
- package/package.json +23 -4
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "subagent-cheaper-model",
|
|
3
|
+
"title": "A Subagent Running a Cheaper Model",
|
|
4
|
+
"category": "Subagents",
|
|
5
|
+
"harnesses": ["vscode-local", "copilot-agent-host", "claude-code"],
|
|
6
|
+
"sessionKind": "subagent",
|
|
7
|
+
"staticPrefix": {
|
|
8
|
+
"toolsTokens": 700,
|
|
9
|
+
"systemTokens": 500
|
|
10
|
+
},
|
|
11
|
+
"steps": [
|
|
12
|
+
{
|
|
13
|
+
"index": 1,
|
|
14
|
+
"userMessage": "(subagent task) Find every call site of the deprecated formatCurrency() helper across the repo.",
|
|
15
|
+
"assistantResponse": "Searching the codebase for all call sites.",
|
|
16
|
+
"toolCalls": [
|
|
17
|
+
{
|
|
18
|
+
"name": "grep_search",
|
|
19
|
+
"argsSummary": "formatCurrency( usages across src/"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"explanation": "This subagent runs on a cheaper, faster model than its parent, a deliberate choice for a narrow, mechanical search task. Like any subagent it has its own isolated context; this first turn writes its own static prefix plus new content.",
|
|
23
|
+
"newContent": {
|
|
24
|
+
"userTokens": 250,
|
|
25
|
+
"toolResultTokens": 500,
|
|
26
|
+
"reasoningTokens": 150,
|
|
27
|
+
"outputTokens": 110
|
|
28
|
+
},
|
|
29
|
+
"events": [
|
|
30
|
+
{
|
|
31
|
+
"type": "model-switch",
|
|
32
|
+
"toRole": "cheaper"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"index": 2,
|
|
38
|
+
"userMessage": "(subagent task, continued) Confirm which call sites pass a currency code and which rely on the default.",
|
|
39
|
+
"assistantResponse": "Checking each call site's arguments.",
|
|
40
|
+
"toolCalls": [
|
|
41
|
+
{
|
|
42
|
+
"name": "read_file",
|
|
43
|
+
"argsSummary": "full contents of the files matched in the previous search"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"explanation": "Normal cache-building turn within the subagent's own session.",
|
|
47
|
+
"newContent": {
|
|
48
|
+
"userTokens": 100,
|
|
49
|
+
"toolResultTokens": 700,
|
|
50
|
+
"reasoningTokens": 120,
|
|
51
|
+
"outputTokens": 90
|
|
52
|
+
},
|
|
53
|
+
"events": []
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"index": 3,
|
|
57
|
+
"userMessage": "(subagent task, continued) Summarize the findings for the parent session.",
|
|
58
|
+
"assistantResponse": "12 call sites found; 9 pass an explicit currency code, 3 rely on the default (which is being removed). Returning a compact summary to the parent.",
|
|
59
|
+
"toolCalls": [],
|
|
60
|
+
"explanation": "Final subagent turn: synthesizes a compact summary that crosses back to the parent. Isolation keeps the exploration out of the parent's cache, and the cheaper model matches the task's real difficulty.",
|
|
61
|
+
"newContent": {
|
|
62
|
+
"userTokens": 50,
|
|
63
|
+
"toolResultTokens": 0,
|
|
64
|
+
"reasoningTokens": 80,
|
|
65
|
+
"outputTokens": 160
|
|
66
|
+
},
|
|
67
|
+
"events": []
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "subagent-session",
|
|
3
|
+
"title": "The Subagent's Own Session",
|
|
4
|
+
"category": "Subagents",
|
|
5
|
+
"harnesses": ["vscode-local", "copilot-agent-host", "claude-code"],
|
|
6
|
+
"sessionKind": "subagent",
|
|
7
|
+
"staticPrefix": {
|
|
8
|
+
"toolsTokens": 500,
|
|
9
|
+
"systemTokens": 700
|
|
10
|
+
},
|
|
11
|
+
"steps": [
|
|
12
|
+
{
|
|
13
|
+
"index": 1,
|
|
14
|
+
"userMessage": "(subagent task) Find the root cause of the bug shown in the parent session's screenshot.",
|
|
15
|
+
"assistantResponse": "Searching the codebase for likely causes.",
|
|
16
|
+
"toolCalls": [
|
|
17
|
+
{
|
|
18
|
+
"name": "grep_search",
|
|
19
|
+
"argsSummary": "error message from the screenshot across src/"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "semantic_search",
|
|
23
|
+
"argsSummary": "related handling code near the failing feature"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"explanation": "The subagent has its own isolated context, separate from the parent session that spawned it. This first turn writes its own prefix plus new content like any session's first turn; nothing from the parent's cache is inherited or paid for again.",
|
|
27
|
+
"newContent": {
|
|
28
|
+
"userTokens": 250,
|
|
29
|
+
"toolResultTokens": 600,
|
|
30
|
+
"reasoningTokens": 180,
|
|
31
|
+
"outputTokens": 120
|
|
32
|
+
},
|
|
33
|
+
"events": []
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"index": 2,
|
|
37
|
+
"userMessage": "(subagent task, continued) Read the matched files in full to confirm the cause.",
|
|
38
|
+
"assistantResponse": "Reading the matched files to confirm before summarizing.",
|
|
39
|
+
"toolCalls": [
|
|
40
|
+
{
|
|
41
|
+
"name": "read_file",
|
|
42
|
+
"argsSummary": "full contents of the files matched in the previous search"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"explanation": "A normal cache-building turn inside the subagent's own session. It reads back what its first turn wrote and adds a large tool-result spike from reading the matched files in full.",
|
|
46
|
+
"newContent": {
|
|
47
|
+
"userTokens": 100,
|
|
48
|
+
"toolResultTokens": 900,
|
|
49
|
+
"reasoningTokens": 150,
|
|
50
|
+
"outputTokens": 90
|
|
51
|
+
},
|
|
52
|
+
"events": []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"index": 3,
|
|
56
|
+
"userMessage": "(subagent task, continued) Summarize the root cause for the parent session.",
|
|
57
|
+
"assistantResponse": "The root cause is a stale cache key in the session handler; returning a compact summary to the parent.",
|
|
58
|
+
"toolCalls": [],
|
|
59
|
+
"explanation": "Final subagent turn: it writes the compact summary that crosses back to the parent session. The subagent's whole trajectory stays isolated from the parent; the parent only ever sees the small summary.",
|
|
60
|
+
"newContent": {
|
|
61
|
+
"userTokens": 50,
|
|
62
|
+
"toolResultTokens": 0,
|
|
63
|
+
"reasoningTokens": 100,
|
|
64
|
+
"outputTokens": 200
|
|
65
|
+
},
|
|
66
|
+
"events": []
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"parentScenarioId": "cache-basics"
|
|
70
|
+
}
|