Skip to main content

OpenAI Agents SDK (Python) verbinden met aicharged.io

215 tools, één endpoint: https://aicharged.io/api/v1/mcp

OpenAI Agents SDK (Python)

OpenAI Agents SDK voor Python: MCPServerStreamableHttp met een Authorization-header, doorgegeven aan de agent in mcp_servers.

  • API-sleutel (Bearer)

Agentcode

Aanbevolen
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())

Installeer het pakket

pip install openai-agents

Of laat de CLI het instellen

aicharged setup vindt de AI-clients op deze machine, logt je in via de browser en schrijft hun configuratie.

Verbind in één regel

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

Streamable HTTP. Stuur de header Authorization: Bearer <API_KEY> mee, of log in met OAuth als je client dat ondersteunt.

Of zeg het je agent
Lees https://aicharged.io/agent.md en stel aicharged.io voor me in

Openen met deze prompt in Claude (opent in een nieuw tabblad) ChatGPT (opent in een nieuw tabblad) Perplexity (opent in een nieuw tabblad)