# 策展 · X (Twitter) 🔥🔥🔥🔥

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 原作者：Palantir (@PalantirTech) · 策展與摘要：EasyVibeCoding · 平台：X (Twitter) · 日期：2026-07-16

> 原始來源：https://x.com/PalantirTech/status/2077481045251821760

## 中文摘要

Palantir 發布 Agent Engine 與 Agent SDK 支援多人協作。

**核心架構與設計理念**
Palantir Group Lead Natasha Armbrust 指出，現有的簡單迴圈（while loop）架構難以應對真實世界中非同步、並發且具備「人類在迴圈（human-in-the-loop）」需求的複雜場景。為此，Palantir 打造了全新的 Agent 堆疊，其底層架構由下而上依序為：
- **Ontology**：作為資料與邏輯的基礎。
- **Orchestrator**：提供 Agent 迴圈的耐久性（durability）基礎設施。
- **Agent Engine**：託管並執行 Agent 原語的 API 與執行階段層。
- **Agent SDK**：供開發者定義複雜 Agent 的高階工具。

<video src="https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/1784162902361-czm8kj6x.mp4" poster="https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/9fef780dd7a2f805.jpg" controls playsinline preload="metadata" style="max-width:100%;height:auto;display:block;margin:1rem 0"></video>
> 一位講者在 DevCon 活動中，透過架構圖解說 Agent Stack 的組成與運作機制。

**三大核心原語（Primitives）**
Agent Engine 的運作建立在三項關鍵原語之上，透過這些原語的整合，Agent 系統在底層實際上運作如同一台分散式狀態機：
- **Context Items**：定義 Agent 會話的強型別資料，用於儲存狀態。
- **Events**：代表發生的事件，是改變狀態的主要方式。
- **Effects**：負責將 Agent 與外部世界連接，執行非同步任務並分派新的 Events。

**運作流程與實際應用**
在演示中，Natasha Armbrust 展示了如何透過這些原語處理病患出院流程。當外部系統（如實驗室檢測結果）發生變更時，系統會觸發 Event，經由 Handler 處理後產生 Mutation 更新狀態，或透過 Effect 呼叫外部工具。這種設計確保了：
- **狀態持久性**：即便任務執行時間長達數天，系統仍能精確追蹤狀態。
- **多人協作（Multiplayer）**：多位使用者（如護理師與管理人員）可透過不同介面與同一個 Agent 互動，並即時反映狀態更新。
- **競爭條件處理**：透過分散式狀態機的機制，有效管理並發事件帶來的衝突。

**未來規劃與生態系**
Palantir 預告了該堆疊的後續發展，旨在降低開發門檻並強化治理能力：
- **低程式碼 Agent Builder**：將提供與 Pro Code Agent SDK 同級的原語，讓組織內更多使用者能定義複雜 Agent。
- **Agent Manager**：作為企業內所有 Agent 的統一監控與治理介面，無論是透過程式碼或低程式碼工具建構的 Agent，皆可在此進行管理。

目前 Agent SDK 已於 DevCon 6 提供測試版本，開發者可透過 Canary 會話開始建構應用。

## 媒體內容

**一位講者在 DevCon 活動中，透過架構圖解說 Agent Stack 的組成與運作機制。**

**影片中的 Prompt 與操作**

操作步驟：

1. （00:01）講者展示 Agent 堆疊架構圖
2. （00:26）講者切換至核心原語說明頁面
3. （01:46）講者切換至 Agent Loop 流程圖

**逐字稿**

- `00:00` 所以你看到了 Orchestrator 是如何提供穩健性的。（So you saw how Orchestrator provided durability.）
- `00:02` 在 Orchestrator 之上，我們構建了 Agent Engine，（On top of Orchestrator, we built Agent Engine,）
- `00:05` 它處理我們的 Agent 原語，（which handles our agent primitives,）
- `00:08` 然後是之上的 Agent SDK，（and then the Agent SDK on top,）
- `00:11` 這讓定義 Agent 變得非常簡單，（which makes it extremely easy to define agents,）
- `00:13` 就像你剛剛在這裡看到的那樣。（which you just saw here.）
- `00:15` 你可以從我展示的程式碼開始，（You can start high with the code I showed,）
- `00:18` 但你隨時可以透過逃生艙機制（escape hatch）（but you can always escape hatch down）
- `00:20` 向下構建在 Agent Engine API 層之上。（to build in on top of the Agent Engine API layer.）
- `00:26` 那麼，是什麼讓 SDK 和 API 如此強大呢？（So what makes the SDK and APIs powerful）
- `00:29` 是因為它們是建立在這三個原語之上：（is they're built on these three primitives,）
- `00:32` context items、事件（events）和效果（effects）。（context items, events, and effects.）
- `00:35` 一個會話，一個 Agent 會話，（So a session, an agent session,）
- `00:37` 是由 context items 組成的。（is composed of context items.）
- `00:39` 這些是由你定義的強型別資料，（These are strongly typed data defined by you,）
- `00:42` 也就是 Agent 的開發者。（the developer of the agent.）
- `00:44` Context items 透過事件進行變動，（Context items mutate through events,）
- `00:48` 而且它們實際上擁有自己的狀態，（and they're actually, they hold their own state,）
- `00:50` 它們自己的強型別狀態。（their own strongly typed state.）
- `00:52` 事件會回傳效果，（Events return effects,）
- `00:54` 這些效果可以非同步執行並排程新的事件。（which can asynchronously run and dispatch new events.）
- `00:58` 這就是 Agent 與外部世界連接的方式。（So it's how the agent gets connected to the outside world.）
- `01:02` 如果我們將這三個原語放在一起，（If we put these three primitives together,）
- `01:04` 我們實際上得到的是一個 Agent 迴圈。（what we actually have is an agent loop.）
- `01:08` 新的事件進入你的 Agent，（New events come into your agent,）
- `01:11` 這些事件會進入事件佇列。（and these go into the event queue.）
- `01:13` 事件會透過你定義的處理函式進行處理。（Events are processed through handlers that you define.）
- `01:17` 這些處理函式可以回傳變動和效果。（Those handlers can return mutations and effects.）
- `01:21` 變動會更新狀態，（Mutations update state,）
- `01:23` 包括 context item 狀態和會話狀態。（both context item state and session state.）
- `01:26` 效果是非同步的，（Effects are asynchronous,）
- `01:28` 所以它們會連接到現實世界，（so they reach out to the real world,）
- `01:30` 例如模型提供者的 API，（like a model provider API,）
- `01:32` 然後它們會以更多排程事件的形式回傳。（and they come back as more dispatched events.）
- `01:36` 透過將這三個原語縫合在一起，（And by stitching these three primitives together,）
- `01:39` 我們實際上得到了一個極其強大的 Agent 迴圈，（we actually get an extremely powerful agent loop）
- `01:43` 其底層是一個分散式狀態機。（that under the hood is a distributed state machine.）

## 標籤

Agent, SDK, 新產品, 功能更新, Palantir
