sshh12

Modal Claude Agent SDK Python — AI skill for Claude Code

AI community

This package wraps the Claude Agent SDK to execute AI agents in secure, scalable Modal containers.

How to install Modal Claude Agent SDK Python

This entry records only its repository, not the path inside it, so there is no exact command to give. Open sshh12/modal-claude-agent-sdk-python and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Modal Claude Agent SDK Python does

This package wraps the Claude Agent SDK to execute AI agents in secure, scalable Modal containers. It provides progressive complexity—simple usage mirrors the original Agent SDK, while advanced features expose Modal's full capabilities (GPU, volumes, image customization, etc.).

Alternatives in AI

  • Generative Media Skills — Multi-modal Generative Media Skills for AI Agents (Claude Code, Cursor, Gemini CLI) 3k ★
  • Multi Execute — 执行 - 多模型协作执行 (Multi-Model Collaborative Execution) 1.9k ★
  • Proxypal — A desktop app that lets you use your AI subscriptions (Claude, ChatGPT, Gemini, GitHub Copilot) with any codin 1.2k ★

README

Modal Agents SDK

**Disclaimer**: This is an unofficial community package. It is not affiliated with, endorsed by, or associated with Anthropic or Modal in any way.

Run [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) agents in [Modal](https://modal.com) sandboxes.

This package wraps the Claude Agent SDK to execute AI agents in secure, scalable Modal containers. It provides progressive complexity—simple usage mirrors the original Agent SDK, while advanced features expose Modal's full capabilities (GPU, volumes, image customization, etc.).

Features

Feature modal-agents-sdk claude-agent-sdk
Sandboxed execution ✅ Modal containers ❌ Local only
GPU support ✅ A10G, H100, A100, etc. ❌
Persistent storage ✅ Modal Volumes ❌
Custom images ✅ Docker/Dockerfile ❌
Network isolation ✅ Configurable ❌
Auto-scaling ✅ Built-in ❌
Built-in tools ✅ Read, Write, Bash, etc. ✅
MCP servers ✅ ✅
Host-side hooks ✅ Intercept tool calls ✅
Host-side tools ✅ Run on local machine ✅
Multi-turn conversations ✅ ✅

Installation

pip install modal-agents-sdk

Prerequisites

  1. Modal account: Sign up at modal.com
  2. Modal CLI: Install and authenticate
    pip install modal
    modal setup
  3. Anthropic API key: Create a Modal secret
    modal secret create anthropic-key ANTHROPIC_API_KEY=sk-ant-...

Quick Start

import asyncio
from modal_agents_sdk import query

async def main():
    async for message in query("What is 2 + 2?"):
        print(message)

asyncio.run(main())

Basic Usage: `query()`

`query()` is an async function for querying Claude in a Modal sandbox. It returns an `AsyncIterator` of response messages.

from modal_agents_sdk import query, ModalAgentOptions, AssistantMessage, TextBlock
import modal

# S