Skip to main content

Pripojenie OpenAI Agents SDK (Python) k aicharged.io

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

OpenAI Agents SDK (Python)

OpenAI Agents SDK pre Python: MCPServerStreamableHttp s hlavičkou Authorization, odovzdáva sa agentovi v mcp_servers.

  • API kľúč (Bearer)

Kód agenta

Odporúčané
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())

Nainštalujte balík

pip install openai-agents

Alebo nechajte nastavenie na CLI

aicharged setup nájde AI klientov na tomto počítači, prihlási vás cez prehliadač a zapíše ich konfiguráciu.

Pripojte sa jedným riadkom

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

Streamable HTTP. Pošlite hlavičku Authorization: Bearer <API_KEY> alebo sa prihláste cez OAuth tam, kde to váš klient podporuje.

Alebo povedzte svojmu agentovi
Prečítaj si https://aicharged.io/agent.md a nastav mi aicharged.io

Otvoriť s týmto promptom v Claude (otvorí sa na novej karte) ChatGPT (otvorí sa na novej karte) Perplexity (otvorí sa na novej karte)