Quickstart: Sakana Fugu

Sakana Fugu is a multi-agent orchestration system packaged as a single model behind an OpenAI-compatible API (https://api.sakana.ai/v1, models fugu and fugu-ultra). It coordinates a team of frontier models — but it has no built-in access to live, authoritative data. Pipeworx supplies that in one function.

Fugu’s API doesn’t take MCP servers directly, so the integration is standard OpenAI-style function calling: declare one ask_pipeworx function, and when Fugu calls it, forward the question to Pipeworx’s REST endpoint.

Wire it up (Python, OpenAI SDK)

import json, urllib.request, urllib.parse
from openai import OpenAI

client = OpenAI(base_url="https://api.sakana.ai/v1", api_key="YOUR_SAKANA_KEY")

TOOLS = [{
    "type": "function",
    "function": {
        "name": "ask_pipeworx",
        "description": (
            "Fetch LIVE, cited data from 1,250+ authoritative sources — SEC filings, "
            "FDA, FRED/BLS economics, clinical trials, patents, real estate, weather, "
            "prediction markets, crypto, government records, and more. Use for ANY "
            "question needing current or factual data instead of guessing."
        ),
        "parameters": {
            "type": "object",
            "properties": {"question": {"type": "string", "description": "The data question, in plain English."}},
            "required": ["question"],
        },
    },
}]

def ask_pipeworx(question: str) -> str:
    q = urllib.parse.quote(question)
    with urllib.request.urlopen(f"https://gateway.pipeworx.io/ask?question={q}") as r:
        return r.read().decode()

messages = [{"role": "user", "content": "Compare the current 30-year mortgage rate to a year ago."}]
resp = client.chat.completions.create(model="fugu", messages=messages, tools=TOOLS)

# Standard tool loop
while resp.choices[0].message.tool_calls:
    messages.append(resp.choices[0].message)
    for tc in resp.choices[0].message.tool_calls:
        args = json.loads(tc.function.arguments)
        messages.append({
            "role": "tool",
            "tool_call_id": tc.id,
            "content": ask_pipeworx(args["question"]),
        })
    resp = client.chat.completions.create(model="fugu", messages=messages, tools=TOOLS)

print(resp.choices[0].message.content)

The /ask response includes the routed tool, the arguments Pipeworx filled, the live data, and a stable citation — so Fugu’s synthesis can cite real sources instead of inventing figures.

Rate limits and keys

The anonymous tier is fine for trying it out. For real workloads, sign up free at pipeworx.io/signup, grab a key at pipeworx.io/account, and append it: https://gateway.pipeworx.io/ask?apikey=YOUR_KEY&question=....

Notes

  • Verified end-to-end (2026-07-13, live fugu model): Fugu emitted tool_calls, chained two ask_pipeworx calls unprompted (current rate, then the year-ago observation), and synthesized a correct, source-cited comparison from the live Freddie Mac data. The whole run cost ~3,800 tokens (≈ $0.03).
  • Fugu may fan your request out to several expert models internally — the Pipeworx function result is shared context for all of them, which is exactly where grounded data matters most.
  • Want tighter scope? Use a vertical: https://gateway.pipeworx.io/ask?vertical=housing&question=... (see context tax).

Last reviewed July 13, 2026