@piagent/platform 1.2.5 → 1.2.7

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 (53) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +3 -2
  3. package/catalog/capabilities.json +4 -4
  4. package/docs/command-reference-vietnamese.md +9 -8
  5. package/docs/context-engine.md +177 -0
  6. package/docs/context-window-policy.md +13 -8
  7. package/docs/distribution-standard.md +7 -7
  8. package/docs/operator-manual-vietnamese.md +7 -7
  9. package/docs/publishing-for-teams.md +5 -0
  10. package/docs/quality-benchmark.md +14 -1
  11. package/docs/release-install-policy.md +7 -7
  12. package/docs/runtime-harness-standard.md +16 -7
  13. package/docs/security-threat-model.md +1 -1
  14. package/docs/subagents-and-multiagent.md +1 -1
  15. package/docs/task-lifecycle-vietnamese.md +4 -4
  16. package/docs/team-onboarding.md +2 -2
  17. package/docs/usage-observability.md +6 -0
  18. package/docs-site/architecture.html +4 -3
  19. package/docs-site/commands.html +2 -1
  20. package/docs-site/content/context-engine.html +47 -0
  21. package/docs-site/context-engine.html +171 -0
  22. package/docs-site/index.html +2 -1
  23. package/docs-site/mcp-approval.html +2 -1
  24. package/docs-site/mcp-auth.html +2 -1
  25. package/docs-site/mcp-servers.html +2 -1
  26. package/docs-site/mcp.html +2 -1
  27. package/docs-site/permissions.html +2 -1
  28. package/docs-site/profiles.html +2 -1
  29. package/docs-site/quickstart.html +2 -1
  30. package/docs-site/runtime.html +4 -3
  31. package/docs-site/scope.html +2 -1
  32. package/docs-site/security.html +2 -1
  33. package/docs-site/team.html +2 -1
  34. package/docs-site/workflows.html +2 -1
  35. package/package.json +3 -2
  36. package/packages/piagent-core/README.md +8 -2
  37. package/packages/piagent-core/capabilities/capability-core.js +4 -0
  38. package/packages/piagent-core/extensions/context-engine.js +1175 -0
  39. package/packages/piagent-core/extensions/piagent-guard.ts +785 -17
  40. package/packages/piagent-core/package.json +1 -1
  41. package/packages/piagent-core/policies/base-policy.json +2 -0
  42. package/packages/piagent-core/prompts/scout.md +10 -24
  43. package/packages/piagent-core/prompts/task.md +25 -45
  44. package/scripts/audit-runtime-host.sh +3 -3
  45. package/scripts/build-docs-site.mjs +6 -0
  46. package/scripts/check-runtime-advisories.mjs +4 -3
  47. package/scripts/context-engine.mjs +115 -0
  48. package/scripts/install-global.sh +68 -13
  49. package/scripts/piagent-cli.mjs +2 -1
  50. package/scripts/quality-benchmark.sh +71 -1
  51. package/scripts/setup.sh +5 -3
  52. package/scripts/team-doctor.sh +2 -2
  53. package/scripts/verify-local.sh +12 -4
@@ -21,7 +21,7 @@ This document covers the packaged guard, project profiles, capability locks, ins
21
21
  - The operator, operating-system account, Pi host, and explicitly trusted project repository are trusted to execute code.
22
22
  - Project-local Pi resources are loaded only after Pi project trust or an explicit operator override.
23
23
  - A human remains available to approve destructive and external-provider actions.
24
- - Supported release verification covers macOS Apple Silicon + Bash, Linux x64 + Bash, Node.js `>=22.19.0`, and the exact Pi host version declared by the release. macOS Intel + Bash and Linux ARM64 + Bash are supported targets that need local smoke verification before broad rollout. Native Windows is not a team-rollout target for v1.2.5, and WSL2 is experimental/unverified.
24
+ - Supported release verification covers macOS Apple Silicon + Bash, Linux x64 + Bash, Node.js `>=22.19.0`, and the exact Pi host version declared by the release. macOS Intel + Bash and Linux ARM64 + Bash are supported targets that need local smoke verification before broad rollout. Native Windows is not a team-rollout target for v1.2.7, and WSL2 is experimental/unverified.
25
25
  - Registry, GitHub, model-provider, MCP-provider, and Vercel controls are external dependencies. Their account security and platform guarantees are not replaced by this repository.
26
26
 
27
27
  ## Threat actors and failure modes
@@ -48,7 +48,7 @@ Nếu chỉ cài global:
48
48
 
49
49
  ```bash
50
50
  pi install git:github.com/Vt-mmm/piagent
51
- pi install npm:pi-subagents@0.35.1
51
+ pi install npm:pi-subagents@0.38.0
52
52
  bash /path/to/piagent/scripts/configure-subagents.sh --preset safe
53
53
  ```
54
54
 
@@ -21,7 +21,7 @@ Harness cung cấp:
21
21
  - `piagent_document_read` — đọc spec `.md`/`.pdf`/`.docx` từ project hoặc folder đã cấp trong `additionalReadRoots` (ví dụ `~/Downloads`). Nội dung trả về là **dữ liệu**, không phải chỉ thị.
22
22
  - Context7 qua MCP cho tài liệu vendor. Ghi snapshot ngắn bằng `piagent_profile_tech_context_record`, không paste nguyên khối doc vào file project.
23
23
 
24
- Ràng buộc: `piagent_context_preflight` chạy **trước** (`task.md` bước 0). Nếu nó trả `fresh-session` thì dừng nạp context ở session này.
24
+ Ràng buộc: `/workflow task` chạy `piagent_context_preflight` một lần trước khi nạp context. Với `/workflow scout`, preflight chỉ bắt buộc cho scout rộng, cross-module hoặc high-risk. Nếu nó trả `fresh-session` thì dừng nạp context ở session này.
25
25
 
26
26
  ### 2. Plan — biến hiểu biết thành cam kết kiểm được
27
27
 
@@ -39,7 +39,7 @@ Ràng buộc: `piagent_context_preflight` chạy **trước** (`task.md` bước
39
39
 
40
40
  `workPlan[].mode` là `read-only` \| `single-writer` \| `review`. Mặc định là single-writer: chỉ một tác nhân được ghi, trừ khi người dùng yêu cầu rõ parallel writers.
41
41
 
42
- `piagent_orchestration_policy` quyết định có gọi subagent không. Chính sách là solo-first — subagent chỉ dùng khi việc đó độc lập và nặng phần đọc.
42
+ `piagent_orchestration_policy` chỉ cần gọi khi task có khả năng hưởng lợi từ delegation. Chính sách là solo-first — subagent chỉ dùng khi việc đó độc lập và nặng phần đọc. Lane `tiny` dùng work plan hai bước parent-only: implement và verify.
43
43
 
44
44
  ### 3. Execute — làm trong hàng rào
45
45
 
@@ -72,7 +72,7 @@ Thiếu bất kỳ điều nào thì bằng chứng vẫn được ghi, nhưng c
72
72
 
73
73
  Nghĩa là `true`, `echo ok`, `npm test || true` không mua được chữ "done". Đó là chủ ý: một cổng có thể lách được thì tệ hơn không có cổng, vì nó vẫn hiện màu xanh.
74
74
 
75
- `piagent_task_gate_check` trả `pass` hoặc `fail` kèm danh sách `missing`. `task.md` bước 16: gate fail thì outcome là `blocked`/`partial`, **không phải** `done`.
75
+ `piagent_task_gate_check` trả `pass` hoặc `fail` kèm danh sách `missing`. Gate fail thì outcome là `blocked`/`partial`, **không phải** `done`.
76
76
 
77
77
  ### 5. Fail → loop lại
78
78
 
@@ -93,7 +93,7 @@ Nghĩa là `true`, `echo ok`, `npm test || true` không mua được chữ "done
93
93
  Harness **phát hiện** thất bại tốt:
94
94
 
95
95
  - `trace.outcome` có `failed`, `blocked`, `partial` bên cạnh `completed`.
96
- - `task.md` bước 18: verify không chạy được thì dừng và báo blocker chính xác, không được gọi là done.
96
+ - `task.md` yêu cầu verify không chạy được thì dừng và báo blocker chính xác, không được gọi là done.
97
97
  - Gate trả `missing` liệt kê đúng thứ còn thiếu.
98
98
 
99
99
  Nhưng nó **không mang được gì sang lần thử sau**:
@@ -9,7 +9,7 @@ Một thành viên mới không cần biết local path của maintainer. Luồn
9
9
  ```bash
10
10
  node --version # >= 22.19.0
11
11
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
12
- npm install -g --ignore-scripts @piagent/platform@1.2.5
12
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
13
13
  piagent-install --stable
14
14
  cd /path/to/project
15
15
  pi
@@ -43,7 +43,7 @@ Mặc định team dùng stable helper:
43
43
  ```bash
44
44
  node --version # >= 22.19.0
45
45
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
46
- npm install -g --ignore-scripts @piagent/platform@1.2.5
46
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
47
47
  piagent-install --stable --dry-run
48
48
  piagent-install --stable
49
49
  ```
@@ -18,6 +18,7 @@ Piagent package thêm command:
18
18
  /context compact
19
19
  /usage logs
20
20
  /usage live
21
+ /usage efficiency
21
22
  ```
22
23
 
23
24
  Agent cũng có thể gọi tool:
@@ -50,6 +51,11 @@ piagent_context_preflight
50
51
 
51
52
  `/usage logs` không tail realtime. Nó chỉ hiển thị policy compact và vài capture mới nhất khi tool output quá dài. Capture nằm trong `.pi/piagent-state/tool-results/`, đã qua redaction trước khi ghi, để Agent Watch/report đọc offline mà Pi TUI không phải nhồi full terminal log vào transcript. Alias `/logs` vẫn chạy.
52
53
 
54
+ `/usage efficiency` đọc local Context Engine telemetry và hiện công thức
55
+ `contextWasteScore`: duplicate reads, duplicate output, tool-schema share,
56
+ low-confidence retrieval, và active-tool excess. Score này phải đi cùng task
57
+ gate/verify result; nó không tự kết luận model hoặc nhân viên làm tốt/xấu.
58
+
53
59
  Giới hạn kỹ thuật: extension command context expose `ctx.getContextUsage()`, phù hợp để biết context window đang dùng bao nhiêu. Exact billed totals như `input`, `output`, `cacheRead`, `cacheWrite`, `cost` là API của Pi `/session` và RPC `get_session_stats`.
54
60
 
55
61
  ## Từ terminal khác
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link current" href="/architecture" aria-current="page">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -126,9 +127,9 @@
126
127
  <span class="pager-label">Trước</span>
127
128
  <span class="pager-title">Security model</span>
128
129
  </a>
129
- <a class="pager-next" href="/runtime">
130
+ <a class="pager-next" href="/context-engine">
130
131
  <span class="pager-label">Tiếp</span>
131
- <span class="pager-title">Runtime tools</span>
132
+ <span class="pager-title">Context Engine</span>
132
133
  </a>
133
134
  </nav>
134
135
 
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -0,0 +1,47 @@
1
+ <section class="section">
2
+ <div class="grid cols-3">
3
+ <article class="card">
4
+ <h3 id="dynamic-tools">Tool theo task</h3>
5
+ <p>Pi chỉ đưa governance, policy, code retrieval, knowledge, onboarding hoặc usage vào prompt khi task cần. Runtime guard vẫn chạy ngầm.</p>
6
+ </article>
7
+ <article class="card">
8
+ <h3 id="local-index">Index local</h3>
9
+ <p>FTS5, symbol và import graph nằm trong <span class="inline-code">.pi/piagent-state/context-engine/</span>. Protected paths và secret files không được index.</p>
10
+ </article>
11
+ <article class="card">
12
+ <h3 id="ranked-context">Context có xếp hạng</h3>
13
+ <p>Explicit path, lexical match, symbol, Git, test relation, positive feedback và graph rank được gộp trước khi pack vào hard token budget.</p>
14
+ </article>
15
+ <article class="card">
16
+ <h3 id="semantic-compact">Semantic compact</h3>
17
+ <p>Giữ goal, quyết định, changed files, verify và blocker. Bỏ log lặp, source excerpt và kế hoạch đã bị thay thế.</p>
18
+ </article>
19
+ <article class="card">
20
+ <h3 id="test-impact">Test impact</h3>
21
+ <p>Đi ngược import graph từ file thay đổi để đề xuất dependent files và focused tests trước full suite.</p>
22
+ </article>
23
+ <article class="card">
24
+ <h3 id="agent-watch">Agent Watch</h3>
25
+ <p>Event local có session, model, thinking, tool surface, retrieval confidence, tỷ lệ context thực dùng và waste metrics; không lưu prompt hay output thô lần hai.</p>
26
+ </article>
27
+ </div>
28
+ </section>
29
+
30
+ <section class="section">
31
+ <div class="command-grid">
32
+ <article class="command-card">
33
+ <header><span>Trong Pi</span><button class="clip-btn" data-clip="/context index&#10;/context rebuild&#10;/context pack Fix invoice calculation&#10;/context impact&#10;/usage efficiency">Lấy lệnh</button></header>
34
+ <pre><code>/context index
35
+ /context rebuild
36
+ /context pack Fix invoice calculation
37
+ /context impact
38
+ /usage efficiency</code></pre>
39
+ </article>
40
+ <article class="command-card">
41
+ <header><span>Ngoài terminal</span><button class="clip-btn" data-clip="piagent-context rebuild&#10;piagent-context pack &quot;Fix invoice calculation&quot; --tokens 4000&#10;piagent-context efficiency">Lấy lệnh</button></header>
42
+ <pre><code>piagent-context rebuild
43
+ piagent-context pack "Fix invoice calculation" --tokens 4000
44
+ piagent-context efficiency</code></pre>
45
+ </article>
46
+ </div>
47
+ </section>
@@ -0,0 +1,171 @@
1
+ <!doctype html>
2
+ <html lang="vi">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Ít context hơn, giữ nguyên chất lượng model · Pi Agent Platform Docs</title>
7
+ <meta name="description" content="Index local, retrieval có xếp hạng, tool loading theo task, semantic compaction và telemetry minh bạch cho Agent Watch." />
8
+ <meta name="theme-color" content="#050505" />
9
+ <link rel="canonical" href="https://piagent.io.vn/context-engine" />
10
+ <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
11
+ <meta property="og:title" content="Ít context hơn, giữ nguyên chất lượng model · Pi Agent Platform Docs" />
12
+ <meta property="og:description" content="Index local, retrieval có xếp hạng, tool loading theo task, semantic compaction và telemetry minh bạch cho Agent Watch." />
13
+ <meta property="og:url" content="https://piagent.io.vn/context-engine" />
14
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
15
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
16
+ <link
17
+ href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap"
18
+ rel="stylesheet"
19
+ />
20
+ <link rel="stylesheet" href="/assets/docs.css" />
21
+ <script src="/assets/docs.js" defer></script>
22
+ </head>
23
+ <body>
24
+ <header class="topbar">
25
+ <a class="brand" href="/" aria-label="Pi Agent Platform">
26
+ <span class="brand-mark"><img src="/assets/piagent-logo.svg" alt="" /></span>
27
+ <span>Pi Agent Platform</span>
28
+ </a>
29
+ <div class="top-actions">
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
+ <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
+ <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
34
+ </svg>
35
+ GitHub
36
+ </a>
37
+ <button class="button mobile-menu" type="button" data-menu>Lộ trình</button>
38
+ <a class="button" href="/commands">Commands</a>
39
+ </div>
40
+ </header>
41
+
42
+ <div class="layout with-toc">
43
+ <aside class="sidebar" data-sidebar>
44
+ <div class="sidebar-search" aria-label="Tìm trong tài liệu">
45
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
46
+ <path d="M10.8 18.1a7.3 7.3 0 1 1 0-14.6 7.3 7.3 0 0 1 0 14.6Zm5.3-1.7 4.4 4.4" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
47
+ </svg>
48
+ <input type="search" placeholder="Tìm trang" data-filter />
49
+ </div>
50
+
51
+ <nav aria-label="Tài liệu">
52
+ <div class="nav-group">
53
+ <p class="nav-title">Get started</p>
54
+ <a class="nav-link" href="/">Overview</a>
55
+ <a class="nav-link" href="/quickstart">Quickstart</a>
56
+ <a class="nav-link" href="/scope">Phạm vi platform</a>
57
+ </div>
58
+ <div class="nav-group">
59
+ <p class="nav-title">Build</p>
60
+ <a class="nav-link" href="/profiles">Project profile</a>
61
+ <a class="nav-link" href="/permissions">Permission modes</a>
62
+ <a class="nav-link" href="/commands">Command catalog</a>
63
+ <a class="nav-link" href="/workflows">Workflows</a>
64
+ </div>
65
+ <div class="nav-group">
66
+ <p class="nav-title">MCP</p>
67
+ <a class="nav-link" href="/mcp">MCP overview</a>
68
+ <a class="nav-link" href="/mcp-servers">Quản lý server</a>
69
+ <a class="nav-link" href="/mcp-auth">Auth và readiness</a>
70
+ <a class="nav-link" href="/mcp-approval">Approval gate</a>
71
+ </div>
72
+ <div class="nav-group">
73
+ <p class="nav-title">Operate</p>
74
+ <a class="nav-link" href="/security">Security model</a>
75
+ <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link current" href="/context-engine" aria-current="page">Context Engine</a>
77
+ <a class="nav-link" href="/runtime">Runtime tools</a>
78
+ <a class="nav-link" href="/team">Team usage</a>
79
+ </div>
80
+ </nav>
81
+ </aside>
82
+
83
+ <main>
84
+ <div class="content-shell" data-article>
85
+ <nav class="breadcrumb" aria-label="Breadcrumb">
86
+ <a href="/">Docs</a>
87
+ <span aria-hidden="true">/</span>
88
+ <span>Operate</span>
89
+ <span aria-hidden="true">/</span>
90
+ <span>Context Engine</span>
91
+ </nav>
92
+ <div class="page-head">
93
+ <h1>Ít context hơn, giữ nguyên chất lượng model</h1>
94
+ <p>Index local, retrieval có xếp hạng, tool loading theo task, semantic compaction và telemetry minh bạch cho Agent Watch.</p>
95
+ </div>
96
+ <section class="section">
97
+ <div class="grid cols-3">
98
+ <article class="card">
99
+ <h3 id="dynamic-tools">Tool theo task</h3>
100
+ <p>Pi chỉ đưa governance, policy, code retrieval, knowledge, onboarding hoặc usage vào prompt khi task cần. Runtime guard vẫn chạy ngầm.</p>
101
+ </article>
102
+ <article class="card">
103
+ <h3 id="local-index">Index local</h3>
104
+ <p>FTS5, symbol và import graph nằm trong <span class="inline-code">.pi/piagent-state/context-engine/</span>. Protected paths và secret files không được index.</p>
105
+ </article>
106
+ <article class="card">
107
+ <h3 id="ranked-context">Context có xếp hạng</h3>
108
+ <p>Explicit path, lexical match, symbol, Git, test relation, positive feedback và graph rank được gộp trước khi pack vào hard token budget.</p>
109
+ </article>
110
+ <article class="card">
111
+ <h3 id="semantic-compact">Semantic compact</h3>
112
+ <p>Giữ goal, quyết định, changed files, verify và blocker. Bỏ log lặp, source excerpt và kế hoạch đã bị thay thế.</p>
113
+ </article>
114
+ <article class="card">
115
+ <h3 id="test-impact">Test impact</h3>
116
+ <p>Đi ngược import graph từ file thay đổi để đề xuất dependent files và focused tests trước full suite.</p>
117
+ </article>
118
+ <article class="card">
119
+ <h3 id="agent-watch">Agent Watch</h3>
120
+ <p>Event local có session, model, thinking, tool surface, retrieval confidence, tỷ lệ context thực dùng và waste metrics; không lưu prompt hay output thô lần hai.</p>
121
+ </article>
122
+ </div>
123
+ </section>
124
+
125
+ <section class="section">
126
+ <div class="command-grid">
127
+ <article class="command-card">
128
+ <header><span>Trong Pi</span><button class="clip-btn" data-clip="/context index&#10;/context rebuild&#10;/context pack Fix invoice calculation&#10;/context impact&#10;/usage efficiency">Lấy lệnh</button></header>
129
+ <pre><code>/context index
130
+ /context rebuild
131
+ /context pack Fix invoice calculation
132
+ /context impact
133
+ /usage efficiency</code></pre>
134
+ </article>
135
+ <article class="command-card">
136
+ <header><span>Ngoài terminal</span><button class="clip-btn" data-clip="piagent-context rebuild&#10;piagent-context pack &quot;Fix invoice calculation&quot; --tokens 4000&#10;piagent-context efficiency">Lấy lệnh</button></header>
137
+ <pre><code>piagent-context rebuild
138
+ piagent-context pack "Fix invoice calculation" --tokens 4000
139
+ piagent-context efficiency</code></pre>
140
+ </article>
141
+ </div>
142
+ </section>
143
+ <nav class="pager" aria-label="Trang kế tiếp">
144
+ <a class="pager-prev" href="/architecture">
145
+ <span class="pager-label">Trước</span>
146
+ <span class="pager-title">Architecture</span>
147
+ </a>
148
+ <a class="pager-next" href="/runtime">
149
+ <span class="pager-label">Tiếp</span>
150
+ <span class="pager-title">Runtime tools</span>
151
+ </a>
152
+ </nav>
153
+
154
+ <footer class="footer">
155
+ <p>Pi Agent Platform docs · static HTML · governed agent workflow</p>
156
+ <div class="footer-links" aria-label="External links">
157
+ <a href="https://piagent.io.vn" target="_blank" rel="noopener noreferrer">piagent.io.vn</a>
158
+ <a href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer">GitHub repository</a>
159
+ <a href="https://www.facebook.com/vinhtam0544/" target="_blank" rel="noopener noreferrer">Facebook profile</a>
160
+ </div>
161
+ </footer>
162
+ </div>
163
+ </main>
164
+
165
+ <aside class="toc" aria-label="Mục lục trang">
166
+ <p class="toc-title">Trên trang này</p>
167
+ <nav data-toc></nav>
168
+ </aside>
169
+ </div>
170
+ </body>
171
+ </html>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link current" href="/runtime" aria-current="page">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -138,9 +139,9 @@ npm run typecheck</code></pre>
138
139
  </div>
139
140
  </section>
140
141
  <nav class="pager" aria-label="Trang kế tiếp">
141
- <a class="pager-prev" href="/architecture">
142
+ <a class="pager-prev" href="/context-engine">
142
143
  <span class="pager-label">Trước</span>
143
- <span class="pager-title">Architecture</span>
144
+ <span class="pager-title">Context Engine</span>
144
145
  </a>
145
146
  <a class="pager-next" href="/team">
146
147
  <span class="pager-label">Tiếp</span>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link current" href="/security" aria-current="page">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link current" href="/team" aria-current="page">Team usage</a>
78
79
  </div>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.5 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -73,6 +73,7 @@
73
73
  <p class="nav-title">Operate</p>
74
74
  <a class="nav-link" href="/security">Security model</a>
75
75
  <a class="nav-link" href="/architecture">Architecture</a>
76
+ <a class="nav-link" href="/context-engine">Context Engine</a>
76
77
  <a class="nav-link" href="/runtime">Runtime tools</a>
77
78
  <a class="nav-link" href="/team">Team usage</a>
78
79
  </div>