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 (नए टैब में खुलता है)