Skip to main content

Unganisha OpenAI Agents SDK (Python) na aicharged.io

Zana 215, endpoint moja: https://aicharged.io/api/v1/mcp

OpenAI Agents SDK (Python)

OpenAI Agents SDK kwa Python: MCPServerStreamableHttp yenye header ya Authorization, inayopitishwa kwa wakala katika mcp_servers.

  • Ufunguo wa API (Bearer)

Msimbo wa wakala

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

Sakinisha kifurushi

pip install openai-agents

Au ruhusu CLI isanidi

aicharged setup hupata wateja wa AI kwenye mashine hii, hukuingiza kupitia kivinjari na kuandika usanidi wao.

Unganisha kwa mstari mmoja

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

HTTP inayoweza kutiririshwa. Tuma header ya Authorization: Bearer <API_KEY>, au ingia kwa kutumia OAuth pale ambapo mteja wako anaiunga mkono.

Au mwambie wakala wako
Soma https://aicharged.io/agent.md kisha unisanidie aicharged.io

Fungua kwa agizo hili kwenye Claude (hufunguka kwenye kichupo kipya) ChatGPT (hufunguka kwenye kichupo kipya) Perplexity (hufunguka kwenye kichupo kipya)