Skip to main content

Připoj OpenAI Agents SDK (Python) k aicharged.io

215 nástrojů, jeden endpoint: https://aicharged.io/api/v1/mcp

OpenAI Agents SDK (Python)

OpenAI Agents SDK pro Python: MCPServerStreamableHttp s hlavičkou Authorization, předaný agentovi v mcp_servers.

  • API klíč (Bearer)

Kód agenta (agent)

Doporučeno
import asyncio, os
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async def main():
    async with MCPServerStreamableHttp(
        name="aicharged",
        params={
            "url": "https://aicharged.io/api/v1/mcp",
            "headers": {"Authorization": f"Bearer {os.environ['AICHARGED_API_KEY']}"},
            "timeout": 30,
        },
    ) as server:
        agent = Agent(name="Assistant", instructions="Use the aicharged.io tools.", mcp_servers=[server])
        result = await Runner.run(agent, "List my recent aicharged.io runs")
        print(result.final_output)

asyncio.run(main())

Instalace balíčku (install)

pip install openai-agents

Nebo to nech nastavit CLI

aicharged setup najde AI klienty na tomto počítači, přihlásí tě přes prohlížeč a zapíše jejich konfiguraci.

Připoj se jedním řádkem

Instalace CLI · macOS / Linux
curl -fsSL https://aicharged.io/install.sh | sh && aicharged setup
Instalace CLI · Windows
irm https://aicharged.io/install.ps1 | iex; aicharged setup
MCP endpoint
https://aicharged.io/api/v1/mcp

Streamable HTTP. Pošli hlavičku Authorization: Bearer <API_KEY>, nebo se přihlas přes OAuth, pokud to tvůj klient umí.

Nebo řekni agentovi
Přečti si https://aicharged.io/agent.md a nastav mi aicharged.io

Otevřít s tímto promptem v Claude (otevře se v nové kartě) ChatGPT (otevře se v nové kartě) Perplexity (otevře se v nové kartě)