Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
code_execution 會在 xAI 的 Responses API 上執行沙盒化的遠端 Python 分析。
這與本機 exec 不同:
exec會在你的機器或節點上執行 shell 命令code_execution會在 xAI 的遠端沙盒中執行 Python
code_execution 來進行:
- 計算
- 製表
- 快速統計
- 圖表式分析
- 分析由
x_search或web_search傳回的資料
exec。
設定
你需要 xAI API 金鑰。以下任一種都可以:XAI_API_KEYplugins.entries.xai.config.webSearch.apiKey
如何使用
自然地提出要求,並明確說明分析意圖:task 參數,因此 agent 應在一個提示中送出完整的分析要求與任何內嵌資料。
限制
- 這是遠端 xAI 執行,不是本機程序執行。
- 它應被視為臨時分析,而不是持久化筆記本。
- 不要假設可存取本機檔案或你的工作區。
- 若要取得最新 X 資料,請先使用
x_search。