Zum Inhalt springen
FrankKi
Sign inStart freeiOS Download

Integration setup

OpenAI Agents SDK setup for FrankKi

Attach FrankKi as a local Streamable HTTP MCP server in the OpenAI Agents SDK for Python.

Setup

python -m pip install openai-agents
import os
from agents.mcp import MCPServerStreamableHttp, create_static_tool_filter

server = MCPServerStreamableHttp(
    name="FrankKi",
    params={
        "url": "https://mcp.frankki.app",
        "headers": {"Authorization": f"Bearer {os.environ['FRANKKI_API_KEY']}"},
        "timeout": 30,
    },
    tool_filter=create_static_tool_filter(
        allowed_tool_names=["mcp_health", "address_validate", "letter_create_draft", "letter_preview", "shipping_quote", "order_status"]
    ),
    require_approval="always",
)
  1. 1.Start with a read/draft-only tool filter. Add order_send or approval tools only after implementing an external human callback.
  2. 2.Enter the server with async with, pass it in Agent(mcp_servers=[server]), and call mcp_health before doing work.
  3. 3.Keep require_approval="always" for the initial integration. A model-generated statement cannot satisfy the human decision.
  4. 4.Persist the reviewed draft ID, quote fields, maxCostEuros, and clientOrderId outside model text before enabling a send tool.

Required FrankKi safety boundary

Validate the address, create a stable draft, inspect every preview page, obtain a fresh quote, set maxCostEuros, persist a stable clientOrderId, and obtain an explicit human decision before a live submission. Framework approval controls supplement FrankKi approval; model text never substitutes for the human decision.

Continue with canonical agent onboarding, the draft guide, send guide, and error recovery.

Trust and live status

Machine-readable service facts and the current operational status of the partner interface are publicly available at all times, no login needed.