跳到主要內容
AI News HubLIVE
來源內容 · 翻譯待補全2 分鐘閱讀

待翻譯:Run AI agents safely with Ollama and Fly.io

文章摘要

AI 服務暫時不可用,以下為來源摘要,待恢復後補全翻譯:AI agents can now use Ollama's cloud models safely inside Fly.io's cloud computers.

待翻譯:Run AI agents safely with Ollama and Fly.io
報告錯誤

更正渠道尚未開通,可先複製下方文章資訊留存。

查看更正說明
直接讀正文

AI 服務暫時不可用,以下為來源正文,待恢復後補全翻譯。

Run AI agents safely with Ollama and Fly.io October 13, 2026 Ollama Cloud now works inside full Linux computers designed for agents using Fly.io Sprites. A Sprite is a sandbox from Fly.io. Each one is a full Linux virtual machine with its own disk that stays around between sessions. Claude Code, Codex and Gemini CLI are supported out of the box and will let agents run in a sandbox to securely run commands. With the new Ollama Connector, your Sprites can use Ollama’s cloud models like kimi-k3, glm-5.3 and deepseek-v4.1-flash. How it works You add your Ollama API key to your Fly.io organization, and Fly.io encrypts it and never returns it through the API. When code inside a Sprite calls Ollama, it goes through a Fly.io gateway. The gateway checks which Sprite is calling and adds your key to the request. The Sprite itself only knows a gateway URL and a connection ID. This means: An agent in a Sprite can’t leak your key. New connectors block every Sprite by default. You choose which ones get access: by label, by name prefix or all of them. Calls only work from inside a Sprite. Get started You’ll need an Ollama API key and at least one Sprite. In the Fly.io dashboard, open Sprites, then Connectors, and add an Ollama connector with your API key. Under Access Configuration, choose which Sprites can use it and save. Click Test reachability next to a Sprite to check that it can reach Ollama. Then, from inside the Sprite: curl "https://api.sprites.dev/v1/gateway/ollama//v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{"model": "kimi-k3", "messages": [{"role": "user", "content": "Hello!"}]}' The connector page shows this command with your connection ID filled in. There’s no Authorization header because the gateway adds your key. Python Any OpenAI SDK works. Set base_url to the gateway and use any value for api_key: from openai import OpenAI client = OpenAI( base_url="https://api.sprites.dev/v1/gateway/ollama//v1", api_key="unused", ) response = client.chat.completions.create( model="glm-5.3", messages=[{"role": "user", "content": "Why is the sky blue?"}], ) print(response.choices[0].message.content) Ollama’s native /api/* routes work through the gateway too. Coding agents Fly.io Sprites come with a skill that tells Claude Code, Cursor, Codex and Gemini CLI about Ollama. If the Sprite has access, the agent can use Ollama models without any setup. Example: fuzzing Fly.io has a guide that uses several models together. A small model like nemotron-3-nano:30b writes malformed inputs, a Sprite runs them against your program, and a larger model like kimi-k3 looks at the crashes. To switch models, change the model field. See the Ollama Connector quickstart. Thank you to the Fly.io team for building this with us. Read more Ollama Connector quickstart on Fly.io Ollama Cloud models Ollama pricing

展開要點與分析

文章情報

工程師中級

要點

  • AI 服務暫時不可用,系統已先保留來源內容與降級元數據。
  • AI agents can now use Ollama's cloud models safely inside Fly.io's cloud computers.

要點與分析由自動化流程生成,可能有誤,請結合原始來源核實。