Keep the OpenAI Agents SDK.
Give your agents your machines.

AI Commander is not an alternative to OpenAI Agents SDK, Claude Code, Codex, ChatGPT, Cursor, GitHub Copilot, Sourcegraph Cody, Grok, Gemini, Windsurf, Continue, Cline, Roo Code, Zed, OpenCode, Qwen Code, goose, Amp, Kilo Code, OpenHands, Amazon Q Developer, Augment Code, Devin, JetBrains Junie, Kiro, Warp, Factory, Crush, LM Studio, Trae, Claude Desktop, or n8n. It is the remote-machine harness those tools plug into over MCP: outbound-only shell, detached jobs that outlive the chat, and file transfer on hardware you already own.

Positioning in one line: The OpenAI Agents SDK stays your agent framework; AI Commander is the hands on the box — servers, GPU rigs, NAS, laptops — with no inbound ports and no exposed SSH.

Sibling harness pages: Claude Code · Codex · ChatGPT · Cursor · OpenCode · Factory · Kiro · Warp · Crush · LM Studio · Trae · Claude Desktop · n8n · Gemini — and the rest on Connect your AI client.

Connect the OpenAI Agents SDK (Streamable HTTP)

The OpenAI Agents SDK for Python (Agents SDK MCP docs) connects agents to MCP servers over Streamable HTTP, SSE, stdio, or as a hosted tool run by the Responses API. AI Commander’s hosted endpoint speaks Streamable HTTP, so MCPServerStreamableHttp is the direct fit. Pass an AI Commander API key from the dashboard as a Bearer header — the SDK docs recommend tokens in headers, not URLs:

agent.py — MCPServerStreamableHttp
import asyncio, os

from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async def main() -> None:
    async with MCPServerStreamableHttp(
        name="aicommander",
        params={
            "url": "https://aicommander.dev/mcp",
            "headers": {"Authorization": f"Bearer {os.environ['AIC_API_KEY']}"},
        },
        cache_tools_list=True,
    ) as aic:
        agent = Agent(
            name="Ops agent",
            instructions="Use AI Commander to work on my machines. "
                         "Start long builds as detached jobs.",
            mcp_servers=[aic],
        )
        result = await Runner.run(agent, "On gpu-box, report GPU usage and free disk space.")
        print(result.final_output)

asyncio.run(main())

Your Python process holds the MCP connection, so you get the SDK’s local features on AI Commander’s tools: tool_filter (for example create_static_tool_filter(allowed_tool_names=["list_machines", "remote_job_start", "remote_job_status", "remote_job_logs"])), require_approval for human-in-the-loop on remote_exec, tool guardrails, retries, and MCP spans in tracing.

Or let the Responses API call it (HostedMCPTool)

With HostedMCPTool, OpenAI’s Responses API connects to a publicly reachable MCP server for the model — AI Commander’s relay is public, and your machines stay outbound-only behind it. Keep approvals on: "require_approval": "always" plus an on_approval_request callback that approves read-only tools such as list_machines, session_status, and the job status/log readers, and escalates the rest.

agent.py — HostedMCPTool
import os
from agents import Agent, HostedMCPTool, MCPToolApprovalFunctionResult, MCPToolApprovalRequest

READ_ONLY = {"list_machines", "session_status", "remote_job_list", "remote_job_status", "remote_job_logs"}

def approve_tool(request: MCPToolApprovalRequest) -> MCPToolApprovalFunctionResult:
    if request.data.name in READ_ONLY:
        return {"approve": True}
    return {"approve": False, "reason": "Escalate to a human reviewer"}

agent = Agent(
    name="Ops agent",
    tools=[
        HostedMCPTool(
            tool_config={
                "type": "mcp",
                "server_label": "aicommander",
                "server_url": "https://aicommander.dev/mcp",
                "headers": {"Authorization": f"Bearer {os.environ['AIC_API_KEY']}"},
                "require_approval": "always",
            },
            on_approval_request=approve_tool,
        )
    ],
)

Prefer a local stdio bridge?

agent.py — MCPServerStdio
import os
from agents.mcp import MCPServerStdio

aic = MCPServerStdio(
    name="aicommander",
    params={
        "command": "npx",
        "args": ["-y", "@aicommander/mcp"],
        "env": {
            "AICOMMANDER_SERVER": "https://aicommander.dev",
            "AICOMMANDER_TOKEN": os.environ["AIC_API_KEY"],
        },
    },
)

Use it with async with aic: like the HTTP example. API keys only act while you have opened the AI Commander dashboard in the last 24 hours; for unattended runs (CI, cron) see Credential security on Connect your AI client. Long builds and training runs belong in detached jobs (remote_job_start) so a single agent turn does not have to wait.

Using ChatGPT or Codex directly? See Keep ChatGPT and Keep Codex. Full client matrix (OpenAI Agents SDK, Claude Desktop, n8n, Claude Code, Codex, ChatGPT, Cursor, Copilot, Gemini, Trae, Crush, LM Studio, and more, plus REST): Connect your AI client. Class and parameter names can change between SDK releases — check the linked Agents SDK docs for your version.

What you get that the chat alone cannot

Not a replacement — a multiplier

You already useAI Commander adds
OpenAI Agents SDKMCPServerStreamableHttp(params={"url": "https://aicommander.dev/mcp", …}) or HostedMCPTool
Claude DesktopCustomize → Connectors → Add custom connector → https://aicommander.dev/mcp
n8nAI Agent → Tool → MCP Client Tool, Endpoint https://aicommander.dev/mcp, HTTP Streamable
Claude Codeclaude mcp add --transport http … → remote exec + jobs
Codex / ChatGPTSame MCP endpoint or REST /api/v1/exec
Cursor / Continue / Windsurfnpx @aicommander/mcp stdio bridge

FAQ

Is AI Commander an alternative to the OpenAI Agents SDK?
No. AI Commander is NOT an alternative to the OpenAI Agents SDK. It is a remote-machine harness. You keep the OpenAI Agents SDK (or Claude Code, Codex, ChatGPT, Cursor, GitHub Copilot, Sourcegraph Cody, Grok, Gemini, Windsurf, Continue, Cline, Roo Code, Zed, OpenCode, Qwen Code, goose, Amp, Kilo Code, OpenHands, Amazon Q Developer, Augment Code, Devin, JetBrains Junie, Kiro, Warp, Factory, Crush, LM Studio, Trae, Claude Desktop, or n8n) as your AI agent. AI Commander gives those tools secure remote shell, detached jobs, and file transfer on machines you own — over MCP or REST. It is also not an alternative to Claude Code, Codex, or ChatGPT; it works with them the same way.
How do I connect the OpenAI Agents SDK to AI Commander?
Create MCPServerStreamableHttp(name="aicommander", params={"url": "https://aicommander.dev/mcp", "headers": {"Authorization": "Bearer …"}}), open it with async with, and pass it in mcp_servers=[…] on your Agent. Or add a HostedMCPTool with server_url https://aicommander.dev/mcp so the Responses API calls it. Prefer stdio? Use MCPServerStdio with npx -y @aicommander/mcp. See /howto/ for the full matrix.
Should I use MCPServerStreamableHttp or HostedMCPTool?
Use MCPServerStreamableHttp when you want your own process to hold the connection and apply tool filters, approvals, guardrails, and tracing locally. Use HostedMCPTool when you want OpenAI's Responses API to make the tool calls; keep require_approval on and approve tools with a callback. Either way, your machines stay outbound-only behind the AI Commander relay.

Next steps

Install the agent on a machine you control, point MCPServerStreamableHttp at https://aicommander.dev/mcp, then give your agent a real task on a remote box.