OpenAI Agents SDK
Give agents built on the OpenAI Agents SDK access to your memos.
Use it in code
The snippet has your key in it so it runs as pasted. Move it to an environment variable before the code is committed or shared.
- 1.
Install the SDK
pip install openai-agents
- 2.
Add GigaRAG to the agent
import asyncio from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp async def main(): async with MCPServerStreamableHttp( name="gigarag", params={ "url": "https://mcp.gigarag.com/mcp", "headers": {"Authorization": "Bearer <api-key>"}, }, ) as gigarag: agent = Agent(name="Assistant", mcp_servers=[gigarag]) result = await Runner.run(agent, "List my GigaRAG buckets.") print(result.final_output) asyncio.run(main())
Check it worked
Send this once it is connected. An answer drawn from your workspace means the connection is live.
Run it. The model should answer with your GigaRAG buckets.
Written from the official docs: MCP in the Agents SDK