Back to GigaRAG

Connect an agent

Give an AI tool access to your GigaRAG Workspace, so it can search, read and write your memos while it works.

Google ADK

Give agents built with Google's Agent Development Kit 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. 1.

    Install ADK

    pip install google-adk
  2. 2.

    Add GigaRAG to the agent

    from google.adk.agents import LlmAgent
    from google.adk.tools.mcp_tool import McpToolset
    from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams
    
    root_agent = LlmAgent(
        model="gemini-2.5-flash",
        name="assistant",
        instruction="Answer from my GigaRAG knowledge base.",
        tools=[
            McpToolset(
                connection_params=StreamableHTTPConnectionParams(
                    url="https://mcp.gigarag.com/mcp",
                    headers={"Authorization": "Bearer <api-key>"},
                )
            )
        ],
    )

Check it worked

Send this once it is connected. An answer drawn from your workspace means the connection is live.

Run the agent with adk web and ask it to list your GigaRAG buckets.

Written from the official docs: MCP tools in ADK