AWS ML ★ 92 5 min

How Postman runs Agent Mode for 40 million developers on Amazon Bedrock

Advanced (300)Amazon BedrockCustomer Solutions

🔗 https://aws.amazon.com/blogs/machine-learning/how-postman-runs-agent-mode-for-40-million-developers-on-amazon-bedrock/

📌 4000 萬開發者的 Agent,Postman 踩過的三個架構陷阱

TL;DR:Postman 把 AI agent 塞進 11 年歷史的產品時發現,瓶頸不是模型品質,而是工具數量與上下文設計。

多數團隊做 agent demo 時最怕模型不夠聰明,Postman 的 Agent Mode 團隊卻發現,真正拖垮生產環境的是「工具太多」和「上下文不對」,模型本身反而不是最大問題。

🤔 把一個介面導向的老產品,重新教給 AI 看

Postman 的 Agent Mode 是讓使用者用 AI-native 的方式操作 API 測試、文件、探索與實作的入口。過去 11 年,使用者習慣靠展開側邊欄、切換分頁、打開 request 來找資訊;但 agent 是直接對資料做推理,不是在畫面上導航。這個落差讓團隊重新發現,產品的 API、UX 以及知識分布方式裡藏著大量「為人類介面設計」的隱性假設,這些假設在餵給 agent 時全部要重新處理。

🧩 工具超過 40 個,模型就開始選錯

團隊一開始偏好「原子化工具」:開啟一個 request、更新一個欄位、抓一筆 metadata,每個動作都很精確。但這個設計很快出現兩個問題。第一,真實工作流常常需要一長串工具呼叫,即使每一步都很快,使用者仍感覺整體很慢,因為每個動作都要先回到模型才能進行下一步。第二,Postman 測試發現,當可見工具集超過大約 40 個時,工具選擇錯誤明顯增加:模型會呼叫不存在的工具、在 schema 正確的情況下傳錯參數,或選中語意上合理但情境上錯誤的工具。換成更大或更新的模型能緩解,但無法消除這個問題。

現行架構的做法是動態選工具:root agent 先查詢一個工具 embedding 的向量資料庫,把超過 170 個工具縮小到約 15 個與當前請求相關的工具,再交給一個context 隔離的子 agent 執行,模型最終只看到任務需要的工具。另一個細節是,許多客戶端 API 其實隱性綁定了介面狀態,例如要修改一個 request 得先打開對應分頁,這等於讓 agent 模仿人類操作介面而非直接對資料推理。Postman 正在把工具與分頁解耦,Native Git 功能就大量用了這個做法,例如現在 Agent Mode 可以在背景送出 request 而不需要打開分頁(仍需使用者核准)。

📊 用 schema 查詢取代一堆單點工具

對於像 API Catalog 這種暴露大量結構化資料(服務可用度、測試結果、端點回應時間)的產品,Postman 把多個窄視圖整併成單一查詢工具:給模型底層 ClickHouse 資料表的 schema,讓它自己生成帶 join 和 where 子句的複雜查詢,而不是每個分析問題都建一個新工具。這把工程重心從「每個問題建一個工具」轉成「把資料模型建好一次」,agent 能生成的查詢種類遠超團隊能手動列舉的工具數量。

💡 缺的不是工具,是上下文

團隊原本以為缺工具才是最大瓶頸,但實際上多數失敗來自上下文缺失或錯誤,context 指的是 agent 對使用者目前在 Postman 裡的位置、哪些實體是啟用狀態、哪些狀態已經成立的理解。直接序列化既有介面資料模型並不管用,因為那些物件是為渲染和資料傳輸設計的,不是為推理設計的。Postman 因此建了專屬的 context handler,把每個實體蒸餾成 agent 真正需要知道的資訊,並區分兩種 context:自動蒐集、壓縮進 prompt 的廣而淺的背景資訊,以及使用者主動選定、經由專屬 handler 處理的深而聚焦的選定資訊。

在模型層,Agent Mode 跑在 Amazon Bedrock 上,取得模型彈性、跨區域推理、依模型決定的零資料保留,以及多層 prompt caching。人工監督也內建在設計裡:修改應用狀態的動作一律要使用者核准,並用 Amazon Bedrock Guardrails 在資料送進 LLM 前過濾個人識別資訊,企業管理員可在 Agent Mode 的 guardrail 設定中開啟。

🎯 實務啟示

把工具目錄視為上下文預算的一部分:依任務動態篩選模型能看到的工具,並讓「agent 能做什麼」與「UI 剛好開著什麼」脫鉤。遇到結構化資料時,寧可做好 schema 讓 agent 自己查詢,也不要無限擴增單一用途的讀取工具,這會換來更好的擴充曲線。同時別把上下文建設想得太輕,序列化既有資料模型往往不夠用,專屬的 context 蒸餾邏輯才是讓 agent 在複雜產品裡站穩的關鍵。

🔗 來源

#AIAgent #AmazonBedrock #Postman #AgenticAI #LLMOps #ProductionAI #AWS #ToolUse #ContextEngineering #APIFirst

原始資料 AWS ML · 收集於 2026-10-09
來源原標題
How Postman runs Agent Mode for 40 million developers on Amazon Bedrock
作者
Srinivas Kini
原始標籤
Advanced (300) · Amazon Bedrock · Customer Solutions
原始連結
https://aws.amazon.com/blogs/machine-learning/how-postman-runs-agent-mode-for-40-million-developers-on-amazon-bedrock/

摘要原文

Building an AI agent for a demo and operating one for 40 million developers are different engineering problems. Postman set out to build Agent Mode , an AI-native way to work across API testing , documentation , discovery, and implementation. The team expected model quality and prompt design to be the hardest problems. The deeper challenges came from integrating an agent into a mature product with years of interface-driven assumptions, a wide surface area, and specialized concepts. In this post, Postman and AWS describe the architectural patterns that emerged while making a mature product legible to an AI agent. These patterns include controlling tool sprawl, exposing schema-based reads, and treating context rather than capability as the primary bottleneck. We also explain how Agent Mode uses Amazon Bedrock for model flexibility, geographically scoped cross-Region inference, model-dependent zero data retention, and multi-tier prompt caching. Together, these lessons can help teams move production agents beyond prototypes. Agent Mode is Postman’s portal for working with the product in an AI-native way across testing, documentation, discovery, and implementation. Postman has evolved over 11 years, and developers and users learned to locate information through the interface by expanding sidebars, checking tabs, and opening requests. Re-engineering that awareness for an agent surfaced structural assumptions in the product’s APIs, user experience, and distribution of product knowledge. An agent reasons over data rather than navigating a screen. Figure 1 illustrates how Agent Mode works directly against the application. Figure 1: Agent Mode works directly against the Postman application. In this example, it opens a pull request and proposes next steps without requiring the user to navigate through the interface Agent Mode runs on Amazon Bedrock , which provides managed access to foundation models behind the agent. Supporting Postman’s global developer community creates variable, latency-sensitive demand with sharp traffic bursts. With Amazon Bedrock, Postman can scale this production workload without operating its own model-serving infrastructure while retaining flexibility in model selection and control over throughput, geographic processing, and cost. Figure 2 provides a high-level view of the production architecture before the following sections examine its components. Figure 2: Postman Agent Mode combines client-side tools, agent orchestration, purpose-built context, and Amazon Bedrock model inference. Tools are scoped for each task, and user approval remains part of actions that modify application state Human oversight is part of the production design. Agent Mode requires user approval before actions that modify application state. Postman also scopes available tools to the task, selects purpose-built context, and applies model-dependent data-retention settings. These controls reduce unintended actions and unnecessary data exposure, while production testing and monitoring remain necessary. As a responsible AI control, Postman uses Amazon Bedrock Guardrails to redact personally identifiable information before it reaches the underlying large language model (LLM). Enterprise admins can turn this on in Agent Mode’s guardrail settings. In Agent Mode, tools define how the agent acts inside Postman. Early on, the team leaned toward highly atomic tools: small, precise actions such as opening a request, updating one field, or fetching a specific piece of metadata. That approach supported correctness and control in early iterations, but it also revealed several problems. Many real-world workflows require long sequences of tool calls. Even when each step was fast, the overall experience felt slow, because every action had to return to the model before the next one could begin. Users watched the agent step through actions they had mentally grouped as a single operation. In Postman’s testing, tool-selection errors increased once the visible toolset exceeded approximately 40 tools. The agent could call nonexistent tools, pass incorrect arguments despite valid schemas, or select tools that seemed semantically reasonable but were wrong in context. Larger or newer models reduced this behavior but didn’t remove it. Past a certain toolset size, exposing more tools can reduce agent effectiveness. The current architecture selects tools based on need and context and isolates individual execution threads. The model sees only the tools relevant to the current task. Figure 3 illustrates this dynamic selection process. Figure 3: The root agent queries a vector database of tool embeddings and narrows more than 170 tools to approximately 15 relevant to the request. It then hands those tools to a context-isolated sub-agent, so the model sees only the tools needed for the task A subtler problem was that many client APIs were implicitly coupled to interface state. Tools that modified requests needed certain elements to be open, while other tools opened new tabs as side effects. The agent had to open a request tab to read it, mimicking interface interactions instead of reasoning about data. Postman is actively decoupling tools from tabs, and its Native Git feature makes extensive use of this approach. For example, Agent Mode can now send requests in the background without an open tab, although user approval is still required. Builder takeaway: Treat your tool catalog as part of the context budget. Dynamically scope the tools exposed to the model per task, and decouple “what the agent can do” from “what the UI happens to have open.” For products such as the API Catalog, Postman consolidated multiple narrow views into a single query tool. These products expose structured data such as service uptime, test results, and endpoint response times across many services. Given the schemas of the underlying ClickHouse tables, the agent can generate complex queries with joins and WHERE clauses. This substantially reduces the number of distinct tools needed to answer an analysis question: With this approach, the engineering job shifts from building a tool per question to modeling the data well once . The agent can then generate a far wider variety of queries than the team could ever have enumerated as individual tools. Builder takeaway: Where you have well-structured data, give the agent schema-aware read access to a query engine instead of a proliferation of single-purpose read tools. You trade tool count for data modeling, which produces a better scaling curve. Postman initially assumed missing tools would be the biggest blocker. In practice, missing or incomplete context caused more failures than missing capabilities. Context is the agent’s understanding of where the user is in Postman, which entities are active, and what state has already been established. When that context was wrong or absent, even correct tools became ineffective. Figure 4 distinguishes the two forms of context supplied to the agent. Figure 4: Two kinds of context feed the agent. Broad, shallow background context is gathered automatically and minified for the prompt. Deep, focused selected context is chosen by the user and routed through a dedicated handler for each entity type. Each handler distills the entity into the information the agent needs The challenge was structural. Over 11 years, developers and users learned to find information through the interface. Re-engineering that awareness for an agent required multiple iterations to determine what mattered for each workflow and what was noise. Serializing the existing interface data model did not produce useful context because those objects were shaped for rendering and data transfer, not reasoning. Postman therefore built dedicated context handlers that distilled each entity into what the agent needed to know. As more objects gained handlers, truncation became the next problem.

由 claude-code/sonnet 自動生成