Skip to main content

OpenAI Agents SDK (Python) ను aicharged.io కు కనెక్ట్ చేయండి

215 టూల్స్, ఒకే ఎండ్‌పాయింట్: https://aicharged.io/api/v1/mcp

OpenAI Agents SDK (Python)

Python కోసం OpenAI Agents SDK: Authorization హెడర్‌తో MCPServerStreamableHttp, mcp_servers లో ఏజెంట్‌కు పంపబడుతుంది.

  • API కీ (Bearer)

ఏజెంట్ కోడ్

సిఫార్సు చేయబడినవి
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())

ప్యాకేజీని ఇన్‌స్టాల్ చేయండి

pip install openai-agents

లేదా CLI ద్వారా సెటప్ చేయనివ్వండి

aicharged setup ఈ మెషీన్‌లోని AI క్లయింట్‌లను కనుగొంటుంది, బ్రౌజర్ ద్వారా మిమ్మల్ని సైన్ ఇన్ చేస్తుంది మరియు వాటి కాన్ఫిగరేషన్‌ను రాస్తుంది.

ఒక్క లైన్‌తో కనెక్ట్ అవ్వండి

CLIని ఇన్‌స్టాల్ చేయండి · macOS / Linux
curl -fsSL https://aicharged.io/install.sh | sh && aicharged setup
CLIని ఇన్‌స్టాల్ చేయండి · Windows
irm https://aicharged.io/install.ps1 | iex; aicharged setup
MCP ఎండ్‌పాయింట్
https://aicharged.io/api/v1/mcp

స్ట్రీమబుల్ HTTP. Authorization: Bearer <API_KEY> హెడర్‌ను పంపండి, లేదా మీ క్లయింట్ మద్దతు ఇచ్చే చోట OAuth తో సైన్ ఇన్ చేయండి.

లేదా మీ ఏజెంట్‌కు చెప్పండి
https://aicharged.io/agent.md చదివి, aicharged.io తో నన్ను సెటప్ చేయండి

ఈ ప్రాంప్ట్‌తో ఇక్కడ తెరవండి Claude (కొత్త ట్యాబ్‌లో తెరుచుకుంటుంది) ChatGPT (కొత్త ట్యాబ్‌లో తెరుచుకుంటుంది) Perplexity (కొత్త ట్యాబ్‌లో తెరుచుకుంటుంది)