Pydantic AI
Pydantic AI: auth के रूप में API कुंजी के साथ एक MCPToolset, जिसे एजेंट के toolsets में जोड़ा जाता है।
- API कुंजी (Bearer)
- OAuth साइन-इन
एजेंट कोड
अनुशंसितimport asyncio, os
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPToolset
toolset = MCPToolset("https://aicharged.io/api/v1/mcp", auth=os.environ["AICHARGED_API_KEY"])
agent = Agent("openai:gpt-6.1-sol", toolsets=[toolset])
async def main():
result = await agent.run("List my recent aicharged.io runs")
print(result.output)
asyncio.run(main())
पैकेज इंस्टॉल करें
pip install pydantic-ai