AI makes mistakes! Undisk makes recovery instant: every write is versioned, every file is reversible.
See it heal →
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.0-flash",
    name="undisk_agent",
    instruction="You have a versioned file workspace via Undisk.",
    tools=[McpToolset(connection_params=StreamableHTTPConnectionParams(
        url="https://mcp.undisk.app/v1/mcp",
        headers={"Authorization": "Bearer sk_live_YOUR_KEY_HERE"},
    ))],
)

Integration checklist

  • Keep MCP endpoint and auth headers configurable per environment.
  • Add retries and timeout handling at agent orchestration boundaries.
  • Validate tool outputs before downstream steps mutate additional files.

Error handling pattern

import asyncio

async def call_with_retry(tool, args):
    for attempt in range(3):
        try:
            return await tool(args)
        except Exception as err:
            text = str(err)
            if "RATE_LIMITED" in text and attempt < 2:
                await asyncio.sleep(2 ** attempt)
                continue
            raise

Operational guidance

Use this pattern when you want deterministic file history in multi-step agent workflows where each step should remain independently reversible.